Module Java.lang.Math

Mathematical functions from java.lang.Math.

Functions that are already defined elsewhere, like abs or min have been left out.

This module is not good for inclusion in user code, because of the overloaded primitive functions.

Better use

 import Prelude.Math

which also defines the class Floating that makes it possibly to use the primitive functions in a type safe way.

Imports

Table of Content

Definitions

eDouble
pure native java.lang.Math.E

The Double value that is closer than any other to e, the base of the natural logarithms.

piDouble
pure native java.lang.Math.PI

The Double value that is closer than any other to pi, the ratio of the circumference of a circle to its diameter.

acosFloatDouble
      | DoubleDouble
pure native java.lang.Math.acos

Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.

acos𝖆FloatDouble
pure native java.lang.Math.acos  overloads acos

Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.

acos𝖇DoubleDouble
pure native java.lang.Math.acos  overloads acos

Returns the arc cosine of a value; the returned angle is in the range 0.0 through pi.

asinFloatDouble
      | DoubleDouble
pure native java.lang.Math.asin

Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2.

asin𝖆FloatDouble
pure native java.lang.Math.asin  overloads asin

Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2.

asin𝖇DoubleDouble
pure native java.lang.Math.asin  overloads asin

Returns the arc sine of a value; the returned angle is in the range -pi/2 through pi/2.

atanFloatDouble
      | DoubleDouble
pure native java.lang.Math.atan

Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2.

atan𝖆FloatDouble
pure native java.lang.Math.atan  overloads atan

Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2.

atan𝖇DoubleDouble
pure native java.lang.Math.atan  overloads atan

Returns the arc tangent of a value; the returned angle is in the range -pi/2 through pi/2.

atan2DoubleDoubleDouble
       | FloatFloatDouble
pure native java.lang.Math.atan2

Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).

atan2𝖆DoubleDoubleDouble
pure native java.lang.Math.atan2  overloads atan2

Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).

atan2𝖇FloatFloatDouble
pure native java.lang.Math.atan2  overloads atan2

Returns the angle theta from the conversion of rectangular coordinates (x, y) to polar coordinates (r, theta).

cbrtDoubleDouble
      | FloatDouble
pure native java.lang.Math.cbrt

Returns the cube root of a value.

cbrt𝖆DoubleDouble
pure native java.lang.Math.cbrt  overloads cbrt

Returns the cube root of a value.

cbrt𝖇FloatDouble
pure native java.lang.Math.cbrt  overloads cbrt

Returns the cube root of a value.

ceilDoubleDouble
      | FloatDouble
pure native java.lang.Math.ceil

Returns the smallest (closest to negative infinity) value that is greater than or equal to the argument and is equal to a mathematical integer.

ceil𝖆DoubleDouble
pure native java.lang.Math.ceil  overloads ceil

Returns the smallest (closest to negative infinity) value that is greater than or equal to the argument and is equal to a mathematical integer.

ceil𝖇FloatDouble
pure native java.lang.Math.ceil  overloads ceil

Returns the smallest (closest to negative infinity) value that is greater than or equal to the argument and is equal to a mathematical integer.

copySignDoubleDoubleDouble
          | FloatFloatFloat
pure native java.lang.Math.copySign

Returns the first argument with the sign of the second argument.

copySign𝖆DoubleDoubleDouble
pure native java.lang.Math.copySign  overloads copySign

Returns the first argument with the sign of the second argument.

copySign𝖇FloatFloatFloat
pure native java.lang.Math.copySign  overloads copySign

Returns the first argument with the sign of the second argument.

cosDoubleDouble
     | FloatDouble
pure native java.lang.Math.cos

Returns the trigonometric cosine of an angle.

cos𝖆DoubleDouble
pure native java.lang.Math.cos  overloads cos

Returns the trigonometric cosine of an angle.

cos𝖇FloatDouble
pure native java.lang.Math.cos  overloads cos

Returns the trigonometric cosine of an angle.

coshDoubleDouble
      | FloatDouble
pure native java.lang.Math.cosh

Returns the hyperbolic cosine of a floating point value.

cosh𝖆DoubleDouble
pure native java.lang.Math.cosh  overloads cosh

Returns the hyperbolic cosine of a floating point value.

cosh𝖇FloatDouble
pure native java.lang.Math.cosh  overloads cosh

Returns the hyperbolic cosine of a floating point value.

expDoubleDouble
     | FloatDouble
pure native java.lang.Math.exp

Returns Euler's number e raised to the power of a floating-point value.

exp𝖆DoubleDouble
pure native java.lang.Math.exp  overloads exp

Returns Euler's number e raised to the power of a floating-point value.

exp𝖇FloatDouble
pure native java.lang.Math.exp  overloads exp

Returns Euler's number e raised to the power of a floating-point value.

expm1DoubleDouble
       | FloatDouble
pure native java.lang.Math.expm1

Returns e^x -1.

expm1𝖆DoubleDouble
pure native java.lang.Math.expm1  overloads expm1

Returns e^x -1.

expm1𝖇FloatDouble
pure native java.lang.Math.expm1  overloads expm1

Returns e^x -1.

floorDoubleDouble
       | FloatDouble
pure native java.lang.Math.floor

Returns the largest (closest to positive infinity) value that is less than or equal to the argument and is equal to a mathematical integer.

Special cases:

floor𝖆DoubleDouble
pure native java.lang.Math.floor  overloads floor

Returns the largest (closest to positive infinity) value that is less than or equal to the argument and is equal to a mathematical integer.

Special cases:

floor𝖇FloatDouble
pure native java.lang.Math.floor  overloads floor

Returns the largest (closest to positive infinity) value that is less than or equal to the argument and is equal to a mathematical integer.

Special cases:

getExponentDoubleInt
             | FloatInt
pure native java.lang.Math.getExponent

Returns the unbiased exponent used in the representation of a floating point number.

getExponent𝖆DoubleInt
pure native java.lang.Math.getExponent  overloads getExponent

Returns the unbiased exponent used in the representation of a floating point number.

getExponent𝖇FloatInt
pure native java.lang.Math.getExponent  overloads getExponent

Returns the unbiased exponent used in the representation of a floating point number.

hypotDoubleDoubleDouble
       | FloatFloatDouble
pure native java.lang.Math.hypot

Returns sqrt (x² + y²) without intermediate overflow or underflow.

hypot𝖆DoubleDoubleDouble
pure native java.lang.Math.hypot  overloads hypot

Returns sqrt (x² + y²) without intermediate overflow or underflow.

hypot𝖇FloatFloatDouble
pure native java.lang.Math.hypot  overloads hypot

Returns sqrt (x² + y²) without intermediate overflow or underflow.

ieeeRemainderDoubleDoubleDouble
               | FloatFloatDouble
pure native java.lang.Math.IEEEremainder

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.

ieeeRemainder𝖆DoubleDoubleDouble
pure native java.lang.Math.IEEEremainder  overloads ieeeRemainder

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.

ieeeRemainder𝖇FloatFloatDouble
pure native java.lang.Math.IEEEremainder  overloads ieeeRemainder

Computes the remainder operation on two arguments as prescribed by the IEEE 754 standard.

logDoubleDouble
     | FloatDouble
pure native java.lang.Math.log

Returns the natural logarithm (base e) of a value.

log𝖆DoubleDouble
pure native java.lang.Math.log  overloads log

Returns the natural logarithm (base e) of a value.

log𝖇FloatDouble
pure native java.lang.Math.log  overloads log

Returns the natural logarithm (base e) of a value.

log10DoubleDouble
       | FloatDouble
pure native java.lang.Math.log10

Returns the base 10 logarithm of a value.

log10𝖆DoubleDouble
pure native java.lang.Math.log10  overloads log10

Returns the base 10 logarithm of a value.

log10𝖇FloatDouble
pure native java.lang.Math.log10  overloads log10

Returns the base 10 logarithm of a value.

log1pDoubleDouble
       | FloatDouble
pure native java.lang.Math.log1p

Returns the natural logarithm of the sum of the argument and 1.

log1p𝖆DoubleDouble
pure native java.lang.Math.log1p  overloads log1p

Returns the natural logarithm of the sum of the argument and 1.

log1p𝖇FloatDouble
pure native java.lang.Math.log1p  overloads log1p

Returns the natural logarithm of the sum of the argument and 1.

nextAfterDoubleDoubleDouble
           | FloatFloatDouble
pure native java.lang.Math.nextAfter

Returns the floating-point number adjacent to the first argument in the direction of the second argument.

nextAfter𝖆DoubleDoubleDouble
pure native java.lang.Math.nextAfter  overloads nextAfter

Returns the floating-point number adjacent to the first argument in the direction of the second argument.

nextAfter𝖇FloatFloatDouble
pure native java.lang.Math.nextAfter  overloads nextAfter

Returns the floating-point number adjacent to the first argument in the direction of the second argument.

nextUpDoubleDouble
        | FloatFloat
pure native java.lang.Math.nextUp

Returns the floating-point value adjacent to the argument in the direction of positive infinity.

nextUp𝖆DoubleDouble
pure native java.lang.Math.nextUp  overloads nextUp

Returns the floating-point value adjacent to the argument in the direction of positive infinity.

nextUp𝖇FloatFloat
pure native java.lang.Math.nextUp  overloads nextUp

Returns the floating-point value adjacent to the argument in the direction of positive infinity.

**DoubleDoubleDouble
    | FloatFloatDouble
pure native java.lang.Math.pow
infixr  15

Returns the value of the first argument raised to the power of the second argument.

**𝖆DoubleDoubleDouble
pure native java.lang.Math.pow  overloads **
infixr  15

Returns the value of the first argument raised to the power of the second argument.

**𝖇FloatFloatDouble
pure native java.lang.Math.pow  overloads **
infixr  15

Returns the value of the first argument raised to the power of the second argument.

powDoubleDoubleDouble
     | FloatFloatDouble
pure native java.lang.Math.pow

Returns the value of the first argument raised to the power of the second argument.

pow𝖆DoubleDoubleDouble
pure native java.lang.Math.pow  overloads pow

Returns the value of the first argument raised to the power of the second argument.

pow𝖇FloatFloatDouble
pure native java.lang.Math.pow  overloads pow

Returns the value of the first argument raised to the power of the second argument.

rintDoubleDouble
      | FloatDouble
pure native java.lang.Math.rint

Returns the Double value that is closest in value to the argument and is equal to a mathematical integer.

rint𝖆DoubleDouble
pure native java.lang.Math.rint  overloads rint

Returns the Double value that is closest in value to the argument and is equal to a mathematical integer.

rint𝖇FloatDouble
pure native java.lang.Math.rint  overloads rint

Returns the Double value that is closest in value to the argument and is equal to a mathematical integer.

roundDoubleLong
       | FloatLong
pure native java.lang.Math.round

Returns the closest Long to the argument, with ties rounding up.

round𝖆DoubleLong
pure native java.lang.Math.round  overloads round

Returns the closest Long to the argument, with ties rounding up.

round𝖇FloatLong
pure native java.lang.Math.round  overloads round

Returns the closest Long to the argument, with ties rounding up.

scalbDoubleIntDouble
       | FloatIntFloat
pure native java.lang.Math.scalb
 scalb d scaleFactor

Return d * 2^scaleFactor rounded as if performed by a single correctly rounded floating-point multiply.

scalb𝖆DoubleIntDouble
pure native java.lang.Math.scalb  overloads scalb
 scalb d scaleFactor

Return d * 2^scaleFactor rounded as if performed by a single correctly rounded floating-point multiply.

scalb𝖇FloatIntFloat
pure native java.lang.Math.scalb  overloads scalb
 scalb d scaleFactor

Return d * 2^scaleFactor rounded as if performed by a single correctly rounded floating-point multiply.

signumDoubleDouble
        | FloatFloat
pure native java.lang.Math.signum

Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.

signum𝖆DoubleDouble
pure native java.lang.Math.signum  overloads signum

Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.

signum𝖇FloatFloat
pure native java.lang.Math.signum  overloads signum

Returns the signum function of the argument; zero if the argument is zero, 1.0 if the argument is greater than zero, -1.0 if the argument is less than zero.

sinDoubleDouble
     | FloatDouble
pure native java.lang.Math.sin

Returns the trigonometric sine of an angle.

sin𝖆DoubleDouble
pure native java.lang.Math.sin  overloads sin

Returns the trigonometric sine of an angle.

sin𝖇FloatDouble
pure native java.lang.Math.sin  overloads sin

Returns the trigonometric sine of an angle.

sinhDoubleDouble
      | FloatDouble
pure native java.lang.Math.sinh

Returns the hyperbolic sine of a value.

sinh𝖆DoubleDouble
pure native java.lang.Math.sinh  overloads sinh

Returns the hyperbolic sine of a value.

sinh𝖇FloatDouble
pure native java.lang.Math.sinh  overloads sinh

Returns the hyperbolic sine of a value.

sqrtDoubleDouble
      | FloatDouble
pure native java.lang.Math.sqrt

Returns the correctly rounded positive square root of a value.

sqrt𝖆DoubleDouble
pure native java.lang.Math.sqrt  overloads sqrt

Returns the correctly rounded positive square root of a value.

sqrt𝖇FloatDouble
pure native java.lang.Math.sqrt  overloads sqrt

Returns the correctly rounded positive square root of a value.

tanDoubleDouble
     | FloatDouble
pure native java.lang.Math.tan

Returns the trigonometric tangent of an angle.

tan𝖆DoubleDouble
pure native java.lang.Math.tan  overloads tan

Returns the trigonometric tangent of an angle.

tan𝖇FloatDouble
pure native java.lang.Math.tan  overloads tan

Returns the trigonometric tangent of an angle.

tanhDoubleDouble
      | FloatDouble
pure native java.lang.Math.tanh

Returns the hyperbolic tangent of a floating point value.

tanh𝖆DoubleDouble
pure native java.lang.Math.tanh  overloads tanh

Returns the hyperbolic tangent of a floating point value.

tanh𝖇FloatDouble
pure native java.lang.Math.tanh  overloads tanh

Returns the hyperbolic tangent of a floating point value.

toDegreesDoubleDouble
           | FloatDouble
pure native java.lang.Math.toDegrees

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

toDegrees𝖆DoubleDouble
pure native java.lang.Math.toDegrees  overloads toDegrees

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

toDegrees𝖇FloatDouble
pure native java.lang.Math.toDegrees  overloads toDegrees

Converts an angle measured in radians to an approximately equivalent angle measured in degrees.

toRadiansDoubleDouble
           | FloatDouble
pure native java.lang.Math.toRadians

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

toRadians𝖆DoubleDouble
pure native java.lang.Math.toRadians  overloads toRadians

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

toRadians𝖇FloatDouble
pure native java.lang.Math.toRadians  overloads toRadians

Converts an angle measured in degrees to an approximately equivalent angle measured in radians.

ulpDoubleDouble
     | FloatFloat
pure native java.lang.Math.ulp

Returns the size of an ulp of the argument.

ulp𝖆DoubleDouble
pure native java.lang.Math.ulp  overloads ulp

Returns the size of an ulp of the argument.

ulp𝖇FloatFloat
pure native java.lang.Math.ulp  overloads ulp

Returns the size of an ulp of the argument.

Functions and Values by Type

DoubleDoubleDouble

**𝖆, atan2𝖆, copySign𝖆, hypot𝖆, ieeeRemainder𝖆, nextAfter𝖆, pow𝖆

DoubleIntDouble

scalb𝖆

DoubleDouble

acos𝖇, asin𝖇, atan𝖇, cbrt𝖆, ceil𝖆, cosh𝖆, cos𝖆, expm1𝖆, exp𝖆, floor𝖆, log10𝖆, log1p𝖆, log𝖆, nextUp𝖆, rint𝖆, signum𝖆, sinh𝖆, sin𝖆, sqrt𝖆, tanh𝖆, tan𝖆, toDegrees𝖆, toRadians𝖆, ulp𝖆

DoubleInt

getExponent𝖆

DoubleLong

round𝖆

FloatFloatDouble

**𝖇, atan2𝖇, hypot𝖇, ieeeRemainder𝖇, nextAfter𝖇, pow𝖇

FloatFloatFloat

copySign𝖇

FloatIntFloat

scalb𝖇

FloatDouble

acos𝖆, asin𝖆, atan𝖆, cbrt𝖇, ceil𝖇, cosh𝖇, cos𝖇, expm1𝖇, exp𝖇, floor𝖇, log10𝖇, log1p𝖇, log𝖇, rint𝖇, sinh𝖇, sin𝖇, sqrt𝖇, tanh𝖇, tan𝖇, toDegrees𝖇, toRadians𝖇

FloatFloat

nextUp𝖇, signum𝖇, ulp𝖇

FloatInt

getExponent𝖇

FloatLong

round𝖇

Double

e, pi

ω

**, acos, asin, atan, atan2, cbrt, ceil, copySign, cos, cosh, exp, expm1, floor, getExponent, hypot, ieeeRemainder, log, log10, log1p, nextAfter, nextUp, pow, rint, round, scalb, signum, sin, sinh, sqrt, tan, tanh, toDegrees, toRadians, ulp

Valid HTML 4.01 Strict