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

Home » Public Forums » archive » Re: BUG in IDL 4.0a PowerMac
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: BUG in IDL 4.0a PowerMac [message #6038] Fri, 05 April 1996 00:00 Go to previous message
rivers is currently offline  rivers
Messages: 228
Registered: March 1991
Senior Member
In article <4k3mro$72p@newsreader.wustl.edu>, Paritosh Dhawale <paritosh> writes:
> Hello,
>
> I get this dangerous bug rather randomly running
> IDL 4.0a on a PowerMac 7500. Any one with similar
> problems? IDL fails to return the correct answer
> in statement 4.
>
> IDL> help,yy
> YY FLOAT = 35.0000
> IDL> help,last_row
> LAST_ROW FLOAT = 89.0000
> IDL> print,last_row-yy
> 54.0000
> IDL> print,fix(last_row-yy)
> 53
> IDL> print,fix(last_row)-fix(yy)
> 54

You have really not provided sufficient information. If you created YY and
LAST_ROW by direct assignment, i.e.
YY = 35.0
LAST_ROW = 89.0

then I agree that there is a bug. All machines which I know of represent small
floating point integers exactly, and there should be no roundoff error on
subtraction. However, if YY or LAST_ROW are computed, then they might be
slightly different than the values they appear to have, and you are just seeing
normal roundoff problems. Whenever you are trying to convert a float which
might have some slight roundoff error to an integer like this you should use a
function which returns the nearest integer, not the integer value after
discarding fractional parts.

____________________________________________________________
Mark Rivers (312) 702-2279 (office)
CARS (312) 702-9951 (secretary)
Univ. of Chicago (312) 702-5454 (FAX)
5640 S. Ellis Ave. (708) 922-0499 (home)
Chicago, IL 60637 rivers@cars3.uchicago.edu (Internet)
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: IDL V4 and Windows 95
Next Topic: BUG in IDL 4.0a PowerMac

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

Current Time: Fri Oct 10 06:58:12 PDT 2025

Total time taken to generate the page: 0.00681 seconds