Ok, let's see the documentation .
double
Note. This feature is almost ten times faster than rational , but slightly less accurate.
The double type supports about 16 decimal places of precision. For 94.2% of numbers, this function and rational give the same results, but for the remaining 5.8%, this function loses accuracy around the 15th decimal place. For 0.001% of numbers, this function will lose accuracy at 13th or 14th decimal places.
number
Note. This feature is almost ten times faster than rational . On integrated inputs, it gives quite accurate answers, and on floating-point inputs it is slightly less accurate than rational.
Both of them are recognized as slightly inaccurate (in exchange for a relatively fast). number inaccuracy is not quantified, so the fact that its inaccuracy does not coincide with double is not an error.
If accuracy is paramount, use rational .
source share