[m-dev.] inf or infinity

Ben Schmidt schmidtb at student.unimelb.edu.au
Wed Aug 13 15:26:21 AEST 2014


I prefer the shorter 'inf', because you can also use 'NaN' (or 'nan'), whereas 
not_a_number is somewhat cumbersome.

Thought I'd put in 2c. :-p

Ben.



On 13/08/14 2:53 PM, Julien Fischer wrote:
>
> Hi,
>
> I have been working improving various aspects of the support for floats in the
> standard library recently.  As part of this I intend to add a new function
> to the float module that returns +infinity on systems that use IEEE 754 floats.
> (In practice, this is pretty much everything that Mercury runs on.)
>
> Question: should this function be named "inf" or "infinity"?
>
> My preference is for the latter as the abbreviation seems a bit pointless.
> For consistency, we will also use whatever name is chosen as what is produced
> by float_to_string, string.format etc.  (Which in turn form part of the fix
> for bug #348.)
>
> Cheers,
> Julien.
> _______________________________________________
> developers mailing list
> developers at lists.mercurylang.org
> https://www.mercurylang.org/lists/listinfo/developers
>



More information about the developers mailing list