Using a 64-bit floating point number (AKA a double), what is the smallest integer n
such that?
- 0.1^n == 0.0
- 10.0^n == Inf
- exp(-n) == 0.0
- exp(n) == Inf
I frequently forget these numbers, so here they are:
- 0.1^n == 0.0: n = 324
- 10.0^n == Inf: n = 309
- exp(-n) == 0.0: n = 746
- exp(n) == Inf: n = 710
tanh(n) == 1.0: n = 20
via https://twitter.com/stephentyrone