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

Issue with FastMath.expm1(709.85) #228

Closed
mmatsn opened this issue Jan 11, 2023 · 1 comment
Closed

Issue with FastMath.expm1(709.85) #228

mmatsn opened this issue Jan 11, 2023 · 1 comment

Comments

@mmatsn
Copy link

mmatsn commented Jan 11, 2023

Hello,

org.hipparchus.util.FastMath.expm1(709.85) return -1.0, while java.util.Math.expm1(709.85) return +Infinity.

Issue is present on Hipparchus 1.6 and 2.3.
Tested with OpenJDK 1.8

Code to reproduce issue:
import org.hipparchus.util.FastMath;
public class ExpTest {
public static void main(final String[] args) {
System.out.println(System.getProperty("java.vm.name") + " " + System.getProperty("java.version"));
final double val = 709.85;
System.out.println("val=" + val + " expm1: java=" + Math.expm1(val) + " hipp=" + FastMath.expm1(val));
}
}

I get :
OpenJDK 64-Bit Server VM 1.8.0_261
val=709.85 expm1: java=Infinity hipp=-1.0

@maisonobe
Copy link
Contributor

Fixed in master branch.

Thanks for the report!

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