lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


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.