Math

ruby/spec describes 52 methods in core/math, and Metorex implements 52 of them. The parameters are what Method#parameters answers under Metorex.

  • Math#acos: implemented, parameters [[:req, :x]]. Returns the arc cosine of x.
  • Math.acos: implemented, parameters [[:req, :x]]. Returns the arc cosine of x.
  • Math#acosh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic cosine of x.
  • Math.acosh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic cosine of x.
  • Math#asin: implemented, parameters [[:req, :x]]. Returns the arc sine of x.
  • Math.asin: implemented, parameters [[:req, :x]]. Returns the arc sine of x.
  • Math#asinh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic sine of x.
  • Math.asinh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic sine of x.
  • Math#atan: implemented, parameters [[:req, :x]]. Returns the arc tangent of x.
  • Math.atan: implemented, parameters [[:req, :x]]. Returns the arc tangent of x.
  • Math#atan2: implemented, parameters [[:req, :y], [:req, :x]]. Returns the arc tangent of y and x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.atan2: implemented, parameters [[:req, :y], [:req, :x]]. Returns the arc tangent of y and x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#atanh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic tangent of x.
  • Math.atanh: implemented, parameters [[:req, :x]]. Returns the inverse hyperbolic tangent of x.
  • Math.cbrt: implemented, parameters [[:req, :x]]. Returns the cube root of x. An example calling it.
  • Math#cos: implemented, parameters [[:req, :x]]. Returns the cosine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.cos: implemented, parameters [[:req, :x]]. Returns the cosine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#cosh: implemented, parameters [[:req, :x]]. Returns the hyperbolic cosine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.cosh: implemented, parameters [[:req, :x]]. Returns the hyperbolic cosine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#erf: implemented, parameters [[:req, :x]]. Returns the value of the Gauss error function for x.
  • Math.erf: implemented, parameters [[:req, :x]]. Returns the value of the Gauss error function for x.
  • Math#erfc: implemented, parameters [[:req, :x]]. Returns the value of the [complementary error function](https://en.wikipedia.org/wiki/Error_function#Complementary_error_fun ction) for x.
  • Math.erfc: implemented, parameters [[:req, :x]]. Returns the value of the [complementary error function](https://en.wikipedia.org/wiki/Error_function#Complementary_error_fun ction) for x.
  • Math#exp: implemented, parameters [[:req, :x]]. Returns e raised to the x power. An example calling it.
  • Math.exp: implemented, parameters [[:req, :x]]. Returns e raised to the x power. An example calling it.
  • Math#expm1: implemented, parameters [[:req, :x]]. Returns "exp(x) - 1", e raised to the x power, minus 1.
  • Math.expm1: implemented, parameters [[:req, :x]]. Returns "exp(x) - 1", e raised to the x power, minus 1.
  • Math#frexp: implemented, parameters [[:req, :x]]. Returns a 2-element array containing the normalized signed float fraction and integer exponent of x such that: An example calling it.
  • Math.frexp: implemented, parameters [[:req, :x]]. Returns a 2-element array containing the normalized signed float fraction and integer exponent of x such that: An example calling it.
  • Math.gamma: implemented, parameters [[:req, :x]]. Returns the value of the gamma function for x.
  • Math#hypot: implemented, parameters [[:req, :x], [:req, :y]]. Returns sqrt(a2 + b2), which is the length of the longest side c (the hypotenuse) of the right triangle whose other sides have lengths a and b. An example calling it.
  • Math.hypot: implemented, parameters [[:req, :x], [:req, :y]]. Returns sqrt(a2 + b2), which is the length of the longest side c (the hypotenuse) of the right triangle whose other sides have lengths a and b. An example calling it.
  • Math#ldexp: implemented, parameters [[:req, :fraction], [:req, :exponent]]. Returns the value of fraction * 2**exponent. An example calling it.
  • Math.ldexp: implemented, parameters [[:req, :fraction], [:req, :exponent]]. Returns the value of fraction * 2**exponent. An example calling it.
  • Math.lgamma: implemented, parameters [[:req, :x]]. Returns a 2-element array equivalent to: An example calling it.
  • Math#log: implemented, parameters [[:req, :x], [:rest, :base]]. Returns the base base logarithm of x. An example calling it.
  • Math.log: implemented, parameters [[:req, :x], [:rest, :base]]. Returns the base base logarithm of x. An example calling it.
  • Math#log10: implemented, parameters [[:req, :x]]. Returns the base 10 logarithm of x. An example calling it.
  • Math.log10: implemented, parameters [[:req, :x]]. Returns the base 10 logarithm of x. An example calling it.
  • Math#log1p: implemented, parameters [[:req, :x]]. Returns "log(x + 1)", the base E logarithm of (x + 1).
  • Math.log1p: implemented, parameters [[:req, :x]]. Returns "log(x + 1)", the base E logarithm of (x + 1).
  • Math.log2: implemented, parameters [[:req, :x]]. Returns the base 2 logarithm of x. An example calling it.
  • Math#sin: implemented, parameters [[:req, :x]]. Returns the sine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.sin: implemented, parameters [[:req, :x]]. Returns the sine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#sinh: implemented, parameters [[:req, :x]]. Returns the hyperbolic sine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.sinh: implemented, parameters [[:req, :x]]. Returns the hyperbolic sine of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#sqrt: implemented, parameters [[:req, :x]]. Returns the principal (non-negative) square root of x. An example calling it.
  • Math.sqrt: implemented, parameters [[:req, :x]]. Returns the principal (non-negative) square root of x. An example calling it.
  • Math#tan: implemented, parameters [[:req, :x]]. Returns the tangent of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.tan: implemented, parameters [[:req, :x]]. Returns the tangent of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math#tanh: implemented, parameters [[:req, :x]]. Returns the hyperbolic tangent of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).
  • Math.tanh: implemented, parameters [[:req, :x]]. Returns the hyperbolic tangent of x in [radians](https://en.wikipedia.org/wiki/Trigonometric_functions#Radians_versus _degrees).

The method summaries are the first sentences of Ruby's own documentation for each method, read from MRI 4.0.6's ri data. Ruby's documentation is distributed under Ruby's license.