move docs for nth-root, fix docs for minmax

db4
Doug Coleman 2009-10-30 06:37:02 -05:00
parent b318741572
commit 44acd45f2a
3 changed files with 7 additions and 9 deletions

View File

@ -54,6 +54,8 @@ ARTICLE: "power-functions" "Powers and logarithms"
{ $subsections log1+ log10 }
"Raising a number to a power:"
{ $subsections ^ 10^ }
"Finding the root of a number:"
{ $subsections nth-root }
"Converting between rectangular and polar form:"
{ $subsections
abs
@ -259,6 +261,10 @@ HELP: ^
{ $description "Raises " { $snippet "x" } " to the power of " { $snippet "y" } ". If " { $snippet "y" } " is an integer the answer is computed exactly, otherwise a floating point approximation is used." }
{ $errors "Throws an error if " { $snippet "x" } " and " { $snippet "y" } " are both integer 0." } ;
HELP: nth-root
{ $values { "n" integer } { "x" number } { "y" number } }
{ $description "Calculates the nth root of a number, such that " { $snippet "y^n=x" } "." } ;
HELP: 10^
{ $values { "x" number } { "y" number } }
{ $description "Raises " { $snippet "x" } " to the power of 10. If " { $snippet "x" } " is an integer the answer is computed exactly, otherwise a floating point approximation is used." } ;

View File

@ -4,7 +4,7 @@ IN: math.statistics
HELP: geometric-mean
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
{ $description "Computes the geometric mean of all elements in " { $snippet "seq" } ". The geometric mean measures the central tendency of a data set that minimizes the effects of extreme values." }
{ $description "Computes the geometric mean of all elements in " { $snippet "seq" } ". The geometric mean measures the central tendency of a data set and minimizes the effects of extreme values." }
{ $examples { $example "USING: math.statistics prettyprint ;" "{ 1 2 3 } geometric-mean ." "1.81712059283214" } }
{ $errors "Throws a " { $link signal-error. } " (square-root of 0) if the sequence is empty." } ;
@ -44,10 +44,6 @@ HELP: minmax
"{ 1 2 3 } minmax 2array ."
"{ 1 3 }"
}
{ $example "USING: arrays math.statistics prettyprint ;"
"{ 1 2 3 4 } minmax 2array ."
"{ 1 4 }"
}
} ;
HELP: std

View File

@ -9,10 +9,6 @@ HELP: gammaln
{ $values { "x" number } { "gamma[x]" number } }
{ $description "An alternative to " { $link gamma } " when gamma(x)'s range varies too widely." } ;
HELP: nth-root
{ $values { "n" integer } { "x" number } { "y" number } }
{ $description "Calculates the nth root of a number, such that " { $snippet "y^n=x" } "." } ;
HELP: exp-int
{ $values { "x" number } { "y" number } }
{ $description "Exponential integral function." }