Does anyone know off-hand which normal arguments cause a subnormal result for a correctly rounded double-precision sin or cos?
-
Show this thread
-
Never mind, I had forgotten about https://opensource.apple.com/source/Libm/Libm-315/Source/Intel/sincostan.c … which contains the answer (there aren't any interesting ones)
2 replies 0 retweets 3 likesShow this thread -
The closest double to a nonzero multiple of π/2 is 0x1.6d61b58c99c43p-60 away from n*π/2.
3 replies 1 retweet 4 likesShow this thread -
Replying to @volatile_void
Oh! So the answer is there aren't any? What's with sin(smallest normal number)? Wouldn't rounding rules allow that to be subnormal?
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
I think round-to-nearest sine should make the result the same as the argument, without checking. It shouldn't even be close.
1 reply 0 retweets 2 likes -
Replying to @volatile_void
I believe to remember that transcendental functions may always be off by up to one ULP. But maybe that's nonsense, I would have to check..
1 reply 0 retweets 0 likes -
Replying to @oe1cxw
The usual implementations trade just enough memory and speed for x ULP where x is chosen between 0.501 and 2 (but quite easy to do <1).
1 reply 0 retweets 1 like -
Replying to @volatile_void @oe1cxw
For transcendental functions, IEEE 754 mandates no particular x (which would have discouraged research for better values of x at low cost)
2 replies 0 retweets 1 like
IIRC Annex F doesn't specify the C transcendental functions to be the IEEE ones anyway.
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.