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

Home » Public Forums » archive » Re: WHERE problems (longish)
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: WHERE problems (longish) [message #35910 is a reply to message #35909] Tue, 22 July 2003 08:59 Go to previous messageGo to previous message
Benjamin Panter is currently offline  Benjamin Panter
Messages: 6
Registered: August 2002
Junior Member
David Fanning wrote:
> Benjamin Panter writes:
>
>
>> The values which have -1 certainly exist - and were generated in exactly
>> the same way as the others. I've put the array online if anyone fancies
>> looking at it - http://www.roe.ac.uk/~bdp/where_problem.idl
>>
>> Am I being stupid again? What is special about 2980,3000 and 3020??
>
>
> There is nothing special about *those* numbers, but those
> are not the numbers you are using in your WHERE statement.
> You are using 2980.0, 3000.0, and 3020.0. While there isn't
> a big difference between integers and floats to you, there
> is a HUGE difference to a computer. Better read these articles:
>
> http://www.dfanning.com/math_tips/sky_is_falling.html
> http://www.dfanning.com/math_tips/razoredge.html

Yeup, thanks for that David - I'm still a bit confused though, as the
values I give in the test program (3000.) are floats and the values in
the look up table are also floats! I nievely thought that would avoid
the razors and ints. Is it just by luck that where found the majority
and lost those three?

After reading your pages I've come up with a solution though... if I
replace the where lines with

print, where(abs(3000. - reform(dust_lookup[*,0])) lt 0.1)


I come out with the right answer.

thanks for you help,

Ben

--
Ben Panter, Edinburgh
My name (no spaces)@bigfoot which is a com.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Multidimensional Interpolation
Next Topic: about replicate_inplace

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

Current Time: Thu Oct 09 21:21:49 PDT 2025

Total time taken to generate the page: 1.52516 seconds