Why not let the compiler calculate constants?
Because existing compilers only use native built-in floating point precision, often only 64-bit with a guaranteed accuracy of only 15 decimal digits. Using these constants gives the best chance of portability. For example, it may be a little better to use third_pi rather than pi /3. This is because the single constants are produced with a higher precision than the floating-point hardware and/or software that the compiler is also certain to use for its computation. The constants are entirely fixed at compile time, so there is no code to call functions, for example, log, nor the need to include header files which define those functions, for example
Related Questions
- I have 5 separate let out properties. Should I calculate the house property income separately for each individual property or by clubbing all the rental receipts in one calculation?
- How can I calculate binding constants (Ka and Kd) and kinetic constants (kon and koff) ?
- How Do You Calculate A Buy To Let Mortgage?