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 #55656 is a reply to message #55564] Tue, 28 August 2007 11:56 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Paul van Delst writes:

> I think you should also pass a scaling factor, ala,
>
> FUNCTION FLTARRAYS_EQUAL, array_1, array_2, ULP=ulp
> ....
> IF ( N_ELEMENTS(ulp) EQ 0 ) THEN ulp=1.0
> ....
> NUMBER = (array_1 > array_2) * epsilon * ulp
> ....
> END
>
> Also, there needs to be differentiation for singel and double precision so you can
> determine epsilon correctly and set ulp to a suitable default (1.0 or 1.0d0).

I usually save these extra touches for programs I add to
the Coyote Library and document heavily, not for ones I
throw away into the Tip Examples pile. But I have a feeling
this one is destined for the Library anyway.

I've seen you use ULP as a variable name before.
Is this something like VEGEMITE? Or does it actually
mean something to you? I'd probably call it FUDGE
if I was making up the name myself. :-)

Can double precision *possibly* make a difference in this
program in practice?

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: Wed Oct 08 19:18:01 PDT 2025

Total time taken to generate the page: 0.00452 seconds