Scoop API

scoop:scoop.math:0.1.0

scoop.math

API

  • class BigDecimal

    An immutable arbitrary-precision decimal, coefficient * 10^(-scale). Equality and hashing compare numerical values, ignoring scale; sameRepresentation compares stored representations.

  • class BigInteger

    An immutable arbitrary-precision signed integer with infinite two's-complement bit semantics.

  • property E

    The base of the natural logarithm, rounded to binary64.

  • struct MathContext

    Decimal significant-digit precision and explicit rounding; zero precision requires exact results.

  • property PI

    The circumference to diameter ratio, rounded to binary64.

  • enum RoundingMode

    Selects how an inexact decimal result is rounded.

  • property TAU

    The circumference to radius ratio, rounded to binary64.

  • function abs

    Clears the sign bit, retaining every other bit including NaN payloads.

  • function absExact

    Returns the absolute value, throwing for the minimum integer.

  • function acos

    Evaluates acos at the operand precision using the target math library.

  • function addExact

    Computes the exact result, throwing ArithmeticException on overflow.

  • function asin

    Evaluates asin at the operand precision using the target math library.

  • function atan

    Evaluates atan at the operand precision using the target math library.

  • function atan2

    Evaluates atan2 at the operand precision using the target math library.

  • function cbrt

    Evaluates cbrt at the operand precision using the target math library.

  • function ceil

    Evaluates ceil at the operand precision using the target math library.

  • function ceilDiv

    Divides toward positive infinity; minimum divided by minus one wraps.

  • function ceilDivExact

    Divides toward positive infinity; overflow throws.

  • function ceilMod

    Returns the remainder corresponding to ceil division; zero divisor throws.

  • function clamp

    Clamps to inclusive bounds; reversed bounds throw IllegalArgumentException.

  • function copySign

    Copies only the sign bit from sign into magnitude.

  • function cos

    Evaluates cos at the operand precision using the target math library.

  • function cosh

    Evaluates cosh at the operand precision using the target math library.

  • function decrementExact

    Subtracts one with overflow checking.

  • function divideExact

    Divides toward zero, throwing on zero divisor or overflow.

  • function exp

    Evaluates exp at the operand precision using the target math library.

  • function expm1

    Evaluates expm1 at the operand precision using the target math library.

  • function floor

    Evaluates floor at the operand precision using the target math library.

  • function floorDiv

    Divides toward negative infinity; minimum divided by minus one wraps.

  • function floorDivExact

    Divides toward negative infinity; overflow throws.

  • function floorMod

    Returns the remainder corresponding to floor division; zero divisor throws.

  • function fma

    Calls the system fma, retaining its rounding behavior.

  • function getExponent

    Returns the unbiased exponent; zero/subnormal and nonfinite values use boundary sentinels.

  • function hypot

    Evaluates hypot at the operand precision using the target math library.

  • function ieeeRemainder

    Returns the IEEE remainder with a nearest-even integer quotient.

  • function incrementExact

    Adds one with overflow checking.

  • function log

    Evaluates log at the operand precision using the target math library.

  • function log10

    Evaluates log10 at the operand precision using the target math library.

  • function log1p

    Evaluates log1p at the operand precision using the target math library.

  • function max

    Returns the larger value, propagating NaN and ordering negative zero first.

  • function min

    Returns the smaller value.

  • function multiplyExact

    Multiplies exactly, throwing ArithmeticException on overflow.

  • function multiplyFull

    Returns the complete unsigned product.

  • function multiplyHigh

    Returns the high word of the unsigned 128-bit product.

  • function negateExact

    Negates with overflow checking.

  • function nextAfter

    Returns the neighbor toward direction; equal inputs return direction including its zero sign.

  • function nextDown

    Returns the adjacent representable value toward negative infinity.

  • function nextUp

    Returns the adjacent representable value toward positive infinity.

  • function pow

    Raises x to y using the target math library's special-value rules.

  • function powExact

    Raises to a nonnegative power with overflow checking; zero to zero is one.

  • function rint

    Rounds to an integral floating value with ties to even.

  • function round

    Rounds to the nearest integer with ties toward positive infinity; overflow saturates and NaN becomes zero.

  • function scalb

    Scales by an exact power of two with one final rounding.

  • function signum

    Returns signed one, preserving signed zero and propagating NaN.

  • function sin

    Evaluates sin at the operand precision using the target math library.

  • function sinh

    Evaluates sinh at the operand precision using the target math library.

  • function sqrt

    Returns the correctly rounded square root, preserving negative zero.

  • function subtractExact

    Computes the exact result, throwing ArithmeticException on overflow.

  • function tan

    Evaluates tan at the operand precision using the target math library.

  • function tanh

    Evaluates tanh at the operand precision using the target math library.

  • function toBigDecimal

    Converts the mathematical integer exactly at scale zero.

  • function toBigDecimalOrNone

    Returns None for malformed decimal text or an unrepresentable scale.

  • function toBigInteger

    Converts the mathematical integer exactly.

  • function toBigIntegerOrNone

    Returns None for malformed digits; an invalid radix still throws IllegalArgumentException.

  • function toDegrees

    Converts angle units using a coefficient rounded directly to the operand precision.

  • function toIntExact

    Narrows a Long exactly, throwing ArithmeticException outside Int range.

  • function toRadians

    Converts angle units using a coefficient rounded directly to the operand precision.

  • function ulp

    Returns the spacing at the magnitude of x, with IEEE zero and nonfinite handling.