Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Better precision #4

Open
rdrpenguin04 opened this issue Apr 18, 2023 · 3 comments
Open

Better precision #4

rdrpenguin04 opened this issue Apr 18, 2023 · 3 comments
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@rdrpenguin04
Copy link
Owner

f64 has run into overlow/underflow errors with my homework; advising switching to Decimal128 at suggestion of an LC member.

@rdrpenguin04 rdrpenguin04 self-assigned this Apr 18, 2023
@rdrpenguin04
Copy link
Owner Author

The decimal crate's d128 looks like a promising candidate. It's missing a few things that mathy-notes needs, like trig, particularly inverse trig, mathematical constants, and sqrt and co (but pow exists).

The dec crate seems to very possibly use the same library, and it's maintained, but it's also woefully under-featured, missing all of the above, and some features are tucked away in strange places.

The fraction crate is impressive and could be useful in the future, but it doesn't solve the feature problem; rather, it makes the problem significantly worse by having to work around fractions being represented perfectly. The infrastructure is also incredibly bulky.

The best solution I see for now is to use f128 (uses GCC's libquadmath) and roll our own in the future.

@rdrpenguin04
Copy link
Owner Author

Nevermind. f128 somehow has even less features.

Agh.

@rdrpenguin04
Copy link
Owner Author

rust-lang/rfcs#2629

@rdrpenguin04 rdrpenguin04 added the enhancement New feature or request label Apr 19, 2023
@rdrpenguin04 rdrpenguin04 added the help wanted Extra attention is needed label Oct 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant