Ticket #9432: fix_typo.patch
File fix_typo.patch, 5.5 KB (added by , 9 years ago) |
---|
-
libs/multiprecision/doc/multiprecision.qbk
711 711 The final template parameters determine the type and range of the exponent: parameter `Exponent` can be 712 712 any signed integer type, but note that `MinExponent` and `MaxExponent` can not go right up to the limits 713 713 of the `Exponent` type as there has to be a little extra headroom for internal calculations. You will 714 get a compile time error if ifthis is the case. In addition if MinExponent or MaxExponent are zero, then714 get a compile time error if this is the case. In addition if MinExponent or MaxExponent are zero, then 715 715 the library will choose suitable values that are as large as possible given the constraints of the type 716 and need for extra head hoom for internal calculations.716 and need for extra headroom for internal calculations. 717 717 718 718 There is full standard library and `numeric_limits` support available for this type. 719 719 … … 729 729 Narrowing conversions round to nearest and are `explicit`. 730 730 * Conversion from a string results in a `std::runtime_error` being thrown if the string can not be interpreted 731 731 as a valid floating point number. 732 * All arithmetic operations are correctly rounded to nearest. String co mversions and the `sqrt` function732 * All arithmetic operations are correctly rounded to nearest. String conversions and the `sqrt` function 733 733 are also correctly rounded, but transcendental functions (sin, cos, pow, exp etc) are not. 734 734 735 735 [h5 cpp_bin_float example:] … … 2204 2204 * If a `double` floating-point number is converted to a decimal string 2205 2205 with at least 17 decimal digits 2206 2206 and then converted back to `double`, 2207 then the result will be binary i ndentical to the original `double` value.2207 then the result will be binary identical to the original `double` value. 2208 2208 2209 2209 For most purposes, you will much more likely want 2210 2210 `std::numeric_limits<>::max_digits10`, … … 2465 2465 [round_error_1] 2466 2466 2467 2467 There are, of course, many occasions when much bigger loss of precision occurs, 2468 for examp e, caused by2468 for example, caused by 2469 2469 [@http://en.wikipedia.org/wiki/Loss_of_significance Loss of significance or cancellation error] 2470 2470 or very many iterations. 2471 2471 … … 2652 2652 2653 2653 std::numeric_limits<T>::is_exact == false 2654 2654 2655 This is because these types are in essen se a rational type with a fixed denominator.2655 This is because these types are in essence a rational type with a fixed denominator. 2656 2656 2657 2657 [h4 Floating Point Types] 2658 2658 … … 2767 2767 for the current rounding direction."]] 2768 2768 2769 2769 So not only is correct rounding for the full number of digits not required, 2770 but even if the *optional* recom ended practice is followed,2770 but even if the *optional* recommended practice is followed, 2771 2771 then the value of these last few digits is unspecified 2772 2772 as long as the value is within certain bounds. 2773 2773 … … 3037 3037 [[Backend][The actual arithmetic back-end that does all the work.]] 3038 3038 [[ExpressionTemplates][A Boolean value: when `et_on`, then expression templates are enabled, otherwise when set to `et_off` they are disabled. 3039 3039 The default for this parameter is computed via the traits class `expression_template_default` whose member `value` defaults to `et_on` unless 3040 the t he traits class is specialized for a particular backend.]]3040 the traits class is specialized for a particular backend.]] 3041 3041 ] 3042 3042 3043 3043 number(); … … 3707 3707 3708 3708 [variablelist 3709 3709 [[Digits][The number of digits precision the type 3710 should support. This is normally expres ed as base-10 digits, but that can be changed via the second template parameter.]]3710 should support. This is normally expressed as base-10 digits, but that can be changed via the second template parameter.]] 3711 3711 [[base][An enumerated value (either `digit_base_10` or `digit_base_2`) that indicates whether `Digits` is base-10 or base-2]] 3712 3712 [[Allocator][The allocator used: defaults to type `void`, meaning all storage is within the class, and no dynamic 3713 3713 allocation is performed, but can be set to a standard library allocator if dynamic allocation makes more sense.]] … … 3761 3761 Binary to decimal conversion proceeds very similarly to the above, our aim is to calculate 3762 3762 `mantissa * 2^shift * 10^E` where `E` is the decimal exponent and `shift` is calculated 3763 3763 so that the result is an N bit integer assuming we want N digits printed in the result. 3764 As before we use limit ted precision arithmetic to calculate the result and up the3764 As before we use limited precision arithmetic to calculate the result and up the 3765 3765 precision as necessary until the result is unambiguously correctly rounded. In addition 3766 3766 our initial calculation of the decimal exponent may be out by 1, so we have to correct 3767 3767 that and loop as well in the that case. … … 4276 4276 [[detail/generic_interconvert.hpp][Generic interconversion routines.]] 4277 4277 [[detail/number_base.hpp][All the expression template code, metaprogramming, and operator overloads for `number`.]] 4278 4278 [[detail/no_et_ops.hpp][The non-expression template operators.]] 4279 [[de fail/functions/constants.hpp][Defines constants used by the floating point functions.]]4279 [[detail/functions/constants.hpp][Defines constants used by the floating point functions.]] 4280 4280 [[detail/functions/pow.hpp][Defines default versions of the power and exponential related floating point functions.]] 4281 4281 [[detail/functions/trig.hpp][Defines default versions of the trigonometric related floating point functions.]] 4282 4282 ]