Extreme numerical values in floating-point precision in R
问题 Can somebody please explain me the following output. I know that it has something to do with floating point precision, but the order of magnitue (difference 1e308) surprises me. 0: high precision > 1e-324==0 [1] TRUE > 1e-323==0 [1] FALSE 1: very unprecise > 1 - 1e-16 == 1 [1] FALSE > 1 - 1e-17 == 1 [1] TRUE 回答1: R uses IEEE 754 double-precision floating-point numbers. Floating-point numbers are more dense near zero. This is a result of their being designed to compute accurately (the