move docs for nth-root, fix docs for minmax
parent
b318741572
commit
44acd45f2a
|
@ -54,6 +54,8 @@ ARTICLE: "power-functions" "Powers and logarithms"
|
||||||
{ $subsections log1+ log10 }
|
{ $subsections log1+ log10 }
|
||||||
"Raising a number to a power:"
|
"Raising a number to a power:"
|
||||||
{ $subsections ^ 10^ }
|
{ $subsections ^ 10^ }
|
||||||
|
"Finding the root of a number:"
|
||||||
|
{ $subsections nth-root }
|
||||||
"Converting between rectangular and polar form:"
|
"Converting between rectangular and polar form:"
|
||||||
{ $subsections
|
{ $subsections
|
||||||
abs
|
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." }
|
{ $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." } ;
|
{ $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^
|
HELP: 10^
|
||||||
{ $values { "x" number } { "y" number } }
|
{ $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." } ;
|
{ $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." } ;
|
||||||
|
|
|
@ -4,7 +4,7 @@ IN: math.statistics
|
||||||
|
|
||||||
HELP: geometric-mean
|
HELP: geometric-mean
|
||||||
{ $values { "seq" sequence } { "x" "a non-negative real number"} }
|
{ $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" } }
|
{ $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." } ;
|
{ $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 2 3 } minmax 2array ."
|
||||||
"{ 1 3 }"
|
"{ 1 3 }"
|
||||||
}
|
}
|
||||||
{ $example "USING: arrays math.statistics prettyprint ;"
|
|
||||||
"{ 1 2 3 4 } minmax 2array ."
|
|
||||||
"{ 1 4 }"
|
|
||||||
}
|
|
||||||
} ;
|
} ;
|
||||||
|
|
||||||
HELP: std
|
HELP: std
|
||||||
|
|
|
@ -9,10 +9,6 @@ HELP: gammaln
|
||||||
{ $values { "x" number } { "gamma[x]" number } }
|
{ $values { "x" number } { "gamma[x]" number } }
|
||||||
{ $description "An alternative to " { $link gamma } " when gamma(x)'s range varies too widely." } ;
|
{ $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
|
HELP: exp-int
|
||||||
{ $values { "x" number } { "y" number } }
|
{ $values { "x" number } { "y" number } }
|
||||||
{ $description "Exponential integral function." }
|
{ $description "Exponential integral function." }
|
||||||
|
|
Loading…
Reference in New Issue