| 33 | } |
| 34 | |
| 35 | inline double StrtodNormalPrecision(double d, int p) { |
| 36 | if (p < -308) { |
| 37 | // Prevent expSum < -308, making Pow10(p) = 0 |
| 38 | d = FastPath(d, -308); |
| 39 | d = FastPath(d, p + 308); |
| 40 | } |
| 41 | else |
| 42 | d = FastPath(d, p); |
| 43 | return d; |
| 44 | } |
| 45 | |
| 46 | template <typename T> |
| 47 | inline T Min3(T a, T b, T c) { |