diff --git a/basis/math/functions/functions-docs.factor b/basis/math/functions/functions-docs.factor index 1939de4f97..5f7c066efa 100644 --- a/basis/math/functions/functions-docs.factor +++ b/basis/math/functions/functions-docs.factor @@ -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." } ; diff --git a/basis/math/statistics/statistics-docs.factor b/basis/math/statistics/statistics-docs.factor index 3ce5a62b9a..9e812d94ca 100644 --- a/basis/math/statistics/statistics-docs.factor +++ b/basis/math/statistics/statistics-docs.factor @@ -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 diff --git a/extra/math/analysis/analysis-docs.factor b/extra/math/analysis/analysis-docs.factor index a810ffc1bd..586a6d4971 100644 --- a/extra/math/analysis/analysis-docs.factor +++ b/extra/math/analysis/analysis-docs.factor @@ -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." }