Skip to content

Input is always parsed as f64s, which can result in precision errors #5

Description

@IntrepidPig

This is most noticeable when inputting decimals, for example:

eval::<ComplexRugRat>("2.2") // = becomes 2476979795053773/1125899906842624

However, it also happens when integers become large enough

eval::<ComplexRugRat>("200000000000000000000000") // = 199999999999999983222784

This can be fixed by parsing the number (in parse.rs) with the functions provided by rug. However this will require adding parse functions to the Num trait and passing the N generic type all the way down which will be quite a bit of work.

Activity

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