changed: -Alternatively, we could also use Renaud Rioboo's 'RECLOS package, which has both mathematical equality and ordering. Unfortunately, it is not as easy to use - most importantly, you have to "name" your real roots, if you want simple answers: Alternatively, we could also use Renaud Rioboo's 'RECLOS' package, which has both mathematical equality and ordering. Unfortunately, it is not as easy to use - most importantly, you have to "name" your real roots, if you want simple answers: changed: -'AlgebraicNumber' doesn't like the following: AlgebraicNumber doesn't like the following: changed: -f25 := sqrt(1/25,5)$RAN; f25 := sqrt(1/25,5)$RAN changed: -sqrt(f32-f27,3)-f25*(1+f3-f3^2) expr1 := sqrt(f32-f27,3) expr2 := (1+f3-f3^2) expr1 - f25*expr2 changed: -Although the main point of 'RECLOS' is supposed do be mathematical ordering and approximation, I could not find a convincing exmaple. From the 'examples' section of 'RECLOS': Although the main point of 'RECLOS' is supposed do be mathematical ordering and approximation, I could not find a convincing example. From the "examples" section of 'RECLOS':
Some demo involving the algebraic number \sqrt{3}.
(1) -> t1 := (sqrt(3)-3)*(sqrt(3)+1)/6
tt1 := -1/sqrt(3)
t2 := sqrt(3)/6
t1+t2
tt1+t2
Note that in PanAxiom the above are not generic expressions but of type AlgebraicNumber?.
Alternatively, we could also use Renaud Rioboo's RECLOS package,
which has both mathematical equality and ordering.
Unfortunately, it is not as easy to use - most importantly,
you have to "name" your real roots, if you want simple answers:
RAN ==> RECLOS FRAC INT
x1 := (sqrt(3)$RAN-3)*(sqrt(3)$RAN+1)/6
xx1 := -1/sqrt(3)$RAN
(x1=xx1)@Boolean
It's preferable to give names to the roots:
s3 := sqrt(3)$RAN
(s3-3)*(s3+1)/6
AlgebraicNumber? doesn't like the following:
f3 := sqrt(3,5)$RAN
f25 := sqrt(1/25,5)$RAN
f32 := sqrt(32/5,5)$RAN;
f27 := sqrt(27/5,5)$RAN;
expr1 := sqrt(f32-f27,3)
expr2 := (1+f3-f3^2)
expr1 - f25*expr2
Although the main point of RECLOS is supposed do be mathematical
ordering and approximation, I could not find a convincing example.
From the "examples" section of 'RECLOS':
s := sqrt(190)$RAN+sqrt(1751)$RAN-sqrt(208)$RAN-sqrt(1698)$RAN
approximate(s,10^-15)::Float
But we get the same without 'RECLOS':
t := sqrt(190)+sqrt(1751)-sqrt(208)-sqrt(1698)
digits(30);
numeric t - approximate(s,10^-30)::Float