|
Boost-Commit : |
From: john_at_[hidden]
Date: 2008-06-30 04:57:16
Author: johnmaddock
Date: 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
New Revision: 46890
URL: http://svn.boost.org/trac/boost/changeset/46890
Log:
Fix a few typos in the new indeterminate_result_error.
Text files modified:
sandbox/math_toolkit/libs/math/doc/sf_and_dist/error_handling.qbk | 10 +++++++---
sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk | 1 +
sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy.qbk | 10 +++++++++-
sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy_tutorial.qbk | 2 +-
sandbox/math_toolkit/libs/math/doc/sf_and_dist/pow.qbk | 6 +++---
5 files changed, 21 insertions(+), 8 deletions(-)
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/error_handling.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/error_handling.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/error_handling.qbk 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
@@ -127,9 +127,9 @@
[table Possible Actions for Indeterminate Result Errors
[[Action] [Behaviour]]
-[[throw_on_error][[*Throws `std::domain_error`]]]
+[[throw_on_error][Throws `std::domain_error`]]
[[errno_on_error][Sets `::errno` to `EDOM` and returns the same value as `ignore_error`.]]
-[[ignore_error][Returns a default result that depends on the function where the error occurred.]]
+[[ignore_error][[*Returns a default result that depends on the function where the error occurred.]]]
[[user_error][Returns the result of `boost::math::policies::user_indeterminate_result_error`:
[link math_toolkit.policy.pol_tutorial.user_def_err_pol
this function must be defined by the user].]]
@@ -331,7 +331,11 @@
errno_on_error policies, and __Policy is the current policy in use for the
function that was called.
-The default policy for this function is `ignore_error`.
+The default policy for this function is `ignore_error`: note that this error
+type is reserved for situations where the result is mathematically
+undefined or indeterminate, but there is none the less a convention for what
+the result should be: for example the C99 standard specifies that the result
+of 0[super 0] is 1, even though the result is actually mathematically indeterminate.
[heading [#rounding_error]Rounding Errors]
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/math.qbk 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
@@ -76,6 +76,7 @@
[def __denorm_error [link denorm_error denorm_error]]
[def __evaluation_error [link evaluation_error evaluation_error]]
[def __rounding_error [link rounding_error rounding_error]]
+[def __indeterminate_result_error [link indeterminate_result_error indeterminate_result_error]]
[def __checked_narrowing_cast [link checked_narrowing_cast checked_narrowing_cast]]
[def __arg_pomotion_rules [link math_toolkit.main_overview.result_type ['result type calculation rules]]]
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy.qbk 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
@@ -204,7 +204,7 @@
Defaults to `boost::math::policies::indeterminate_result_error<ignore_error>`
- When the action is ['throw_on_error] then throws `boost::math::evaluation_error`]]
+ When the action is ['throw_on_error] then throws `std::domain_error`]]
]
[h4 Examples]
@@ -551,6 +551,14 @@
actions for error handing: `throw_on_error`, `errno_on_error`,
`ignore_error` or `user_error`.
+[h5 BOOST_MATH_INDETERMINATE_RESULT_ERROR_POLICY]
+
+Defines what happens when the result is indeterminate, but where there
+is none the less a convention for the result. If not defined then
+defaults to `ignore_error`, but can be set to any of the enumerated
+actions for error handing: `throw_on_error`, `errno_on_error`,
+`ignore_error` or `user_error`.
+
[h5 BOOST_MATH_DIGITS10_POLICY]
Defines how many decimal digits to use in internal computations:
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy_tutorial.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy_tutorial.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/policy_tutorial.qbk 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
@@ -46,7 +46,7 @@
[[Denormalised Result][Ignores the fact that the result is denormalised, and returns it.]]
[[Rounding Error][Throws a `boost::math::rounding_error` exception.]]
[[Internal Evaluation Error][Throws a `boost::math::evaluation_error` exception.]]
-[[Indeterminate Result Error][Returns a result that depends on the function where the error occurred.]
+[[Indeterminate Result Error][Returns a result that depends on the function where the error occurred.]]
[[Promotion of float to double][Does occur by default - gives full float precision results.]]
[[Promotion of double to long double][Does occur by default if long double offers
more precision than double.]]
Modified: sandbox/math_toolkit/libs/math/doc/sf_and_dist/pow.qbk
==============================================================================
--- sandbox/math_toolkit/libs/math/doc/sf_and_dist/pow.qbk (original)
+++ sandbox/math_toolkit/libs/math/doc/sf_and_dist/pow.qbk 2008-06-30 04:57:15 EDT (Mon, 30 Jun 2008)
@@ -68,12 +68,12 @@
Two cases of errors can occur when using `pow`:
-* In case of null base and negative exponent, an __overflown_error occurs since
+* In case of null base and negative exponent, an __overflow_error occurs since
this operation is a division by 0 (it equals to 1/0).
-* In case of null exponent, an indeterminate_result_error occurs since the
+* In case of null exponent, an __indeterminate_result_error occurs since the
result of a null power is indeterminate.
Those errors follow the
-[@sf_and_dist/html/math_toolkit/main_overview/error_handling.html
+[link math_toolkit.main_overview.error_handling
general policies of error handling in Boost.Math].
The default overflow error policy is `throw_on_error`. A call like `pow<-2>(0)`
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