Re: 0.0 / 0.0 = -NAN ?
Skybuck Flying <[email protected]> Sat, 30 Apr 2022 10:34:13 -0700 (PDT)
| Newsgroups | alt.comp.lang.borland-delphi |
|---|---|
| Message-ID | <[email protected]> |
In delphi it even depends on the platform. Win32: 0.0 / 0.0 = -NAN Win64: 0.0 / 0.0 = -1, #IND Win32 sets FPU exception mask Win64 sets SSE exception mask (I believe I read somewhere that there are slight differences in FPU vs SSE floating point operations, but can't recall right now... something to maybe further look into... for now my tests have shown that the code I am working on currently works on both platforms...) Just to be clear 0.0 for me at least simply means a 0 floating point number. Though there is also +0.0 and -0.0 I think... and also -Infinity and +Infinity. I would like to find some kind of specification or definition that goes deeper/explains why 0/0 produces these values ?! Also these values seem to be "infectious" like a virus lol, it seems to be "propagated" through operations, so far multiplication, addition and comparison have been observed/witnessed ! ;) Bye for now, Skybuck.