Hello group,
Currently, the +, - en * operations in zend_operators in C do their
calculcations on long arguments with doubles, and check if the result
would fit in a long.
This failed for me on FreeBSD/alpha (in some of the math tests), because
doubles are not accurate enough to represent LONG_MIN or LONG_MAX. This
causes the comparison
'((double) LONG_MAX) + 1 > (double) LONG_MAX'
to result in 'false' because they have the same double representation.
Since a lot of tests use LONG_MAX in comparisons, this caused a lot of
them to fail on this architecture.
One solution could be to use long doubles, but in my opinion it is
better to check the sign bit directly.
A patch is attached.
--
Ard