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

Home » Public Forums » archive » strange "eq" behaviour
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: strange "eq" behaviour [message #69866 is a reply to message #69770] Mon, 15 February 2010 08:18 Go to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Feb 15, 3:54 pm, chris <rog...@googlemail.com> wrote:
> Hi David,
> maxx is the correlation coefficient of some data series. It should be
> exactly 1 if two data vectors are equal - but it isn't - so now I run
> into bigger problems with the inbuilt correlate function . Anyway,
> thanks for your hint.
>
> CR

Hi David,

'It should be exactly one' is a tricky statement in floating point
arithmetic.
Looks like a good time to trot out this old line again:
http://www.dfanning.com/math_tips/sky_is_falling.html

Your specific problem (or something very similar) is dealt with this
article:
http://www.dfanning.com/code_tips/comparearray.html

You might have more success comparing floats using this program:
http://www.dfanning.com/programs/floats_equal.pro

Regards,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: strange "eq" behaviour
Next Topic: Re: Segfault when smoothing image

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

Current Time: Sun Oct 12 14:45:30 PDT 2025

Total time taken to generate the page: 1.19972 seconds