ideas for the best way to do some math, please??
Paul Hughett
hughett at mercur.uphs.upenn.edu
Tue Apr 16 10:18:57 EDT 2002
Ben Carrington <bjc32 at hermes.cam.ac.uk> wrote:
: i am trying to evaluate a reatively simple equation but i keep getting
: this error:
: overflowError: math range error
: ...pointing to math.log(p)
: ...
: #part3
: part3 = 1 - math.e**part2
: p = abs(part3)
: #part4
: part4i = math.log(p)
: part4ii = k*T*part4i
: ...
I would suspect that p is zero, in which case the log is undefined (or
minus infinity, depending on your conventions). If that's not the case,
print out the values of the various variables and show them to us.
Paul Hughett
More information about the Python-list
mailing list