Boost logo

Boost-Commit :

From: pbristow_at_[hidden]
Date: 2007-09-21 08:35:01


Author: pbristow
Date: 2007-09-21 08:35:01 EDT (Fri, 21 Sep 2007)
New Revision: 39444
URL: http://svn.boost.org/trac/boost/changeset/39444

Log:
Weasel to allow infinity - sometimes
Text files modified:
   sandbox/math_toolkit/libs/math/doc/implementation.qbk | 10 +++++++---
   1 files changed, 7 insertions(+), 3 deletions(-)

Modified: sandbox/math_toolkit/libs/math/doc/implementation.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/implementation.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/implementation.qbk 2007-09-21 08:35:01 EDT (Fri, 21 Sep 2007)
@@ -187,10 +187,10 @@
 
 Some functions and distributions are well defined with + or - infinity as
 argument(s), but after some experiments with handling infinite arguments
-as special cases, we concluded that it was more useful to forbid this,
-and instead to return the result of __domain_error.
+as special cases, we concluded that it was generally more useful to forbid this,
+and instead to return the result of __domain_error.
 
-Handling infinity as special cases was additionally complicated
+Handling infinity as special cases is additionally complicated
 because, unlike built-in types on most - but not all - platforms,
 not all User-Defined Types are
 specialized to provide `std::numeric_limits<RealType>::infinity()`
@@ -202,6 +202,10 @@
 The code also became much more complicated, more error-prone,
 much more work to test, and much less readable.
 
+However in a few cases, for example normal, where we felt it obvious,
+we have permitted argument(s) to be infinity,
+provided infinity is implemented for the realType on that implementation.
+
 Overflow, underflow, denorm can be handled using __error_policy.
 
 We have also tried to catch boundary cases where the mathematical specification


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk