MathGroup Archive 2002

[Date Index] [Thread Index] [Author Index]

Search the Archive

How to avoid under/overflow?

  • To: mathgroup at smc.vnet.net
  • Subject: [mg37925] How to avoid under/overflow?
  • From: Kilian Weniger <weniger at tm.uka.de>
  • Date: Tue, 19 Nov 2002 20:58:41 -0500 (EST)
  • Organization: University of Karlsruhe, Germany
  • Sender: owner-wri-mathgroup at wolfram.com

Hi,

is Mathematica able to compute the following equation with products of 
veryvery-close-to-one values?

  f[R_, N_] := 1 - Exp[-N]*(1 - N/R)^(N - R - 1/2)
  f[2^63, 10000]

After typing the equation, I always get under/overlows:

  General::"ovfl": "Overflow occurred in computation."
  General::"unfl": "Underflow occurred in computation."
  General::"unfl": "Underflow occurred in computation."
  General::"unfl": "Underflow occurred in computation."
  General::"stop": "Further output of \!\(General :: \"unfl\"\) will be \
  suppressed during this calculation."

I also tried to increase the allowed exponent range with

  SetArithmetic[99, 10, ExponentRange -> {-999, 999}, MixedMode -> True, 
  IdealDivide -> True, RoundingRule -> RoundToEven]

or to increase the precision with

  N[f[2^63, 10000], 100000]

but it didn't help. Any suggestions?


thanks,

Kilian




  • Prev by Date: How to do ListPlot with absolute point size?
  • Next by Date: Re: Loosing "Del"-key after upgrading to KDE 3.0.4 (SuSE 8.0)?
  • Previous by thread: Re: How to do ListPlot with absolute point size?
  • Next by thread: Re: How to avoid under/overflow?