Commit 20671210 authored by unknown's avatar unknown

Don't use log_01[] in my_strtod() to avoid loss of precision.

This is for bug #28121.


strings/strtod.c:
  Don't use log_01[] in my_strtod() to avoid loss of precision.
parent a5a84c84
......@@ -244,8 +244,8 @@ double my_strtod(const char *str, char **end_ptr, int *error)
else
step= array_elements(log_10) - 1;
for (; exponent > step; exponent-= step)
result*= neg_exp ? log_01[step] : log_10[step];
result*= neg_exp ? log_01[exponent] : log_10[exponent];
result= neg_exp ? result / log_10[step] : result * log_10[step];
result= neg_exp ? result / log_10[exponent] : result * log_10[exponent];
}
done:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment