While investigating the accuracy of floating point numbers, I've seen in a few places a statement similar to float and double are (designed for/used often in) engineering and scientific calculationFrom my understanding, the strength of floats and doubles are the amount of memory they use for their (good, but not perfect) precision.I feel like I'm almost getting an understanding from this answer floating point numbers let you model continuous quantitiesI still am not convinced I understand. Engineering and Science both sound like fields where you would want precise results from your calculations, which, from my understanding, floating points do not give. I'm also not sure I follow what a continuous quantity is, exactly.Can somebody expand on this explanation and perhaps give an example?
Why are floating point numbers used often in Science/Engineering?
floating point;numeric precision
Computation in science and engineering requires tradeoffs in precision, range, and speed. Fixed point arithmetic provides precision, and decent speed, but it sacrifices range. BigNum, arbitrary precision libraries, win on range and precision, but lose on speed.The crux of the matter is that most scientific and engineering calculations need high speed, and huge range, but have relatively modest needs for precision. The most well determined physical constant is only known to about 13 digits, and many values are known with far less certainty. Having more than 13 digits of precision on the computer isn't going to help that. The fly in the ointment is that sequences of floating point operations can gradually lose precision. The bread and butter of numerical analysis is figuring out which problems are particularly susceptible to this, and figuring out clever ways of rearranging the sequence of operations to reduce the problem.An exception to this is number theory in mathematics which needs to perform arithmetic operations on numbers with millions of digits but with absolute precision. Numerical number theorists often use BigNum libraries, and they put up with their calculations taking a long time.