Re: Divide by Zero
Frans Bouma <[email protected]> Tue, 26 Feb 2008 11:45:49 +0100
| Newsgroups | gmane.comp.windows.devel.dotnet.clr |
|---|---|
| Message-ID | <00a801c87864$c04095e0$40c1c1a0$@nl> |
> On Tue, 26 Feb 2008 11:04:56 +0100, Frans Bouma <[email protected]> wrote: > > >>> I think because, if I recall correctly, a floating point number is > >>> always an approximation, so you can have a floating point value > >>> which seems 0 but actually isn't. > >> > >> I disagree. PositiveInfinity, for example, is not an approximation. > >> It's really infinity. > > > > Though how would you store 'e' or 'pi' ? You have just 4 or 8 bytes. > > I think you read my response out of context. You are positing that the > reason for not throwing an exception when dividing a floating-point number > by zero is that floating-point numbers are always approximations. That's > with which I'm disagreeing, not your understand of floating-point arithmetic > (which obviously by far surpasses mine). The IEEE floating-point rules > dictate the CLR behavior. I just wanted to point out that not all > singles/doubles in the CLR are approximations. Agreed, my wordings were too strong. > Pi should be stored as a recursive lambda expression, of course. ;] Now that's an idea to apply bleeding edge technology! ;) FB =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com