Hello,
float operations are causing me some headaches on plan 9 (9vx).
I have a program that crashes badly when I feed it with near-the-top
doubles ~1.1e308. This causes an overflow in a function that needs to
square this values and acid points the line where the first call to
pow(2) occurs when I debug it. The problem is that this doesn't happen
at all when the program is compiled with gcc (9c) on linux. Obviously
my results aren't useful, but I get '+Inf' on my output and the
program doesn't crash. I thought of using isInf(2) to avoid Infs in my
operations, but this would make the code really ugly and probably
slow.
I've seen that hoc also suffers from this. On 9vx

% echo 1.75e308+1.75e308 | hoc
hoc 851: suicide: sys: trap: 19 (reserved) pc=0x00003a75

but on linux

echo 1.75e308+1.75e308 | hoc
+Inf

is there something I can do to remedy this situation? maybe this
doesn't happen on a native plan 9 installation, but I don't have
access to any.
Saludos,

-- 
Hugo

Reply via email to