Q: What are you doing recently?
A: I am doing some scientific programming.
Q: I hear about some programming languages, like C/C++, Java, Python, and so on. But could you tell me what’s the difference between the general purposed programming and scientific programming?
A: In short, more extensive arithmetic operations on real numbers, which is represented by a number of floating point type in computers.
Q: I think if the floating number can be represented in computers, there should not be too much difference from integer, right?
A: Problems come here. Computer can’t represent a general real number in an exact manner. For irrational number, of course, we can only use an approximated number with its several leading digits. However, even for rational numbers, we can only use an approximation.
Q: What kind of approximation? Or what’s the error?
A: It depends. There are several types of floating point number: single-precision, double-precision and extended precision (IEEE 754 Standard). They have different level of accuracy. Look at this table
|Tables||unit round-off||max number||bits|