| Start |
|---|
| Comparing floating point values You should be careful when comparing floating-point values ( The calculation This problem of inexact representations is more stark when we attempt to mix The floating point representations used in Java for the Delta compare example: Result: Also for comparison of Finally, determining what deltas are most appropriate for a comparison can be tricky. A commonly used approach is to pick delta values that are our intuition says are about right. However, if you know scale and (true) accuracy of the input values, and the calculations performed, it may be possible to come up with mathematically sound bounds on the accuracy of the results, and hence for the deltas. (There is a formal branch of Mathematics known as Numerical Analysis that used to be taught to computational scientists that covered this kind of analysis.) |
| OverFlow and UnderFlow Float data type The float data type is a single-precision 32-bit IEEE 754 floating point.
Maximum possible value is
Minimum value is 1.4e-45f, when is goes below this value it produces double data type The double data type is a double-precision
Maximum possible value is
Minimum value is 4.9e-324, when is goes below this value it produces |
| Formatting the floating point values Floating point Numbers can be formatted as a decimal number using Floating point Numbers can be formatted as a decimal number using |
| Strict Adherence to the IEEE Specification By default, floating point operations on
All constant expressions are implicitly strict, even if they aren't inside a Therefore, |
Read Article
https://develop.horje.com/learn/1434/reference