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

Home » Public Forums » archive » Comparing 2 arrays
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: Comparing 2 arrays [message #55663 is a reply to message #55564] Tue, 28 August 2007 09:52 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Jean H. writes:

> David, in your example (in this message), you use
> NUMBER = (array_1 > array_2) * epsilon
> and
> NUMBER = (array_1 > array_2) * epsilon * 2 in your article...

I just thought there should be some multiple to account
for possible accumulative round-off errors. Two was an
arbitrary selection, but based on something I read in the
previous discussion. Naturally, I decided on this after
I wrote the note describing it. :-)

> Also, but that is for pure curiosity, could it be possible to read
> directly the mantissa and the power (see David's article if it sounds
> like a foreign language) and to compare them for our 2 numbers? ... 1)
> look a the power, if they have any difference, the two values can not be
> equal. Then look at the mantissa and asses if the digit values are the
> same or not...

I don't think IDL has easy access to the numbers as they
are stored. I guess you could do it yourself, but I'm
pretty sure it involves "twos complement" arithmetic,
which I've never been sufficiently motivated to learn. :-(

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: new miracle of minor ticks
Next Topic: Programmatic size adjustment of widgets under Windows vs. UNIX (was "Natural size of explicitly-sized widget")

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

Current Time: Sun Oct 12 04:21:51 PDT 2025

Total time taken to generate the page: 0.64354 seconds