From: lpa@netcom.com (Pierre Asselin)
Subject: Re: Large numbers in F90
Date: 1998/02/12 [thread overview]
Message-ID: <lpaEoA4JC.63K@netcom.com> (raw)
In-Reply-To: 34E22A42.41C6@rhea.umd.edu
"Jeffrey J. Potoff" <jpotoff@rhea.umd.edu> writes:
>I have a Fortran 90 code where on occasion I need to take the
>exponential of some large numbers (500+). As you can imagine,
>the result is a floating point overflow with real*8.
That's normal.
>I was able
>to avoid the floating overflow by going real*16, but now the
>code is incredibly slow.
That's normal. The real*16 gives you the extra dynamic range of a
longer exponent, but also the extra accuracy of a longer mantissa.
Your code works that much harder to compute exponentials to that
accuracy.
Go back to the math behind the code, factor out the exponent offset
analytically, and re-code.
--
--Pierre Asselin, Westminster, Colorado
lpa@netcom.com
pa@verano.sba.ca.us
prev parent reply other threads:[~1998-02-12 5:00 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-02-11 5:00 Large numbers in F90 Jeffrey J. Potoff
1998-02-12 5:00 ` Pierre Asselin [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox