[Proj] Re: Re: Re: Proj4 Bug (rtodms)
cp
ch.panel at free.fr
Fri Nov 10 15:51:00 EST 2006
"Gerald I. Evenden" <gerald.evenden at verizon.mail> a écrit dans le message de
news: 200611101150.07261.gerald.evenden at verizon.mail...
> My conclusion, based upon all the material this thread has generated, is
> that
> either Borland has messed with the rounding mode of the FPU or the machine
> used on the original error has a flawed chip. Even when the problem is
> rewritten to emulate the Borland optimization, the "OK" solution is the
> result.
No ! it's a bug on the compiler when the second operand is a number and so
when optmization is made by this compiler (optimization that noone has tell
to do).
the lines
res1 = r/60.0
res1 = r/60
res1 = r/60.0L
are generated the same code and a DOUBLE precision number is loaded which
represent 1/60. I said DOUBLE and not LONG DOUBLE though a fld tbyte ptr is
generated.
in the following lines
static long double t1 = 1.0L;
static long double t2=60.0L;
static long double t3;
static long double t4;
double r=240.0;
t3 = autre / autre2;
t4 = autre / 60.0L;
this gives t3 different from t4 because in line t4, /60.0L is optimized and
then replaced by 1/60 in double precisiion and loaded as long double
precision.
so LSB -> MSB
t3= 89 88 88 88 88 88 88 88 F9 3F
t4= 00 88 88 88 88 88 88 88 F9 3F
this is how works borland compiler. strange! isn't it ?
>
> I would suggest that the originator of this problem submit a bug report to
> Borland in an effort to extract their take on the problem. Please add a
> summary of the results of this email thread.
no! thank you ! :o)
>
> I do not think there is sufficient evidence to justify modifying the
> original
> source code. Perhaps a distribution note could be made to warn users of
> the
> Borland compiler of the problem.
of course not ! don't change anything ! I think only it should be kind that
borland compiler's users are worned about this !
>
> Or perhaps a compile flag testing for Borland compiler which issues a
> self-destruct message.
>
> --
> The whole religious complexion of the modern world is due
> to the absence from Jerusalem of a lunatic asylum.
> -- Havelock Ellis (1859-1939) British psychologist
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>
More information about the Proj
mailing list