Skip to content

Is it possible to increase Algebrite precision? #128

Open

Description

@Saikedo

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...

Activity

  1. thunderkid commented on Nov 6, 2020

    @thunderkid

    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.)

  2. changed the title [-]Is it possible to increase Algebrite precission?[/-] [+]Is it possible to increase Algebrite precision?[/+] on Mar 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions