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

Home » Public Forums » archive » Re: IDL not interpreting numbers correctly?
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: IDL not interpreting numbers correctly? [message #77366 is a reply to message #77365] Fri, 26 August 2011 18:00 Go to previous message
Ashley Berg is currently offline  Ashley Berg
Messages: 14
Registered: February 2011
Junior Member
On Aug 26, 6:37 pm, Ashley Berg <ashley.b...@gmail.com> wrote:
> I'm having a strange problem with IDL.  I have an array of numbers
> that are supposed to all add up to 100.  So to check, I say:
>
> bad = where(array gt 100. or array lt 100.)
>
> and it says it finds 4 numbers that meet this criteria. However, when
> I say:
>
> print, array(bad)
>
> the numbers are all 100.000!  So for some reason IDL says these
> numbers are greater than or less than 100 when actually they are equal
> to 100.  Has anyone else ever had a problem like this?

So, I also printed off the numbers minus 100, and found out they are
off by 1.4210855e-14. So IDL just wasn't printing out to that many
decimal places. Is there some way to get IDL to print off all the
decimal places instead of printing a rounded number?
[Message index]
 
Read Message
Read Message
Previous Topic: User prompt with timeout?
Next Topic: Arrow object?

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

Current Time: Fri Oct 10 10:29:27 PDT 2025

Total time taken to generate the page: 0.55753 seconds