[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Divide by zero in Lua 5.2 alpha
- From: steve donovan <steve.j.donovan@...>
- Date: Wed, 9 Mar 2011 15:23:42 +0200
On Wed, Mar 9, 2011 at 3:14 PM, Chodera, Ian <Ian.Chodera@delphi.com> wrote:
> If you don't explicitly check for zero before attempting a divide (on PC's etc) the hardware / FPU will generate the exception, I don't think it something specific to Borland C++
Well, here's a little test (on Windows XP)
#include <stdio.h>
int main() {
double res = 0.0/0.0;
printf("res %lf\n",res);
}
I get
res -1.#IND00
No crash! And yes, both GCC and CL agree on this one. (Also tried
1.0/0.0, same result)
steve d.
- References:
- Does anyone have "assert" blindness ?, Jayanth Acharya
- Re: Does anyone have "assert" blindness ?, Axel Kittenberger
- Divide by zero in Lua 5.2 alpha, Chodera, Ian
- Re: Divide by zero in Lua 5.2 alpha, liam mail
- RE: Divide by zero in Lua 5.2 alpha, Chodera, Ian
- Re: Divide by zero in Lua 5.2 alpha, steve donovan
- RE: Divide by zero in Lua 5.2 alpha, Chodera, Ian