Consider the following (probabilistic) program, say fibonacci.prob, for the Fibonacci recurrence with algebraic initial values.
f0 = 1
f1 = 2**(1/2)
while true:
f0o = f0
f1o = f1
f0 = f1
f1 = f0o + f1o
end
or
f0 = 1
f1 = sqrt(2)
while true:
f0o = f0
f1o = f1
f0 = f1
f1 = f0o + f1o
end
I run the following task python3.8 polar.py benchmarks/fibonacci.prob --plot f0 and obtain the outputs
Computing samplesPolynomial sqrt(2) is not a number in state {f0: 0.0}
and
Unexpected token Token('BOPEN', '(') at line 2, column 10.
Expected one of:
* RBRACE
* _NL
* BCLOSE
* LBRACE
* MULT
* MINUS
* PLUS
* COP
* OR
* POW
* COMMA
* DIV
* COLON
* AND
respectively.
It would be useful if Polar could interpret algebraic inputs (in common standard forms).
Consider the following (probabilistic) program, say fibonacci.prob, for the Fibonacci recurrence with algebraic initial values.
or
I run the following task
python3.8 polar.py benchmarks/fibonacci.prob --plot f0and obtain the outputsand
respectively.
It would be useful if Polar could interpret algebraic inputs (in common standard forms).