       Re: How to avoid overflow or underflow in mathematica?

• To: mathgroup at smc.vnet.net
• Subject: [mg88674] Re: [mg88648] How to avoid overflow or underflow in mathematica?
• From: "W_Craig Carter" <ccarter at mit.edu>
• Date: Mon, 12 May 2008 04:46:47 -0400 (EDT)
• References: <200805111914.PAA08842@smc.vnet.net>

```Hello Quantum Fang,

You could use arbitrary precision and do something like this (although

fermiseries =
Normal[Series[1/(1 + E^((muShift) beta)), {beta, 0, 14}]];

colist = Simplify[CoefficientList[fermiseries, beta]]

and then write a function that calls N[beta, bigNumber] and N[mushift,
bigNumber] on the product of the two list until you have the accuracy
that you want.... This is a bad idea.

However your function, except for ((omega - mu - Ef)/KBT)
approximately 1, is the unit step function (0 if x<0, 1/2 x=0, 1 if
x>0). If you are interested in the physical aspects of this problem
then expand (omega - mu - ef) near 1/(kb T).  In other words, scale
your energies with the thermal energy.

WCC

On Sun, May 11, 2008 at 3:14 PM, quantumfang <membrane at 163.com> wrote:
> It's well known that Mathematica can do evaluation to arbitrary precision. But I don't know how to avoid the following trouble in computing:
>
>  Ef = 0.;
>  mu=0.;
>  KBT = 1.*10^-10;
>  FL[omega_Real] := 1./(1. + E^((omega - mu - Ef)/KBT));
>
>  the error message shows
>
>  General::ovfl: Overflow occurred in computation. >>
>  General::unfl: Underflow occurred in computation. >>
>
>

--
W. Craig Carter

```

• Prev by Date: Re: Re: Request for Collective Wisdom...
• Next by Date: Re: Solving on mathematica
• Previous by thread: Re: How to avoid overflow or underflow in mathematica?
• Next by thread: Conjugate of Symbolic Expression