Re: [Dev-C++] numerical error in a simple program
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: w.y. <yok...@ve...> - 2003-09-03 10:42:34
|
"Luís Brás" wrote: > > a = 0.333300000000000 > a = 3.333000000000000 > a = 33.329999999999998 > a = 333.299999999999950 > a = 3332.999999999999500 > How to avoid this error? You have to design your own floating point format type, or find a library that does it... If you need _exact_ FP calculations, the built in types can't do it. |