[PYTHON MATRIX-SIG] Compiling on HPUX with gcc
James Hugunin
jjh@Goldilocks.LCS.MIT.EDU
Mon, 29 Jan 96 14:22:36 EST
From: David Redish <David_Redish@GS151.SP.CS.CMU.EDU>
<SNIP> stuff about embarassing error covered elsewhere <SNIP>
However, I get a ld error when I try to load it saying unsatisfied
symbol: "finite".
Am I missing a file?
You're not missing a file, you're running into one of the unfortunate
system dependent issues in IEEE libraries.
On most systems, the standard library includes the function "finite"
which returns true iff a floating point value is not +-Inf, and not
NaN.
This function is only referenced in ofuncobject.c in the macro CHECK
which is defined at the top of the file.
A quick fix is to just define CHECK(x) as nothing. This will mean
that the umathmodule will not check for floating point overflows in
calculations as it should.
A better solution would be for you to figure out how to get this
desired behavior on HPUX and send me the patches.
A good check to see if you have a working implementation is to do the
following:
>>> import umath
>>> umath.multiply(1.0e200, 1.0e200)
This should produce OverflowError
If instead it returns Infinity, you know that your routine is not
doing the needed checks.
=================
MATRIX-SIG - SIG on Matrix Math for Python
send messages to: matrix-sig@python.org
administrivia to: matrix-sig-request@python.org
=================