Author mark.dickinson
Recipients brett.cannon, mark.dickinson, miss-islington, rhettinger, steven.daprano, stutzbach, tim.peters, vstinner
Date 2020-01-15.09:31:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1579080716.98.0.930718092906.issue39310@roundup.psfhosted.org>
In-reply-to
Content
[Brett]

> Can I just say that "ulp" is totally non-obvious what that even means unless you have a specific math background?

It's a good point. I guess we have a choice between using the domain-specific standard-ish name (which should be immediately meaningful to experts, but doesn't give much of a hint to non-experts) or using something more descriptive (which then risks confusing experts until they figure out "oh, that's just ulp").

There's also the option of spelling it out as "unit_in_last_place", but I'm not sure that benefits anyone.

For meaningful descriptive names, "float_resolution" or "gap_to_next" are about the best I can come up with. "precision" is too ambiguous.

NumPy has "numpy.spacing". But this exhibits exactly the trap of *not* using the "ulp" name: on a first glance, I incorrectly decided that NumPy *didn't* implement a ulp function. Then, having found `numpy.spacing`, I had to read the description carefully in order to recognise that "oh, this is just ulp". (Actually, I had to do more, since the description doesn't make all the corner cases clear, and in fact is currently wrong for powers of 2.)

If we can get people can coalesce around a preferred alternative name, we could consider changing this.
History
Date User Action Args
2020-01-15 09:31:57mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, brett.cannon, rhettinger, vstinner, stutzbach, steven.daprano, miss-islington
2020-01-15 09:31:56mark.dickinsonsetmessageid: <1579080716.98.0.930718092906.issue39310@roundup.psfhosted.org>
2020-01-15 09:31:56mark.dickinsonlinkissue39310 messages
2020-01-15 09:31:56mark.dickinsoncreate