comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Inaccuracies
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Inaccuracies [message #5298 is a reply to message #5294] Wed, 15 November 1995 00:00 Go to previous messageGo to previous message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Andy Loughe <afl@cdc.noaa.gov> writes:

>> L. Paul Mix wrote:
>> I'm not sure what you want to do, but expecting perfect math with
>> floats is not generally possible.


> I accept the explanation given by Ken Bowman, but it is hard to
> explain the values assigned to
> (1) findgen(15)*.2 -1.4 versus
> (2) dindgen(15)*(.2D)-(1.4D)
> (3) and, taken separately, the results of using the total function
> on (1) and (2) matched with the ability to perform "perfect math"
> with only 13 values.

> I am describing a small permutation of inaccuracies here, (1) looks ok,
> but (2) does not. total( (1) ) and total( (2) ) are not accurate for
> the reasons given by Ken.

> BTW one IDL user indicated that there was *no* trouble with this math on
> his VMS system! Now that is interesting.

I believe that I was that user. Specifically, I reported that the expected
answer of 0 was seen when the calculation was done in single precision.
However, the same was not true in double precision. The only thing this
demonstrates is that the problems of computer round-off error shows up in
different ways in VMS than on other computers, and is simply because of the
difference between the VAX floating point representation and the more standard
IEEE one. In other words, it's a hardware difference, not a software one.

I think the discussion of how computer round-off error manifests itself is
interesting. However, it's important to remember that this has nothing to do
with IDL. Round-off errors are determined solely by the floating point
processing done by the CPU. It was stated earlier, without testing, that IDL
was deficient in this repect relative to Fortran or C--I showed in an earlier
message that this was not the case.

William Thompson
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: How can I add parameter to curvefit?
Next Topic: XLoadCT in a procedure ?????

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:20:33 PDT 2025

Total time taken to generate the page: 0.00388 seconds