Re: Infinity (to the nearest integer)
Bill Frantz <[email protected]>
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <r314ps-1064i-57961D6061B14085A19C6E6222AB83CE@Bill-Frantzs-MacBook-Pro.local> |
On 10/8/10 at 6:58 AM, tal-v5nx5w6akNyLE8xUarVfuPLx9OUvmyODWmv/[email protected] (Thomas Leonard) wrote: >This is a bit surprising... > >? Infinity.round() ># value: 9223372036854775807 > >? NaN.floor() ># value: 0 Perhaps in both cases introducing the idea of an Integer NaN is the right answer. Division by zero should produce NaN. (I can hear arguments for +- infinity, but is the zero + or -?) But integer NaNs may be too weird. Cheers - Bill --------------------------------------------------------------------------- Bill Frantz |"Web security is like medicine - trying to do good for 408-356-8506 |an evolved body of kludges" - Mark Miller www.periwinkle.com |