
- Forum
- Programming Talk
- C and C++
- Exact Value
Exact Value
This is a discussion on Exact Value within the C and C++ forums, part of the Programming Talk category; My current applications which I am developing in C language have lot of scientific calculations particularly involving floating point numbers ...
-
Exact Value
My current applications which I am developing in C language have lot of scientific calculations particularly involving floating point numbers in it. I have to do lot of comparisons on these floating point numbers and take decisive actions based on that. So precision is an important factor for me for doing this process. I want to know whether the computations done using floating
point in C programming language return precision to all digits exactly as we do in calculator. If not how should I handle this situation?
-
Definitely you would not able to get exact precision as you get in calculator provided your computation in floats is too large in number. I assume since you are having exclusive scientific application you would surely have large float operations. C and C++ lacks in this aspect. If you opt to sue C and C++ for this specialized purpose of scientific application calculations it would not be a good choice. Not only with floating point precision some other operations which is lacked for full scientific computations with C and C++ are rounding, you might get error due to truncation of high-order digits appearing in scientific calculations and because of this you might experience overflows problem.

Reply With Quote





