3 ms·
> what is the cos(2^120)? -0.92587902285… > what is the cos(2^120+x) where x is the smallest increment representable in float64? -0.72134636322… > how many
by stephencanon 13y ago
> what is the cos(2^120)?
-0.92587902285…
> what is the cos(2^120+x) where x is the smallest increment representable in float64?
-0.72134636322…
> how many times 2pi is in x?
approximately 4.6974248 * 10^19.
All of these questions have well-defined answers. A good math library should be able to help you compute them.
- raverbashing 13y agoThanks for computing those Oh I don't argue about the mathematical exactitude of the values inside the limited precision of float64 (or something else). I doubt about the significance of them in a context other than (float) math. Graphics, physics, etc. Or better, don't try to numerically integrate cosine from 0 to 2^120 naively.