|
|
|
|
Marcos Diaz came across a problem when using the code on an alpha running Linux. It appears to be a bug in the Linux math library. The code crashes with floating point exceptions. To see this problem, compile and execute the following snippet (written by Peter van Hoof) on an Alpha; it will crash where the multiply happens. #include <math.h>
#include <stdio.h>
void main()
{
double g;
g = -740.12875;
g = exp(g);
printf("result: %.16e\n", g);
g = g*2.;
printf("result: %.16e\n", g);
}
The theory is that the Linux math library returns an illegal float when the exp is evaluated, rather than the correct underflow to zero. The code crashes when this illegal float is multiplied by two. Please let me know if you have a solution under the Linux library.
Marcos Diaz did find a solution. Download the Compac ccc compiler and library, from here. Marcos found that Cloudy worked when he compile with gcc and linked against the Compac math libraries.
Peter van Hoof writes "That bug is solved in Cloudy, at least for ev56 hardware and later. It is discussed in https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=51072 which gives a workaround for earlier hardware (very work-intensive, but there might be desperate people out there....).
|