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

Home » Public Forums » archive » Re: Patch to userlib/deriv.pro to add MAX_VALUE keyword
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: Patch to userlib/deriv.pro to add MAX_VALUE keyword [message #1555 is a reply to message #1554] Mon, 27 December 1993 12:34 Go to previous messageGo to previous message
schmitt is currently offline  schmitt
Messages: 3
Registered: December 1993
Junior Member
This is somewhat besides the point of the original posting, but it has to do
with a (granted, nitpicking) bug in the userlib routine deriv.pro.
You might as well fix it when you make the posted patch.

Basically, here's a use of "float(...)" in deriv.pro that is unneeded,
and makes the resulting answer wrong and/or inaccurate if any other type
of data (complex, double, ...&c) is passed as the Y value.
The unneeded usage of float occurs about here:

> d = float(shift(y,-1) - shift(y,1))/(shift(x,-1) - shift(x,1))
^^^^^
remove the "float", and the applicability of the routine improves.

---------------
Andy Schmitt / Code 6730 / Naval Research Lab / Washington DC 20375
schmitt@this.nrl.navy.mil
usual disclaimers apply
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: FORTRAN Sbrs. to Read .xdr Formatted Files?
Next Topic: JHU/APL IDL library update notice

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

Current Time: Fri Oct 10 05:05:34 PDT 2025

Total time taken to generate the page: 0.39500 seconds