[m-dev.] inf or infinity

Matt Giuca matt.giuca at gmail.com
Wed Aug 13 17:06:24 AEST 2014


For what it's worth, I believe the IEEE 754 standard specifically uses the
abbreviation "NaN" but doesn't use the abbreviation "Inf" -- so a correct
application of the standard would be the full word "infinity" but the
abbreviation "nan".


On Wed, Aug 13, 2014 at 3:50 PM, Ben Schmidt <
schmidtb at student.unimelb.edu.au> wrote:

> On 13/08/14 3:30 PM, Julien Fischer wrote:
>
>> On Wed, Aug 13, 2014 at 3:26 PM, Ben Schmidt <
>> schmidtb at student.unimelb.edu.au
>> <mailto:schmidtb at student.unimelb.edu.au>> wrote:
>>
>>     I prefer the shorter 'inf', because you can also use 'NaN' (or
>> 'nan'), whereas
>>     not_a_number is somewhat cumbersome.
>>
>>
>> Using "infinity" does not mean we can not also use "nan".
>>
>
> Of course, but I'm a programmer; I like consistency. :-p
>
> If you use 'inf', I'll automatically try 'nan' as it's the corresponding
> abbreviation (and vice-versa). I would also guess 'inf' before trying
> 'infinity', but that's probably as much to do with how I 'grew up' as
> anything else.
>
> If you use 'infinity', I'll stop and think "What am I supposed to use?"
>
> In the end it really doesn't matter. Plenty of languages use things
> yuckier than either, with no consistency. Plenty don't even support IEEE754.
>
> Is mercury unicode? Just use ±∞. :-D
>
>
> Ben.
>
>
> _______________________________________________
> developers mailing list
> developers at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/developers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/developers/attachments/20140813/a6ed3da2/attachment.html>


More information about the developers mailing list