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

Home » Public Forums » archive » converting floats to doubles
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
converting floats to doubles [message #44106] Fri, 20 May 2005 12:14
Benjamin Hornberger is currently offline  Benjamin Hornberger
Messages: 258
Registered: March 2004
Senior Member
Hi computation gurus,

is dblarr(n) equivalent in precision to double(fltarr(n))? I know that
in a case like sqrt(dblarr(n)) vs. double(sqrt(fltarr(n))), they are not
equivalent (the second version is not true double precision). But I
thought when I start with whole numbers anyway, it might be the case.

In other words, when a floating point number is converted to double, are
the additional digits always set to zero, or is it possible that they
aren't? I tried it out by printing some numbers, and it looks like they
add only zeroes, but I would be happy if the experts could confirm.

Thanks for any insight,

Benjamin
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDLCanvas 0.1.0 released !!!
Next Topic: Re: LabView script node and NetCDF

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

Current Time: Wed Oct 08 17:09:57 PDT 2025

Total time taken to generate the page: 0.15494 seconds