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

Home » Public Forums » archive » IDL 8.2.2 released
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: IDL 8.2.2 released [message #83169 is a reply to message #83056] Fri, 08 February 2013 08:24 Go to previous messageGo to previous message
dain.cilke is currently offline  dain.cilke
Messages: 3
Registered: February 2013
Junior Member
On Thursday, February 7, 2013 3:55:14 PM UTC-7, bobnn...@gmail.com wrote:
> On Thursday, February 7, 2013 3:10:32 PM UTC-7, dain....@gmail.com wrote:
>
>> On Thursday, February 7, 2013 11:53:16 AM UTC-7, bobnn...@gmail.com wrote:
>
>>
>
>>> On Wednesday, February 6, 2013 2:23:04 PM UTC-7, bobnn...@gmail.com wrote:
>
>>
>
>>>
>
>>
>
>>>> I wonder if the very long existing bug where INTERPOLATE internally truncates all results to single precision even when double precision input is used is still present (note that it still returns the results in a double precision variable but half the precision is gone). It is in 8.1 so I have little hope it is gone in 8.2.2.
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>>
>
>>
>
>>>
>
>>
>
>>>> Am I the only one that has been burned by this?
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> Well, I guess I am the only one who cares. But in case people just didn't know what I meant here is an example. Note that this is a toy example. The point is that if you have a function which you expect to work in double precision and you call interpolate then your results are truncated to single with no indication. I know of no other IDL built in function that does this!
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> ;; File interpolate_test.pro
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> x = dindgen(6)
>
>>
>
>>>
>
>>
>
>>> y = dindgen(6)
>
>>
>
>>>
>
>>
>
>>> x_i = dindgen(5) + 0.1d
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> print, 'INTERPOLATE: incorrect answer, accurate only to 8 digits'
>
>>
>
>>>
>
>>
>
>>> print,interpolate(y,x_i),FORMAT='(G20.16)'
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> print, 'INTERPOL: correct answer, accurate to 16 digits'
>
>>
>
>>>
>
>>
>
>>> print,interpol(y,x,x_i),FORMAT='(G20.16)'
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> end
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>>
>
>>
>
>>> IDL> .run interolate_test.pro
>
>>
>
>>>
>
>>
>
>>> % Compiled module: $MAIN$.
>
>>
>
>>>
>
>>
>
>>> INTERPOLATE: incorrect answer, accurate only to 8 digits
>
>>
>
>>>
>
>>
>
>>> 0.1000000014901161
>
>>
>
>>>
>
>>
>
>>> 1.100000023841858
>
>>
>
>>>
>
>>
>
>>> 2.099999904632568
>
>>
>
>>>
>
>>
>
>>> 3.099999904632568
>
>>
>
>>>
>
>>
>
>>> 4.099999904632568
>
>>
>
>>>
>
>>
>
>>> INTERPOL: correct answer, accurate to 16 digits
>
>>
>
>>>
>
>>
>
>>> 0.1000000000000000
>
>>
>
>>>
>
>>
>
>>> 1.100000000000000
>
>>
>
>>>
>
>>
>
>>> 2.100000000000000
>
>>
>
>>>
>
>>
>
>>> 3.100000000000000
>
>>
>
>>>
>
>>
>
>>> 4.100000000000000
>
>>
>
>>
>
>>
>
>> Hi Bob,
>
>>
>
>> Thanks for bring this to our attention! This bug has been fixed. Now interpolate will perform all calculations in double precision.
>
>>
>
>>
>
>>
>
>> Cheers,
>
>>
>
>> Dain
>
>>
>
>> IDL Code Monkey
>
>>
>
>> ExelisVIS
>
>
>
> OK, that is great.
>
>
>
> However, I assume that single precision inputs will still be done in single precision (or at least returned in single precision). I dislike routines that arbitrarily change the precision.
>
>
>
> Bob

Hi Bob,

Single precision inputs will result in single precision outputs. However, the internals of the function will be in double precision.

Hope this helps,
Dain
[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
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
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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: netCDF adding variable to an existing file
Next Topic: nearest node of Delauny tesselation

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

Current Time: Wed Oct 08 18:01:05 PDT 2025

Total time taken to generate the page: 0.00563 seconds