Imported Upstream version 1.72.0
[platform/upstream/boost.git] / libs / math / doc / sf / factorials.qbk
index a4f8100..7e6a986 100644 (file)
@@ -112,7 +112,7 @@ the main tests for the __tgamma function handle those cases already.
 The factorial function is table driven for small arguments, and is
 implemented in terms of __tgamma for larger arguments.
 
-[endsect]
+[endsect] [/section:sf_factorial Factorial]
 
 [section:sf_double_factorial Double Factorial]
 
@@ -175,23 +175,22 @@ of epsilon higher.
 
 [h4 Testing]
 
-The spot tests for the double factorial use data 
-generated by functions.wolfram.com.
+The spot tests for the double factorial use data generated by __WolframAlpha.
 
 [h4 Implementation]
 
 The double factorial is implemented in terms of the factorial and gamma
 functions using the relations:
 
-(2n)!! = 2[super n ] * n!
+[expression ['(2n)!! = 2[super n ] * n!]]
 
-(2n+1)!! = (2n+1)! / (2[super n ] n!)
+[expression ['(2n+1)!! = (2n+1)! / (2[super n ] n!)]]
 
 and
 
-(2n-1)!! = [Gamma]((2n+1)/2) * 2[super n ] / sqrt(pi)
+[expression ['(2n-1)!! = [Gamma]((2n+1)/2) * 2[super n ] / sqrt(pi)]]
 
-[endsect]
+[endsect] [/section:sf_double_factorial Double Factorial]
 
 [section:sf_rising_factorial Rising Factorial]
 
@@ -211,11 +210,11 @@ and
 
 Returns the rising factorial of /x/ and /i/:
 
-rising_factorial(x, i) = [Gamma](x + i) / [Gamma](x);
+[expression ['rising_factorial(x, i) = [Gamma](x + i) / [Gamma](x)]]
 
 or
 
-rising_factorial(x, i) = x(x+1)(x+2)(x+3)...(x+i-1)
+[expression ['rising_factorial(x, i) = x(x+1)(x+2)(x+3)...(x+i-1)]]
                           
 Note that both /x/ and /i/ can be negative as well as positive.
 
@@ -235,16 +234,14 @@ the __tgamma_delta_ratio function.
 
 [h4 Testing]
 
-The spot tests for the rising factorials use data generated 
-by functions.wolfram.com.
+The spot tests for the rising factorials use data generated by __Wolfram_functions.
 
 [h4 Implementation]
 
-Rising and falling factorials are implemented as ratios of gamma functions
-using __tgamma_delta_ratio.  Optimisations for
-small integer arguments are handled internally by that function.
+Rising and factorials are implemented as ratios of gamma functions using __tgamma_delta_ratio. 
+Optimisations for small integer arguments are handled internally by that function.
 
-[endsect]
+[endsect] [/section:sf_rising_factorial Rising Factorial]
 
 [section:sf_falling_factorial Falling Factorial]
 
@@ -264,7 +261,7 @@ small integer arguments are handled internally by that function.
 
 Returns the falling factorial of /x/ and /i/:
 
-falling_factorial(x, i) = x(x-1)(x-2)(x-3)...(x-i+1)
+[expression ['falling_factorial(x, i) = x(x-1)(x-2)(x-3)...(x-i+1)]]
    
 Note that this function is only defined for positive /i/, hence the
 `unsigned` second argument.  Argument /x/ can be either positive or
@@ -286,8 +283,7 @@ the __tgamma_delta_ratio function.
 
 [h4 Testing]
 
-The spot tests for the falling factorials use data generated by 
-functions.wolfram.com.
+The spot tests for the falling factorials use data generated by __Wolfram_functions.
 
 [h4 Implementation]
 
@@ -295,7 +291,7 @@ Rising and falling factorials are implemented as ratios of gamma functions
 using __tgamma_delta_ratio.  Optimisations for
 small integer arguments are handled internally by that function.
 
-[endsect]
+[endsect] [/section:sf_falling_factorial Falling Factorial]
 
 [section:sf_binomial Binomial Coefficients]
 
@@ -323,7 +319,7 @@ May return the result of __overflow_error if the result is too large
 to represent in type T.
    
 [important
-The functions described above are templates where the template argument T can not be deduced from the
+The functions described above are templates where the template argument `T` can not be deduced from the
 arguments passed to the function.  Therefore if you write something like:
 
    `boost::math::binomial_coefficient(10, 2);`
@@ -345,28 +341,26 @@ and the __beta function for larger arguments.
 
 [h4 Testing]
 
-The spot tests for the binomial coefficients use data 
-generated by functions.wolfram.com.
+The spot tests for the binomial coefficients use data generated by __WolframAlpha.
 
 [h4 Implementation]
 
 Binomial coefficients are calculated using table lookup of factorials
 where possible using:
 
-[sub n]C[sub k] = n! / (k!(n-k)!)
+[expression ['[sub n]C[sub k] = n! / (k!(n-k)!)]]
 
 Otherwise it is implemented in terms of the beta function using the relations:
 
-[sub n]C[sub k] = 1 / (k * __beta(k, n-k+1))
+[expression ['[sub n]C[sub k] = 1 / (k * __beta(k, n-k+1))]]
 
 and
 
-[sub n]C[sub k] = 1 / ((n-k) * __beta(k+1, n-k))
-
-[endsect]
+[expression ['[sub n]C[sub k] = 1 / ((n-k) * __beta(k+1, n-k))]]
 
+[endsect] [/section:sf_binomial Binomial Coefficients]
 
-[endsect][/section:factorials Factorials]
+[endsect] [/section:factorials Factorials]
 
 [/ 
   Copyright 2006, 2010 John Maddock and Paul A. Bristow.