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

Improve BigFraction.doubleValue() #273

Closed
axkr opened this issue Sep 15, 2023 · 1 comment
Closed

Improve BigFraction.doubleValue() #273

axkr opened this issue Sep 15, 2023 · 1 comment
Assignees
Milestone

Comments

@axkr
Copy link
Contributor

axkr commented Sep 15, 2023

Can the BigFraction.doubleValue() method be improved by also considering Infinite values?

Changed to:

    if (Double.isInfinite(result) || Double.isNaN(result)) {
...
    }

Example:

numerator = 1175443811202636889584648110261699215671929253339678037082566183036829784156100300341131818417591797406644569806405529752410539491566888996766640542430075310377605462098357361563685103574645710283612852841417362211504458393792053529953230572830415970785545248189857341548686469982966457542855773477057255734051

denominator = 32626522339992622633551470546282737778505821290344832738793182277348616222987431136114480634269341408071340993046760559082031250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
@maisonobe
Copy link
Contributor

This is now fixed in the master branch.

Thanks for the report!

@maisonobe maisonobe added this to the 3.0 milestone Sep 15, 2023
@maisonobe maisonobe self-assigned this Sep 15, 2023
axkr added a commit to axkr/symja_android_library that referenced this issue Sep 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants