You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an option in Algebrite to increase calculation precision?
Algebrite.eval(5+0.0000001).toString() returns 5.0 instead of "5.000001" and I was wondering if there is a way to increase the precision for stuff like this.
I am using Algebrite mainly for .expand function and take a look at this case for example. I know the expansion on this example does not do anything meaningful but the issue is there none the less.
There's a PR here for increasing the precision, but it's hardcoded and fairly limited in its scope. I haven't tested it myself since I need something broader in my own use case. (My own solution is to replace all decimals with algebraic variables, then use my own logic to evaluate them to required precision after algebrite's performed its algebraic simplifications. It's pretty ugly to have to do this.)
davidedc
changed the title
Is it possible to increase Algebrite precission?
Is it possible to increase Algebrite precision?
Mar 28, 2021
Is there an option in Algebrite to increase calculation precision?
Algebrite.eval(5+0.0000001).toString()
returns 5.0 instead of "5.000001" and I was wondering if there is a way to increase the precision for stuff like this.I am using Algebrite mainly for .expand function and take a look at this case for example. I know the expansion on this example does not do anything meaningful but the issue is there none the less.
Algebrite.expand("(x)^(2)-(y)^(2)-0.000001").toString()
correctly returns"-0.000001+x^2.0-y^2.0"
but
Algebrite.expand("(x)^(2)-(y)^(2)-0.0000001").toString()
truncates the constant and returns"-0.0+x^2.0-y^2.0"
Not good...
The text was updated successfully, but these errors were encountered: