
-----Original Message----- From: boost-bounces@lists.boost.org [mailto:boost-bounces@lists.boost.org] On Behalf Of David Abrahams Sent: 01 May 2008 19:47 To: boost@lists.boost.org Subject: Re: [boost] [Math/nextafter] A question of naming functions...
on Tue Apr 29 2008, Kevin Lynch <krlynch-AT-bu.edu> wrote:
T next_greater(T val) Returns the next representable value greater than "val". T next_less(T val) Returns the next representable value less than "val".
We do have next() and prior() (not abbreviations!) already, which have meaning for iterators, integers, etc.
Doh! So why didn't I remember that! next and prior sound entirely intuitive to me. However John has specifically limited his question to floating-point types. (I'm not totally convinced this is wise). I think many novice non-mathematician, but not entirely floating-point naïve, users will want these functions. But none of suggestions so far for the difference or distance really grabs me. Complicated mathy terms like edit_difference and distance will not be what the above users will be looking for, even if they are what they need. Paul --- Paul A Bristow Prizet Farmhouse, Kendal, Cumbria UK LA8 8AB +44 1539561830 & SMS, Mobile +44 7714 330204 & SMS pbristow@hetp.u-net.com