|
Boost : |
Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Paul A. Bristow (pbristow_at_[hidden])
Date: 2010-03-29 05:26:39
> -----Original Message-----
> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]] On Behalf Of Jeffrey Lee Hellrung, Jr.
> Sent: Monday, March 29, 2010 8:23 AM
> To: boost_at_[hidden]
> Subject: Re: [boost] New Boost.XInt Library, request preliminary review
>
> Chad Nelson wrote:
> > On 03/29/2010 01:11 AM, Jeffrey Lee Hellrung, Jr. wrote:
You guys are obviously having a lot of fun with this thread, but I'd just like to point out that the *users* wishes can
sensibly be granted here using policies as John Maddock implemented in the Boost.Math library (see the docs if you need
reminding how this works - and you probably do need reminding because the sensible default policies mean that you
probably will ignore policies unless the library doesn't do what you want).
While there are things that are mathematically right or wrong, the application or user may not consider this important.
Policies allow the user to get exceptions thrown when something 'nasty' happens (like divide by minus zero say), or not.
Existing code may rely on getting a NaN, or may rely on *not* getting a NaN. Policies allow users to decide.
I was going to strongly suggest policies to Chad - but there are much more important things to sort out first (adding
policies really clutters the code, so policies are best added last).
My original point was that existing code may rely on std::numeric_limits, so it is important to specialise it, even the
meaning may not be perfect.
Paul
--- Paul A. Bristow Prizet Farmhouse Kendal, UK LA8 8AB +44 1539 561830, mobile +44 7714330204 pbristow_at_[hidden]
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk