[CLN-list] More bugs.
Richard B. Kreckel
kreckel at thep.physik.uni-mainz.de
Fri Dec 10 22:50:05 CET 2004
Hi otra vez,
On Fri, 10 Dec 2004, Isidro [iso-8859-15] Cachadiña Gutiérrez wrote:
> #include <iostream>
> #include <cln/lfloat.h>
> #include <cln/lfloat_io.h>
>
>
> using namespace cln;
> int main(int argc, char **argv)
> {
>
> default_float_format=float_format(100);
> cl_LF a,b,c;
> b="1e-60";
> a="1.0";
> c=a+b;
> std::cerr << "c=" << c << std::endl;
> c=c-a;
> std::cerr << "c=" << c << std::endl;
> }
>
> And the outputs are 1.0L and 0.0L ¿What happen with the
> default_float_format?. If I write a="1.00000000000000000000000 ..." (100
> zeros here) I obtain the same result, then b is lost somewhere.
>
> More, when b about < 1e-20 then it is lost. Maybe an error in the
> conversion?
More information about the CLN-list
mailing list