From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1a12c9efb00463f70c0c59febf6600b8@hamnavoe.com> To: 9fans@cse.psu.edu From: Richard Miller <9fans@hamnavoe.com> Date: Mon, 21 May 2007 19:23:11 +0100 MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] Re: debugging help asked for Topicbox-Message-UUID: 6ccd1f30-ead2-11e9-9d60-3106f5b1d025 I said: > Possibly gcc/linux reacts differently to division by zero? In this particular case, you can get the same result as gcc/linux by doing these two things: - at the beginning of main() in PATHd8.c, add this line setfcr(getfcr()&~(FPINVAL|FPZDIV)); - in /sys/src/libc/port/log.c function log(), replace this: if(arg <= 0) return NaN(); with this: if(arg <= 0 || isNaN(arg)) return NaN(); -- Richard