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

Home » Public Forums » archive » Re: 1e38 limit?
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: 1e38 limit? [message #65334 is a reply to message #65329] Fri, 27 February 2009 08:07 Go to previous messageGo to previous message
Spon is currently offline  Spon
Messages: 178
Registered: September 2007
Senior Member
On Feb 27, 3:55 pm, Paula <paulartcoe...@gmail.com> wrote:
> hello,
>
> i read float numbers from a text file, and eventually i need to
> multiply them by large numbers ~1e40.
> 'result' is the array that i read from the text file, and 'chi' is the
> array i'm analysing. i extract it with:
>
> chi = double(reform(result[3,*]))
>
> and then i do something like:
>
> chi = chi * 1e40
>
> but the routine apparently enters into an infinite loop, lots of CPU,
> RAM and HD usage, and i end up having to kill the process after a
> while. trial-and-error showed me that as long as i keep the
> multiplicative factor <= 1e38, everything runs smoothly.
>
> i tried even a stupid:
> chi = chi * 1e38
> chi = chi * 1e2
>
> but the routine still gets crazy with that.
>
> what is going on? how can i work it around?
>
> many thanks,
> paula

I'll try that again :-\

Hi Paula,

try
IDL> Help, 1e40

Your multiplier is too large to be represented as a float, so you have
to use double precision.
What happens if you replace it with 1d40? You may still be getting
overflow, but you'll have a lot more room to play.

I find you can't read the following article often enough:
http://www.dfanning.com/math_tips/sky_is_falling.html

All the best,
Chris
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Why the font is smaller in the IDLgrBuffer ?
Next Topic: Why the font is smaller in the IDLgrBuffer ?

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

Current Time: Fri Oct 10 11:16:48 PDT 2025

Total time taken to generate the page: 7.67906 seconds