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

sin etc of huge numbers #4

Open
davjam opened this issue Sep 28, 2021 · 1 comment
Open

sin etc of huge numbers #4

davjam opened this issue Sep 28, 2021 · 1 comment

Comments

@davjam
Copy link
Owner

davjam commented Sep 28, 2021

sin 1e100 is clearly nonsense. Should it return NaN? Some experiments with smaller numbers:

sin 1e14
-0.2094084333834997
sin 1e14 :: Float
0.9671488

In https://www.python.org/:

import math
math.sin(1e14)
-0.2094083074964523

In https://www.tutorialspoint.com/execute_lisp_online.php:

(format t "~d" (sin 1e14))
0.96697646

(iPhone & Window calculators give ~-0.209, as does sinLarge with piRat to 1000 fracs)

@davjam
Copy link
Owner Author

davjam commented Oct 29, 2021

ISO 10967-2 requires big angle r(F) - the max angle that sin, etc, is required to be valid for, and absolute_precision_underflow error (giving a qNaN) for angles outside of this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant