diff options
| -rw-r--r-- | api/api.md | 406 | ||||
| -rw-r--r-- | api/floats.md | 406 | ||||
| -rw-r--r-- | api/floats.yaml | 394 | ||||
| -rw-r--r-- | man/man3/tomo-Float.1_PI.3 (renamed from man/man3/tomo-Float64.1_PI.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.2_PI.3 (renamed from man/man3/tomo-Float64.2_PI.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.2_SQRTPI.3 (renamed from man/man3/tomo-Float64.2_SQRTPI.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.3 | 523 | ||||
| -rw-r--r-- | man/man3/tomo-Float.E.3 (renamed from man/man3/tomo-Float64.E.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.INF.3 (renamed from man/man3/tomo-Float64.INF.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.LN10.3 (renamed from man/man3/tomo-Float64.LN10.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.LN2.3 (renamed from man/man3/tomo-Float64.LN2.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.LOG2E.3 (renamed from man/man3/tomo-Float64.LOG2E.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.PI.3 (renamed from man/man3/tomo-Float64.PI.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.PI_2.3 (renamed from man/man3/tomo-Float64.PI_2.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.PI_4.3 (renamed from man/man3/tomo-Float64.PI_4.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.SQRT1_2.3 (renamed from man/man3/tomo-Float64.SQRT1_2.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.SQRT2.3 (renamed from man/man3/tomo-Float64.SQRT2.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.TAU.3 (renamed from man/man3/tomo-Float64.TAU.3) | 8 | ||||
| -rw-r--r-- | man/man3/tomo-Float.abs.3 (renamed from man/man3/tomo-Float64.abs.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.acos.3 (renamed from man/man3/tomo-Float64.acos.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.acosh.3 (renamed from man/man3/tomo-Float64.acosh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.asin.3 (renamed from man/man3/tomo-Float64.asin.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.asinh.3 (renamed from man/man3/tomo-Float64.asinh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.atan.3 (renamed from man/man3/tomo-Float64.atan.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.atan2.3 (renamed from man/man3/tomo-Float64.atan2.3) | 14 | ||||
| -rw-r--r-- | man/man3/tomo-Float.atanh.3 (renamed from man/man3/tomo-Float64.atanh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.cbrt.3 (renamed from man/man3/tomo-Float64.cbrt.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.ceil.3 (renamed from man/man3/tomo-Float64.ceil.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.clamped.3 (renamed from man/man3/tomo-Float64.clamped.3) | 14 | ||||
| -rw-r--r-- | man/man3/tomo-Float.copysign.3 (renamed from man/man3/tomo-Float64.copysign.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.cos.3 (renamed from man/man3/tomo-Float64.cos.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.cosh.3 (renamed from man/man3/tomo-Float64.cosh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.erf.3 (renamed from man/man3/tomo-Float64.erf.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.erfc.3 (renamed from man/man3/tomo-Float64.erfc.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.exp.3 (renamed from man/man3/tomo-Float64.exp.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.exp2.3 (renamed from man/man3/tomo-Float64.exp2.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.expm1.3 (renamed from man/man3/tomo-Float64.expm1.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.fdim.3 (renamed from man/man3/tomo-Float64.fdim.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.floor.3 (renamed from man/man3/tomo-Float64.floor.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.hypot.3 (renamed from man/man3/tomo-Float64.hypot.3) | 14 | ||||
| -rw-r--r-- | man/man3/tomo-Float.is_between.3 (renamed from man/man3/tomo-Float64.is_between.3) | 14 | ||||
| -rw-r--r-- | man/man3/tomo-Float.isfinite.3 (renamed from man/man3/tomo-Float64.isfinite.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.isinf.3 (renamed from man/man3/tomo-Float64.isinf.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.j0.3 (renamed from man/man3/tomo-Float64.j0.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.j1.3 (renamed from man/man3/tomo-Float64.j1.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.log.3 (renamed from man/man3/tomo-Float64.log.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.log10.3 (renamed from man/man3/tomo-Float64.log10.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.log1p.3 (renamed from man/man3/tomo-Float64.log1p.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.log2.3 (renamed from man/man3/tomo-Float64.log2.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.logb.3 (renamed from man/man3/tomo-Float64.logb.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.mix.3 (renamed from man/man3/tomo-Float64.mix.3) | 14 | ||||
| -rw-r--r-- | man/man3/tomo-Float.near.3 (renamed from man/man3/tomo-Float64.near.3) | 16 | ||||
| -rw-r--r-- | man/man3/tomo-Float.nextafter.3 (renamed from man/man3/tomo-Float64.nextafter.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.parse.3 (renamed from man/man3/tomo-Float64.parse.3) | 16 | ||||
| -rw-r--r-- | man/man3/tomo-Float.percent.3 (renamed from man/man3/tomo-Float64.percent.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.rint.3 (renamed from man/man3/tomo-Float64.rint.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.round.3 (renamed from man/man3/tomo-Float64.round.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.significand.3 (renamed from man/man3/tomo-Float64.significand.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.sin.3 (renamed from man/man3/tomo-Float64.sin.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.sinh.3 (renamed from man/man3/tomo-Float64.sinh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.sqrt.3 (renamed from man/man3/tomo-Float64.sqrt.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.tan.3 (renamed from man/man3/tomo-Float64.tan.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.tanh.3 (renamed from man/man3/tomo-Float64.tanh.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.tgamma.3 (renamed from man/man3/tomo-Float64.tgamma.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.trunc.3 (renamed from man/man3/tomo-Float64.trunc.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.with_precision.3 (renamed from man/man3/tomo-Float64.with_precision.3) | 12 | ||||
| -rw-r--r-- | man/man3/tomo-Float.y0.3 (renamed from man/man3/tomo-Float64.y0.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float.y1.3 (renamed from man/man3/tomo-Float64.y1.3) | 10 | ||||
| -rw-r--r-- | man/man3/tomo-Float64.3 | 523 |
69 files changed, 1456 insertions, 1456 deletions
@@ -409,130 +409,130 @@ assert CString(",").join([CString("a"), CString("b")]) == CString("a,b") ``` -# Float64 -## Float64.1_PI +# Float +## Float.1_PI ```tomo -Float64.1_PI : Float64 +Float.1_PI : Float ``` The constant $\frac{1}{\pi}$. -## Float64.2_PI +## Float.2_PI ```tomo -Float64.2_PI : Float64 +Float.2_PI : Float ``` The constant $2 \times \pi$. -## Float64.2_SQRTPI +## Float.2_SQRTPI ```tomo -Float64.2_SQRTPI : Float64 +Float.2_SQRTPI : Float ``` The constant $2 \times \sqrt{\pi}$. -## Float64.E +## Float.E ```tomo -Float64.E : Float64 +Float.E : Float ``` The base of the natural logarithm ($e$). -## Float64.INF +## Float.INF ```tomo -Float64.INF : Float64 +Float.INF : Float ``` Positive infinity. -## Float64.LN10 +## Float.LN10 ```tomo -Float64.LN10 : Float64 +Float.LN10 : Float ``` The natural logarithm of 10. -## Float64.LN2 +## Float.LN2 ```tomo -Float64.LN2 : Float64 +Float.LN2 : Float ``` The natural logarithm of 2. -## Float64.LOG2E +## Float.LOG2E ```tomo -Float64.LOG2E : Float64 +Float.LOG2E : Float ``` The base 2 logarithm of $e$ -## Float64.PI +## Float.PI ```tomo -Float64.PI : Float64 +Float.PI : Float ``` Pi ($\pi$). -## Float64.PI_2 +## Float.PI_2 ```tomo -Float64.PI_2 : Float64 +Float.PI_2 : Float ``` $\frac{\pi}{2}$ -## Float64.PI_4 +## Float.PI_4 ```tomo -Float64.PI_4 : Float64 +Float.PI_4 : Float ``` $\frac{\pi}{4}$ -## Float64.SQRT1_2 +## Float.SQRT1_2 ```tomo -Float64.SQRT1_2 : Float64 +Float.SQRT1_2 : Float ``` $\sqrt{\frac{1}{2}}$ -## Float64.SQRT2 +## Float.SQRT2 ```tomo -Float64.SQRT2 : Float64 +Float.SQRT2 : Float ``` $\sqrt{2}$ -## Float64.TAU +## Float.TAU ```tomo -Float64.TAU : Float64 +Float.TAU : Float ``` Tau ($2 \times \pi$) -## Float64.abs +## Float.abs ```tomo -Float64.abs : func(n: Float64 -> Float64) +Float.abs : func(n: Float -> Float) ``` Calculates the absolute value of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number whose absolute value is to be computed. | - +n | `Float` | The number whose absolute value is to be computed. | - **Return:** The absolute value of `n`. @@ -542,17 +542,17 @@ n | `Float64` | The number whose absolute value is to be computed. | - assert (-3.5).abs() == 3.5 ``` -## Float64.acos +## Float.acos ```tomo -Float64.acos : func(x: Float64 -> Float64) +Float.acos : func(x: Float -> Float) ``` Computes the arc cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc cosine is to be calculated. | - +x | `Float` | The number for which the arc cosine is to be calculated. | - **Return:** The arc cosine of `x` in radians. @@ -562,17 +562,17 @@ x | `Float64` | The number for which the arc cosine is to be calculated. | - assert (0.0).acos() == 1.5708 ``` -## Float64.acosh +## Float.acosh ```tomo -Float64.acosh : func(x: Float64 -> Float64) +Float.acosh : func(x: Float -> Float) ``` Computes the inverse hyperbolic cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic cosine is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic cosine is to be calculated. | - **Return:** The inverse hyperbolic cosine of `x`. @@ -582,17 +582,17 @@ x | `Float64` | The number for which the inverse hyperbolic cosine is to be calc assert (1.0).acosh() == 0 ``` -## Float64.asin +## Float.asin ```tomo -Float64.asin : func(x: Float64 -> Float64) +Float.asin : func(x: Float -> Float) ``` Computes the arc sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc sine is to be calculated. | - +x | `Float` | The number for which the arc sine is to be calculated. | - **Return:** The arc sine of `x` in radians. @@ -602,17 +602,17 @@ x | `Float64` | The number for which the arc sine is to be calculated. | - assert (0.5).asin() == 0.5236 ``` -## Float64.asinh +## Float.asinh ```tomo -Float64.asinh : func(x: Float64 -> Float64) +Float.asinh : func(x: Float -> Float) ``` Computes the inverse hyperbolic sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic sine is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic sine is to be calculated. | - **Return:** The inverse hyperbolic sine of `x`. @@ -622,17 +622,17 @@ x | `Float64` | The number for which the inverse hyperbolic sine is to be calcul assert (0.0).asinh() == 0 ``` -## Float64.atan +## Float.atan ```tomo -Float64.atan : func(x: Float64 -> Float64) +Float.atan : func(x: Float -> Float) ``` Computes the arc tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc tangent is to be calculated. | - +x | `Float` | The number for which the arc tangent is to be calculated. | - **Return:** The arc tangent of `x` in radians. @@ -642,38 +642,38 @@ x | `Float64` | The number for which the arc tangent is to be calculated. | - assert (1.0).atan() == 0.7854 ``` -## Float64.atan2 +## Float.atan2 ```tomo -Float64.atan2 : func(x: Float64, y: Float64 -> Float64) +Float.atan2 : func(x: Float, y: Float -> Float) ``` Computes the arc tangent of the quotient of two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The numerator. | - -y | `Float64` | The denominator. | - +x | `Float` | The numerator. | - +y | `Float` | The denominator. | - **Return:** The arc tangent of `x/y` in radians. **Example:** ```tomo -assert Float64.atan2(1, 1) == 0.7854 +assert Float.atan2(1, 1) == 0.7854 ``` -## Float64.atanh +## Float.atanh ```tomo -Float64.atanh : func(x: Float64 -> Float64) +Float.atanh : func(x: Float -> Float) ``` Computes the inverse hyperbolic tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic tangent is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic tangent is to be calculated. | - **Return:** The inverse hyperbolic tangent of `x`. @@ -683,17 +683,17 @@ x | `Float64` | The number for which the inverse hyperbolic tangent is to be cal assert (0.5).atanh() == 0.5493 ``` -## Float64.cbrt +## Float.cbrt ```tomo -Float64.cbrt : func(x: Float64 -> Float64) +Float.cbrt : func(x: Float -> Float) ``` Computes the cube root of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the cube root is to be calculated. | - +x | `Float` | The number for which the cube root is to be calculated. | - **Return:** The cube root of `x`. @@ -703,17 +703,17 @@ x | `Float64` | The number for which the cube root is to be calculated. | - assert (27.0).cbrt() == 3 ``` -## Float64.ceil +## Float.ceil ```tomo -Float64.ceil : func(x: Float64 -> Float64) +Float.ceil : func(x: Float -> Float) ``` Rounds a number up to the nearest integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded up. | - +x | `Float` | The number to be rounded up. | - **Return:** The smallest integer greater than or equal to `x`. @@ -723,19 +723,19 @@ x | `Float64` | The number to be rounded up. | - assert (3.2).ceil() == 4 ``` -## Float64.clamped +## Float.clamped ```tomo -Float64.clamped : func(x: Float64, low: Float64, high: Float64 -> Float64) +Float.clamped : func(x: Float, low: Float, high: Float -> Float) ``` Returns the given number clamped between two values so that it is within that range. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to clamp. | - -low | `Float64` | The lowest value the result can take. | - -high | `Float64` | The highest value the result can take. | - +x | `Float` | The number to clamp. | - +low | `Float` | The lowest value the result can take. | - +high | `Float` | The highest value the result can take. | - **Return:** The first argument clamped between the other two arguments. @@ -745,18 +745,18 @@ high | `Float64` | The highest value the result can take. | - assert (2.5).clamped(5.5, 10.5) == 5.5 ``` -## Float64.copysign +## Float.copysign ```tomo -Float64.copysign : func(x: Float64, y: Float64 -> Float64) +Float.copysign : func(x: Float, y: Float -> Float) ``` Copies the sign of one number to another. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number whose magnitude will be copied. | - -y | `Float64` | The number whose sign will be copied. | - +x | `Float` | The number whose magnitude will be copied. | - +y | `Float` | The number whose sign will be copied. | - **Return:** A number with the magnitude of `x` and the sign of `y`. @@ -766,17 +766,17 @@ y | `Float64` | The number whose sign will be copied. | - assert (3.0).copysign(-1) == -3 ``` -## Float64.cos +## Float.cos ```tomo -Float64.cos : func(x: Float64 -> Float64) +Float.cos : func(x: Float -> Float) ``` Computes the cosine of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The cosine of `x`. @@ -786,17 +786,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).cos() == 1 ``` -## Float64.cosh +## Float.cosh ```tomo -Float64.cosh : func(x: Float64 -> Float64) +Float.cosh : func(x: Float -> Float) ``` Computes the hyperbolic cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic cosine is to be calculated. | - +x | `Float` | The number for which the hyperbolic cosine is to be calculated. | - **Return:** The hyperbolic cosine of `x`. @@ -806,17 +806,17 @@ x | `Float64` | The number for which the hyperbolic cosine is to be calculated. assert (0.0).cosh() == 1 ``` -## Float64.erf +## Float.erf ```tomo -Float64.erf : func(x: Float64 -> Float64) +Float.erf : func(x: Float -> Float) ``` Computes the error function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the error function is to be calculated. | - +x | `Float` | The number for which the error function is to be calculated. | - **Return:** The error function of `x`. @@ -826,17 +826,17 @@ x | `Float64` | The number for which the error function is to be calculated. | assert (0.0).erf() == 0 ``` -## Float64.erfc +## Float.erfc ```tomo -Float64.erfc : func(x: Float64 -> Float64) +Float.erfc : func(x: Float -> Float) ``` Computes the complementary error function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the complementary error function is to be calculated. | - +x | `Float` | The number for which the complementary error function is to be calculated. | - **Return:** The complementary error function of `x`. @@ -846,17 +846,17 @@ x | `Float64` | The number for which the complementary error function is to be c assert (0.0).erfc() == 1 ``` -## Float64.exp +## Float.exp ```tomo -Float64.exp : func(x: Float64 -> Float64) +Float.exp : func(x: Float -> Float) ``` Computes the exponential function $e^x$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $e^x$. @@ -866,17 +866,17 @@ x | `Float64` | The exponent. | - assert (1.0).exp() == 2.7183 ``` -## Float64.exp2 +## Float.exp2 ```tomo -Float64.exp2 : func(x: Float64 -> Float64) +Float.exp2 : func(x: Float -> Float) ``` Computes $2^x$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $2^x$. @@ -886,17 +886,17 @@ x | `Float64` | The exponent. | - assert (3.0).exp2() == 8 ``` -## Float64.expm1 +## Float.expm1 ```tomo -Float64.expm1 : func(x: Float64 -> Float64) +Float.expm1 : func(x: Float -> Float) ``` Computes $e^x - 1$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $e^x - 1$. @@ -906,18 +906,18 @@ x | `Float64` | The exponent. | - assert (1.0).expm1() == 1.7183 ``` -## Float64.fdim +## Float.fdim ```tomo -Float64.fdim : func(x: Float64, y: Float64 -> Float64) +Float.fdim : func(x: Float, y: Float -> Float) ``` Computes the positive difference between two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - +x | `Float` | The first number. | - +y | `Float` | The second number. | - **Return:** The positive difference $\max(0, x - y)$. @@ -929,17 +929,17 @@ fd assert (5.0).fdim(3) == 2 ``` -## Float64.floor +## Float.floor ```tomo -Float64.floor : func(x: Float64 -> Float64) +Float.floor : func(x: Float -> Float) ``` Rounds a number down to the nearest integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded down. | - +x | `Float` | The number to be rounded down. | - **Return:** The largest integer less than or equal to `x`. @@ -949,40 +949,40 @@ x | `Float64` | The number to be rounded down. | - assert (3.7).floor() == 3 ``` -## Float64.hypot +## Float.hypot ```tomo -Float64.hypot : func(x: Float64, y: Float64 -> Float64) +Float.hypot : func(x: Float, y: Float -> Float) ``` Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - +x | `Float` | The first number. | - +y | `Float` | The second number. | - **Return:** The Euclidean norm of `x` and `y`. **Example:** ```tomo -assert Float64.hypot(3, 4) == 5 +assert Float.hypot(3, 4) == 5 ``` -## Float64.is_between +## Float.is_between ```tomo -Float64.is_between : func(x: Float64, low: Float64, high: Float64 -> Bool) +Float.is_between : func(x: Float, low: Float, high: Float -> Bool) ``` Determines if a number is between two numbers (inclusive). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The integer to be checked. | - -low | `Float64` | The lower bound to check (inclusive). | - -high | `Float64` | The upper bound to check (inclusive). | - +x | `Float` | The integer to be checked. | - +low | `Float` | The lower bound to check (inclusive). | - +high | `Float` | The upper bound to check (inclusive). | - **Return:** `yes` if `low <= x and x <= high`, otherwise `no` @@ -994,17 +994,17 @@ assert (7.5).is_between(100, 200) == no assert (7.5).is_between(1, 7.5) == yes ``` -## Float64.isfinite +## Float.isfinite ```tomo -Float64.isfinite : func(n: Float64 -> Bool) +Float.isfinite : func(n: Float -> Bool) ``` Checks if a number is finite. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be checked. | - +n | `Float` | The number to be checked. | - **Return:** `yes` if `n` is finite, `no` otherwise. @@ -1012,41 +1012,41 @@ n | `Float64` | The number to be checked. | - **Example:** ```tomo assert (1.0).isfinite() == yes -assert Float64.INF.isfinite() == no +assert Float.INF.isfinite() == no ``` -## Float64.isinf +## Float.isinf ```tomo -Float64.isinf : func(n: Float64 -> Bool) +Float.isinf : func(n: Float -> Bool) ``` Checks if a number is infinite. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be checked. | - +n | `Float` | The number to be checked. | - **Return:** `yes` if `n` is infinite, `no` otherwise. **Example:** ```tomo -assert Float64.INF.isinf() == yes +assert Float.INF.isinf() == yes assert (1.0).isinf() == no ``` -## Float64.j0 +## Float.j0 ```tomo -Float64.j0 : func(x: Float64 -> Float64) +Float.j0 : func(x: Float -> Float) ``` Computes the Bessel function of the first kind of order 0. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the first kind of order 0 of `x`. @@ -1056,17 +1056,17 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (0.0).j0() == 1 ``` -## Float64.j1 +## Float.j1 ```tomo -Float64.j1 : func(x: Float64 -> Float64) +Float.j1 : func(x: Float -> Float) ``` Computes the Bessel function of the first kind of order 1. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the first kind of order 1 of `x`. @@ -1076,37 +1076,37 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (0.0).j1() == 0 ``` -## Float64.log +## Float.log ```tomo -Float64.log : func(x: Float64 -> Float64) +Float.log : func(x: Float -> Float) ``` Computes the natural logarithm (base $e$) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the natural logarithm is to be calculated. | - +x | `Float` | The number for which the natural logarithm is to be calculated. | - **Return:** The natural logarithm of `x`. **Example:** ```tomo -assert Float64.E.log() == 1 +assert Float.E.log() == 1 ``` -## Float64.log10 +## Float.log10 ```tomo -Float64.log10 : func(x: Float64 -> Float64) +Float.log10 : func(x: Float -> Float) ``` Computes the base-10 logarithm of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the base-10 logarithm is to be calculated. | - +x | `Float` | The number for which the base-10 logarithm is to be calculated. | - **Return:** The base-10 logarithm of `x`. @@ -1116,17 +1116,17 @@ x | `Float64` | The number for which the base-10 logarithm is to be calculated. assert (100.0).log10() == 2 ``` -## Float64.log1p +## Float.log1p ```tomo -Float64.log1p : func(x: Float64 -> Float64) +Float.log1p : func(x: Float -> Float) ``` Computes $\log(1 + x)$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which $\log(1 + x)$ is to be calculated. | - +x | `Float` | The number for which $\log(1 + x)$ is to be calculated. | - **Return:** The value of $\log(1 + x)$. @@ -1136,17 +1136,17 @@ x | `Float64` | The number for which $\log(1 + x)$ is to be calculated. | - assert (1.0).log1p() == 0.6931 ``` -## Float64.log2 +## Float.log2 ```tomo -Float64.log2 : func(x: Float64 -> Float64) +Float.log2 : func(x: Float -> Float) ``` Computes the base-2 logarithm of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the base-2 logarithm is to be calculated. | - +x | `Float` | The number for which the base-2 logarithm is to be calculated. | - **Return:** The base-2 logarithm of `x`. @@ -1156,17 +1156,17 @@ x | `Float64` | The number for which the base-2 logarithm is to be calculated. assert (8.0).log2() == 3 ``` -## Float64.logb +## Float.logb ```tomo -Float64.logb : func(x: Float64 -> Float64) +Float.logb : func(x: Float -> Float) ``` Computes the binary exponent (base-2 logarithm) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the binary exponent is to be calculated. | - +x | `Float` | The number for which the binary exponent is to be calculated. | - **Return:** The binary exponent of `x`. @@ -1176,19 +1176,19 @@ x | `Float64` | The number for which the binary exponent is to be calculated. | assert (8.0).logb() == 3 ``` -## Float64.mix +## Float.mix ```tomo -Float64.mix : func(amount: Float64, x: Float64, y: Float64 -> Float64) +Float.mix : func(amount: Float, x: Float, y: Float -> Float) ``` Interpolates between two numbers based on a given amount. Argument | Type | Description | Default ---------|------|-------------|--------- -amount | `Float64` | The interpolation factor (between `0` and `1`). | - -x | `Float64` | The starting number. | - -y | `Float64` | The ending number. | - +amount | `Float` | The interpolation factor (between `0` and `1`). | - +x | `Float` | The starting number. | - +y | `Float` | The ending number. | - **Return:** The interpolated number between `x` and `y` based on `amount`. @@ -1199,20 +1199,20 @@ assert (0.5).mix(10, 20) == 15 assert (0.25).mix(10, 20) == 12.5 ``` -## Float64.near +## Float.near ```tomo -Float64.near : func(x: Float64, y: Float64, ratio: Float64 = 1e-9, min_epsilon: Float64 = 1e-9 -> Bool) +Float.near : func(x: Float, y: Float, ratio: Float = 1e-9, min_epsilon: Float = 1e-9 -> Bool) ``` Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - -ratio | `Float64` | The relative tolerance. Default is `1e-9`. | `1e-9` -min_epsilon | `Float64` | The absolute tolerance. Default is `1e-9`. | `1e-9` +x | `Float` | The first number. | - +y | `Float` | The second number. | - +ratio | `Float` | The relative tolerance. Default is `1e-9`. | `1e-9` +min_epsilon | `Float` | The absolute tolerance. Default is `1e-9`. | `1e-9` **Return:** `yes` if `x` and `y` are approximately equal within the specified tolerances, `no` otherwise. @@ -1224,18 +1224,18 @@ assert (100.0).near(110, ratio=0.1) == yes assert (5.0).near(5.1, min_epsilon=0.1) == yes ``` -## Float64.nextafter +## Float.nextafter ```tomo -Float64.nextafter : func(x: Float64, y: Float64 -> Float64) +Float.nextafter : func(x: Float, y: Float -> Float) ``` Computes the next representable value after a given number towards a specified direction. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The starting number. | - -y | `Float64` | The direction towards which to find the next representable value. | - +x | `Float` | The starting number. | - +y | `Float` | The direction towards which to find the next representable value. | - **Return:** The next representable value after `x` in the direction of `y`. @@ -1245,10 +1245,10 @@ y | `Float64` | The direction towards which to find the next representable value assert (1.0).nextafter(1.1) == 1.0000000000000002 ``` -## Float64.parse +## Float.parse ```tomo -Float64.parse : func(text: Text, remainder: &Text? = none -> Float64?) +Float.parse : func(text: Text, remainder: &Text? = none -> Float?) ``` Converts a text representation of a number into a floating-point number. @@ -1263,26 +1263,26 @@ remainder | `&Text?` | If non-none, this argument will be set to the remainder o **Example:** ```tomo -assert Float64.parse("3.14") == 3.14 -assert Float64.parse("1e3") == 1000 -assert Float64.parse("1.5junk") == none +assert Float.parse("3.14") == 3.14 +assert Float.parse("1e3") == 1000 +assert Float.parse("1.5junk") == none remainder : Text -assert Float64.parse("1.5junk", &remainder) == 1.5 +assert Float.parse("1.5junk", &remainder) == 1.5 assert remainder == "junk" ``` -## Float64.percent +## Float.percent ```tomo -Float64.percent : func(n: Float64, precision: Float64 = 0.01 -> Text) +Float.percent : func(n: Float, precision: Float = 0.01 -> Text) ``` Convert a number into a percentage text with a percent sign. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be converted to a percent. | - -precision | `Float64` | Round the percentage to this precision level. | `0.01` +n | `Float` | The number to be converted to a percent. | - +precision | `Float` | Round the percentage to this precision level. | `0.01` **Return:** A text representation of the number as a percentage with a percent sign. @@ -1295,17 +1295,17 @@ assert (1./3.).percent(2, precision=0.0001) == "33.3333%" assert (1./3.).percent(2, precision=10.) == "30%" ``` -## Float64.rint +## Float.rint ```tomo -Float64.rint : func(x: Float64 -> Float64) +Float.rint : func(x: Float -> Float) ``` Rounds a number to the nearest integer, with ties rounded to the nearest even integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded. | - +x | `Float` | The number to be rounded. | - **Return:** The nearest integer value of `x`. @@ -1316,17 +1316,17 @@ assert (3.5).rint() == 4 assert (2.5).rint() == 2 ``` -## Float64.round +## Float.round ```tomo -Float64.round : func(x: Float64 -> Float64) +Float.round : func(x: Float -> Float) ``` Rounds a number to the nearest whole number integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded. | - +x | `Float` | The number to be rounded. | - **Return:** The nearest integer value of `x`. @@ -1337,17 +1337,17 @@ assert (2.3).round() == 2 assert (2.7).round() == 3 ``` -## Float64.significand +## Float.significand ```tomo -Float64.significand : func(x: Float64 -> Float64) +Float.significand : func(x: Float -> Float) ``` Extracts the significand (or mantissa) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number from which to extract the significand. | - +x | `Float` | The number from which to extract the significand. | - **Return:** The significand of `x`. @@ -1357,17 +1357,17 @@ x | `Float64` | The number from which to extract the significand. | - assert (1234.567).significand() == 0.1234567 ``` -## Float64.sin +## Float.sin ```tomo -Float64.sin : func(x: Float64 -> Float64) +Float.sin : func(x: Float -> Float) ``` Computes the sine of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The sine of `x`. @@ -1377,17 +1377,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).sin() == 0 ``` -## Float64.sinh +## Float.sinh ```tomo -Float64.sinh : func(x: Float64 -> Float64) +Float.sinh : func(x: Float -> Float) ``` Computes the hyperbolic sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic sine is to be calculated. | - +x | `Float` | The number for which the hyperbolic sine is to be calculated. | - **Return:** The hyperbolic sine of `x`. @@ -1397,17 +1397,17 @@ x | `Float64` | The number for which the hyperbolic sine is to be calculated. | assert (0.0).sinh() == 0 ``` -## Float64.sqrt +## Float.sqrt ```tomo -Float64.sqrt : func(x: Float64 -> Float64) +Float.sqrt : func(x: Float -> Float) ``` Computes the square root of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the square root is to be calculated. | - +x | `Float` | The number for which the square root is to be calculated. | - **Return:** The square root of `x`. @@ -1417,17 +1417,17 @@ x | `Float64` | The number for which the square root is to be calculated. | - assert (16.0).sqrt() == 4 ``` -## Float64.tan +## Float.tan ```tomo -Float64.tan : func(x: Float64 -> Float64) +Float.tan : func(x: Float -> Float) ``` Computes the tangent of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The tangent of `x`. @@ -1437,17 +1437,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).tan() == 0 ``` -## Float64.tanh +## Float.tanh ```tomo -Float64.tanh : func(x: Float64 -> Float64) +Float.tanh : func(x: Float -> Float) ``` Computes the hyperbolic tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic tangent is to be calculated. | - +x | `Float` | The number for which the hyperbolic tangent is to be calculated. | - **Return:** The hyperbolic tangent of `x`. @@ -1457,17 +1457,17 @@ x | `Float64` | The number for which the hyperbolic tangent is to be calculated. assert (0.0).tanh() == 0 ``` -## Float64.tgamma +## Float.tgamma ```tomo -Float64.tgamma : func(x: Float64 -> Float64) +Float.tgamma : func(x: Float -> Float) ``` Computes the gamma function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the gamma function is to be calculated. | - +x | `Float` | The number for which the gamma function is to be calculated. | - **Return:** The gamma function of `x`. @@ -1477,17 +1477,17 @@ x | `Float64` | The number for which the gamma function is to be calculated. | assert (1.0).tgamma() == 1 ``` -## Float64.trunc +## Float.trunc ```tomo -Float64.trunc : func(x: Float64 -> Float64) +Float.trunc : func(x: Float -> Float) ``` Truncates a number to the nearest integer towards zero. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be truncated. | - +x | `Float` | The number to be truncated. | - **Return:** The integer part of `x` towards zero. @@ -1498,18 +1498,18 @@ assert (3.7).trunc() == 3 assert (-3.7).trunc() == -3 ``` -## Float64.with_precision +## Float.with_precision ```tomo -Float64.with_precision : func(n: Float64, precision: Float64 -> Float64) +Float.with_precision : func(n: Float, precision: Float -> Float) ``` Round a number to the given precision level (specified as `10`, `.1`, `.001` etc). Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be rounded to a given precision. | - -precision | `Float64` | The precision to which the number should be rounded. | - +n | `Float` | The number to be rounded to a given precision. | - +precision | `Float` | The precision to which the number should be rounded. | - **Return:** The number, rounded to the given precision level. @@ -1521,17 +1521,17 @@ assert (123456.).with_precision(100) == 123500 assert (1234567.).with_precision(5) == 1234565 ``` -## Float64.y0 +## Float.y0 ```tomo -Float64.y0 : func(x: Float64 -> Float64) +Float.y0 : func(x: Float -> Float) ``` Computes the Bessel function of the second kind of order 0. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the second kind of order 0 of `x`. @@ -1541,17 +1541,17 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (1.0).y0() == -0.7652 ``` -## Float64.y1 +## Float.y1 ```tomo -Float64.y1 : func(x: Float64 -> Float64) +Float.y1 : func(x: Float -> Float) ``` Computes the Bessel function of the second kind of order 1. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the second kind of order 1 of `x`. diff --git a/api/floats.md b/api/floats.md index 8d1777e8..69097bfd 100644 --- a/api/floats.md +++ b/api/floats.md @@ -2,130 +2,130 @@ # Builtins -# Float64 -## Float64.1_PI +# Float +## Float.1_PI ```tomo -Float64.1_PI : Float64 +Float.1_PI : Float ``` The constant $\frac{1}{\pi}$. -## Float64.2_PI +## Float.2_PI ```tomo -Float64.2_PI : Float64 +Float.2_PI : Float ``` The constant $2 \times \pi$. -## Float64.2_SQRTPI +## Float.2_SQRTPI ```tomo -Float64.2_SQRTPI : Float64 +Float.2_SQRTPI : Float ``` The constant $2 \times \sqrt{\pi}$. -## Float64.E +## Float.E ```tomo -Float64.E : Float64 +Float.E : Float ``` The base of the natural logarithm ($e$). -## Float64.INF +## Float.INF ```tomo -Float64.INF : Float64 +Float.INF : Float ``` Positive infinity. -## Float64.LN10 +## Float.LN10 ```tomo -Float64.LN10 : Float64 +Float.LN10 : Float ``` The natural logarithm of 10. -## Float64.LN2 +## Float.LN2 ```tomo -Float64.LN2 : Float64 +Float.LN2 : Float ``` The natural logarithm of 2. -## Float64.LOG2E +## Float.LOG2E ```tomo -Float64.LOG2E : Float64 +Float.LOG2E : Float ``` The base 2 logarithm of $e$ -## Float64.PI +## Float.PI ```tomo -Float64.PI : Float64 +Float.PI : Float ``` Pi ($\pi$). -## Float64.PI_2 +## Float.PI_2 ```tomo -Float64.PI_2 : Float64 +Float.PI_2 : Float ``` $\frac{\pi}{2}$ -## Float64.PI_4 +## Float.PI_4 ```tomo -Float64.PI_4 : Float64 +Float.PI_4 : Float ``` $\frac{\pi}{4}$ -## Float64.SQRT1_2 +## Float.SQRT1_2 ```tomo -Float64.SQRT1_2 : Float64 +Float.SQRT1_2 : Float ``` $\sqrt{\frac{1}{2}}$ -## Float64.SQRT2 +## Float.SQRT2 ```tomo -Float64.SQRT2 : Float64 +Float.SQRT2 : Float ``` $\sqrt{2}$ -## Float64.TAU +## Float.TAU ```tomo -Float64.TAU : Float64 +Float.TAU : Float ``` Tau ($2 \times \pi$) -## Float64.abs +## Float.abs ```tomo -Float64.abs : func(n: Float64 -> Float64) +Float.abs : func(n: Float -> Float) ``` Calculates the absolute value of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number whose absolute value is to be computed. | - +n | `Float` | The number whose absolute value is to be computed. | - **Return:** The absolute value of `n`. @@ -135,17 +135,17 @@ n | `Float64` | The number whose absolute value is to be computed. | - assert (-3.5).abs() == 3.5 ``` -## Float64.acos +## Float.acos ```tomo -Float64.acos : func(x: Float64 -> Float64) +Float.acos : func(x: Float -> Float) ``` Computes the arc cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc cosine is to be calculated. | - +x | `Float` | The number for which the arc cosine is to be calculated. | - **Return:** The arc cosine of `x` in radians. @@ -155,17 +155,17 @@ x | `Float64` | The number for which the arc cosine is to be calculated. | - assert (0.0).acos() == 1.5708 ``` -## Float64.acosh +## Float.acosh ```tomo -Float64.acosh : func(x: Float64 -> Float64) +Float.acosh : func(x: Float -> Float) ``` Computes the inverse hyperbolic cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic cosine is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic cosine is to be calculated. | - **Return:** The inverse hyperbolic cosine of `x`. @@ -175,17 +175,17 @@ x | `Float64` | The number for which the inverse hyperbolic cosine is to be calc assert (1.0).acosh() == 0 ``` -## Float64.asin +## Float.asin ```tomo -Float64.asin : func(x: Float64 -> Float64) +Float.asin : func(x: Float -> Float) ``` Computes the arc sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc sine is to be calculated. | - +x | `Float` | The number for which the arc sine is to be calculated. | - **Return:** The arc sine of `x` in radians. @@ -195,17 +195,17 @@ x | `Float64` | The number for which the arc sine is to be calculated. | - assert (0.5).asin() == 0.5236 ``` -## Float64.asinh +## Float.asinh ```tomo -Float64.asinh : func(x: Float64 -> Float64) +Float.asinh : func(x: Float -> Float) ``` Computes the inverse hyperbolic sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic sine is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic sine is to be calculated. | - **Return:** The inverse hyperbolic sine of `x`. @@ -215,17 +215,17 @@ x | `Float64` | The number for which the inverse hyperbolic sine is to be calcul assert (0.0).asinh() == 0 ``` -## Float64.atan +## Float.atan ```tomo -Float64.atan : func(x: Float64 -> Float64) +Float.atan : func(x: Float -> Float) ``` Computes the arc tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the arc tangent is to be calculated. | - +x | `Float` | The number for which the arc tangent is to be calculated. | - **Return:** The arc tangent of `x` in radians. @@ -235,38 +235,38 @@ x | `Float64` | The number for which the arc tangent is to be calculated. | - assert (1.0).atan() == 0.7854 ``` -## Float64.atan2 +## Float.atan2 ```tomo -Float64.atan2 : func(x: Float64, y: Float64 -> Float64) +Float.atan2 : func(x: Float, y: Float -> Float) ``` Computes the arc tangent of the quotient of two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The numerator. | - -y | `Float64` | The denominator. | - +x | `Float` | The numerator. | - +y | `Float` | The denominator. | - **Return:** The arc tangent of `x/y` in radians. **Example:** ```tomo -assert Float64.atan2(1, 1) == 0.7854 +assert Float.atan2(1, 1) == 0.7854 ``` -## Float64.atanh +## Float.atanh ```tomo -Float64.atanh : func(x: Float64 -> Float64) +Float.atanh : func(x: Float -> Float) ``` Computes the inverse hyperbolic tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the inverse hyperbolic tangent is to be calculated. | - +x | `Float` | The number for which the inverse hyperbolic tangent is to be calculated. | - **Return:** The inverse hyperbolic tangent of `x`. @@ -276,17 +276,17 @@ x | `Float64` | The number for which the inverse hyperbolic tangent is to be cal assert (0.5).atanh() == 0.5493 ``` -## Float64.cbrt +## Float.cbrt ```tomo -Float64.cbrt : func(x: Float64 -> Float64) +Float.cbrt : func(x: Float -> Float) ``` Computes the cube root of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the cube root is to be calculated. | - +x | `Float` | The number for which the cube root is to be calculated. | - **Return:** The cube root of `x`. @@ -296,17 +296,17 @@ x | `Float64` | The number for which the cube root is to be calculated. | - assert (27.0).cbrt() == 3 ``` -## Float64.ceil +## Float.ceil ```tomo -Float64.ceil : func(x: Float64 -> Float64) +Float.ceil : func(x: Float -> Float) ``` Rounds a number up to the nearest integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded up. | - +x | `Float` | The number to be rounded up. | - **Return:** The smallest integer greater than or equal to `x`. @@ -316,19 +316,19 @@ x | `Float64` | The number to be rounded up. | - assert (3.2).ceil() == 4 ``` -## Float64.clamped +## Float.clamped ```tomo -Float64.clamped : func(x: Float64, low: Float64, high: Float64 -> Float64) +Float.clamped : func(x: Float, low: Float, high: Float -> Float) ``` Returns the given number clamped between two values so that it is within that range. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to clamp. | - -low | `Float64` | The lowest value the result can take. | - -high | `Float64` | The highest value the result can take. | - +x | `Float` | The number to clamp. | - +low | `Float` | The lowest value the result can take. | - +high | `Float` | The highest value the result can take. | - **Return:** The first argument clamped between the other two arguments. @@ -338,18 +338,18 @@ high | `Float64` | The highest value the result can take. | - assert (2.5).clamped(5.5, 10.5) == 5.5 ``` -## Float64.copysign +## Float.copysign ```tomo -Float64.copysign : func(x: Float64, y: Float64 -> Float64) +Float.copysign : func(x: Float, y: Float -> Float) ``` Copies the sign of one number to another. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number whose magnitude will be copied. | - -y | `Float64` | The number whose sign will be copied. | - +x | `Float` | The number whose magnitude will be copied. | - +y | `Float` | The number whose sign will be copied. | - **Return:** A number with the magnitude of `x` and the sign of `y`. @@ -359,17 +359,17 @@ y | `Float64` | The number whose sign will be copied. | - assert (3.0).copysign(-1) == -3 ``` -## Float64.cos +## Float.cos ```tomo -Float64.cos : func(x: Float64 -> Float64) +Float.cos : func(x: Float -> Float) ``` Computes the cosine of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The cosine of `x`. @@ -379,17 +379,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).cos() == 1 ``` -## Float64.cosh +## Float.cosh ```tomo -Float64.cosh : func(x: Float64 -> Float64) +Float.cosh : func(x: Float -> Float) ``` Computes the hyperbolic cosine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic cosine is to be calculated. | - +x | `Float` | The number for which the hyperbolic cosine is to be calculated. | - **Return:** The hyperbolic cosine of `x`. @@ -399,17 +399,17 @@ x | `Float64` | The number for which the hyperbolic cosine is to be calculated. assert (0.0).cosh() == 1 ``` -## Float64.erf +## Float.erf ```tomo -Float64.erf : func(x: Float64 -> Float64) +Float.erf : func(x: Float -> Float) ``` Computes the error function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the error function is to be calculated. | - +x | `Float` | The number for which the error function is to be calculated. | - **Return:** The error function of `x`. @@ -419,17 +419,17 @@ x | `Float64` | The number for which the error function is to be calculated. | assert (0.0).erf() == 0 ``` -## Float64.erfc +## Float.erfc ```tomo -Float64.erfc : func(x: Float64 -> Float64) +Float.erfc : func(x: Float -> Float) ``` Computes the complementary error function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the complementary error function is to be calculated. | - +x | `Float` | The number for which the complementary error function is to be calculated. | - **Return:** The complementary error function of `x`. @@ -439,17 +439,17 @@ x | `Float64` | The number for which the complementary error function is to be c assert (0.0).erfc() == 1 ``` -## Float64.exp +## Float.exp ```tomo -Float64.exp : func(x: Float64 -> Float64) +Float.exp : func(x: Float -> Float) ``` Computes the exponential function $e^x$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $e^x$. @@ -459,17 +459,17 @@ x | `Float64` | The exponent. | - assert (1.0).exp() == 2.7183 ``` -## Float64.exp2 +## Float.exp2 ```tomo -Float64.exp2 : func(x: Float64 -> Float64) +Float.exp2 : func(x: Float -> Float) ``` Computes $2^x$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $2^x$. @@ -479,17 +479,17 @@ x | `Float64` | The exponent. | - assert (3.0).exp2() == 8 ``` -## Float64.expm1 +## Float.expm1 ```tomo -Float64.expm1 : func(x: Float64 -> Float64) +Float.expm1 : func(x: Float -> Float) ``` Computes $e^x - 1$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The exponent. | - +x | `Float` | The exponent. | - **Return:** The value of $e^x - 1$. @@ -499,18 +499,18 @@ x | `Float64` | The exponent. | - assert (1.0).expm1() == 1.7183 ``` -## Float64.fdim +## Float.fdim ```tomo -Float64.fdim : func(x: Float64, y: Float64 -> Float64) +Float.fdim : func(x: Float, y: Float -> Float) ``` Computes the positive difference between two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - +x | `Float` | The first number. | - +y | `Float` | The second number. | - **Return:** The positive difference $\max(0, x - y)$. @@ -522,17 +522,17 @@ fd assert (5.0).fdim(3) == 2 ``` -## Float64.floor +## Float.floor ```tomo -Float64.floor : func(x: Float64 -> Float64) +Float.floor : func(x: Float -> Float) ``` Rounds a number down to the nearest integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded down. | - +x | `Float` | The number to be rounded down. | - **Return:** The largest integer less than or equal to `x`. @@ -542,40 +542,40 @@ x | `Float64` | The number to be rounded down. | - assert (3.7).floor() == 3 ``` -## Float64.hypot +## Float.hypot ```tomo -Float64.hypot : func(x: Float64, y: Float64 -> Float64) +Float.hypot : func(x: Float, y: Float -> Float) ``` Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - +x | `Float` | The first number. | - +y | `Float` | The second number. | - **Return:** The Euclidean norm of `x` and `y`. **Example:** ```tomo -assert Float64.hypot(3, 4) == 5 +assert Float.hypot(3, 4) == 5 ``` -## Float64.is_between +## Float.is_between ```tomo -Float64.is_between : func(x: Float64, low: Float64, high: Float64 -> Bool) +Float.is_between : func(x: Float, low: Float, high: Float -> Bool) ``` Determines if a number is between two numbers (inclusive). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The integer to be checked. | - -low | `Float64` | The lower bound to check (inclusive). | - -high | `Float64` | The upper bound to check (inclusive). | - +x | `Float` | The integer to be checked. | - +low | `Float` | The lower bound to check (inclusive). | - +high | `Float` | The upper bound to check (inclusive). | - **Return:** `yes` if `low <= x and x <= high`, otherwise `no` @@ -587,17 +587,17 @@ assert (7.5).is_between(100, 200) == no assert (7.5).is_between(1, 7.5) == yes ``` -## Float64.isfinite +## Float.isfinite ```tomo -Float64.isfinite : func(n: Float64 -> Bool) +Float.isfinite : func(n: Float -> Bool) ``` Checks if a number is finite. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be checked. | - +n | `Float` | The number to be checked. | - **Return:** `yes` if `n` is finite, `no` otherwise. @@ -605,41 +605,41 @@ n | `Float64` | The number to be checked. | - **Example:** ```tomo assert (1.0).isfinite() == yes -assert Float64.INF.isfinite() == no +assert Float.INF.isfinite() == no ``` -## Float64.isinf +## Float.isinf ```tomo -Float64.isinf : func(n: Float64 -> Bool) +Float.isinf : func(n: Float -> Bool) ``` Checks if a number is infinite. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be checked. | - +n | `Float` | The number to be checked. | - **Return:** `yes` if `n` is infinite, `no` otherwise. **Example:** ```tomo -assert Float64.INF.isinf() == yes +assert Float.INF.isinf() == yes assert (1.0).isinf() == no ``` -## Float64.j0 +## Float.j0 ```tomo -Float64.j0 : func(x: Float64 -> Float64) +Float.j0 : func(x: Float -> Float) ``` Computes the Bessel function of the first kind of order 0. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the first kind of order 0 of `x`. @@ -649,17 +649,17 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (0.0).j0() == 1 ``` -## Float64.j1 +## Float.j1 ```tomo -Float64.j1 : func(x: Float64 -> Float64) +Float.j1 : func(x: Float -> Float) ``` Computes the Bessel function of the first kind of order 1. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the first kind of order 1 of `x`. @@ -669,37 +669,37 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (0.0).j1() == 0 ``` -## Float64.log +## Float.log ```tomo -Float64.log : func(x: Float64 -> Float64) +Float.log : func(x: Float -> Float) ``` Computes the natural logarithm (base $e$) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the natural logarithm is to be calculated. | - +x | `Float` | The number for which the natural logarithm is to be calculated. | - **Return:** The natural logarithm of `x`. **Example:** ```tomo -assert Float64.E.log() == 1 +assert Float.E.log() == 1 ``` -## Float64.log10 +## Float.log10 ```tomo -Float64.log10 : func(x: Float64 -> Float64) +Float.log10 : func(x: Float -> Float) ``` Computes the base-10 logarithm of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the base-10 logarithm is to be calculated. | - +x | `Float` | The number for which the base-10 logarithm is to be calculated. | - **Return:** The base-10 logarithm of `x`. @@ -709,17 +709,17 @@ x | `Float64` | The number for which the base-10 logarithm is to be calculated. assert (100.0).log10() == 2 ``` -## Float64.log1p +## Float.log1p ```tomo -Float64.log1p : func(x: Float64 -> Float64) +Float.log1p : func(x: Float -> Float) ``` Computes $\log(1 + x)$ for a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which $\log(1 + x)$ is to be calculated. | - +x | `Float` | The number for which $\log(1 + x)$ is to be calculated. | - **Return:** The value of $\log(1 + x)$. @@ -729,17 +729,17 @@ x | `Float64` | The number for which $\log(1 + x)$ is to be calculated. | - assert (1.0).log1p() == 0.6931 ``` -## Float64.log2 +## Float.log2 ```tomo -Float64.log2 : func(x: Float64 -> Float64) +Float.log2 : func(x: Float -> Float) ``` Computes the base-2 logarithm of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the base-2 logarithm is to be calculated. | - +x | `Float` | The number for which the base-2 logarithm is to be calculated. | - **Return:** The base-2 logarithm of `x`. @@ -749,17 +749,17 @@ x | `Float64` | The number for which the base-2 logarithm is to be calculated. assert (8.0).log2() == 3 ``` -## Float64.logb +## Float.logb ```tomo -Float64.logb : func(x: Float64 -> Float64) +Float.logb : func(x: Float -> Float) ``` Computes the binary exponent (base-2 logarithm) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the binary exponent is to be calculated. | - +x | `Float` | The number for which the binary exponent is to be calculated. | - **Return:** The binary exponent of `x`. @@ -769,19 +769,19 @@ x | `Float64` | The number for which the binary exponent is to be calculated. | assert (8.0).logb() == 3 ``` -## Float64.mix +## Float.mix ```tomo -Float64.mix : func(amount: Float64, x: Float64, y: Float64 -> Float64) +Float.mix : func(amount: Float, x: Float, y: Float -> Float) ``` Interpolates between two numbers based on a given amount. Argument | Type | Description | Default ---------|------|-------------|--------- -amount | `Float64` | The interpolation factor (between `0` and `1`). | - -x | `Float64` | The starting number. | - -y | `Float64` | The ending number. | - +amount | `Float` | The interpolation factor (between `0` and `1`). | - +x | `Float` | The starting number. | - +y | `Float` | The ending number. | - **Return:** The interpolated number between `x` and `y` based on `amount`. @@ -792,20 +792,20 @@ assert (0.5).mix(10, 20) == 15 assert (0.25).mix(10, 20) == 12.5 ``` -## Float64.near +## Float.near ```tomo -Float64.near : func(x: Float64, y: Float64, ratio: Float64 = 1e-9, min_epsilon: Float64 = 1e-9 -> Bool) +Float.near : func(x: Float, y: Float, ratio: Float = 1e-9, min_epsilon: Float = 1e-9 -> Bool) ``` Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The first number. | - -y | `Float64` | The second number. | - -ratio | `Float64` | The relative tolerance. Default is `1e-9`. | `1e-9` -min_epsilon | `Float64` | The absolute tolerance. Default is `1e-9`. | `1e-9` +x | `Float` | The first number. | - +y | `Float` | The second number. | - +ratio | `Float` | The relative tolerance. Default is `1e-9`. | `1e-9` +min_epsilon | `Float` | The absolute tolerance. Default is `1e-9`. | `1e-9` **Return:** `yes` if `x` and `y` are approximately equal within the specified tolerances, `no` otherwise. @@ -817,18 +817,18 @@ assert (100.0).near(110, ratio=0.1) == yes assert (5.0).near(5.1, min_epsilon=0.1) == yes ``` -## Float64.nextafter +## Float.nextafter ```tomo -Float64.nextafter : func(x: Float64, y: Float64 -> Float64) +Float.nextafter : func(x: Float, y: Float -> Float) ``` Computes the next representable value after a given number towards a specified direction. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The starting number. | - -y | `Float64` | The direction towards which to find the next representable value. | - +x | `Float` | The starting number. | - +y | `Float` | The direction towards which to find the next representable value. | - **Return:** The next representable value after `x` in the direction of `y`. @@ -838,10 +838,10 @@ y | `Float64` | The direction towards which to find the next representable value assert (1.0).nextafter(1.1) == 1.0000000000000002 ``` -## Float64.parse +## Float.parse ```tomo -Float64.parse : func(text: Text, remainder: &Text? = none -> Float64?) +Float.parse : func(text: Text, remainder: &Text? = none -> Float?) ``` Converts a text representation of a number into a floating-point number. @@ -856,26 +856,26 @@ remainder | `&Text?` | If non-none, this argument will be set to the remainder o **Example:** ```tomo -assert Float64.parse("3.14") == 3.14 -assert Float64.parse("1e3") == 1000 -assert Float64.parse("1.5junk") == none +assert Float.parse("3.14") == 3.14 +assert Float.parse("1e3") == 1000 +assert Float.parse("1.5junk") == none remainder : Text -assert Float64.parse("1.5junk", &remainder) == 1.5 +assert Float.parse("1.5junk", &remainder) == 1.5 assert remainder == "junk" ``` -## Float64.percent +## Float.percent ```tomo -Float64.percent : func(n: Float64, precision: Float64 = 0.01 -> Text) +Float.percent : func(n: Float, precision: Float = 0.01 -> Text) ``` Convert a number into a percentage text with a percent sign. Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be converted to a percent. | - -precision | `Float64` | Round the percentage to this precision level. | `0.01` +n | `Float` | The number to be converted to a percent. | - +precision | `Float` | Round the percentage to this precision level. | `0.01` **Return:** A text representation of the number as a percentage with a percent sign. @@ -888,17 +888,17 @@ assert (1./3.).percent(2, precision=0.0001) == "33.3333%" assert (1./3.).percent(2, precision=10.) == "30%" ``` -## Float64.rint +## Float.rint ```tomo -Float64.rint : func(x: Float64 -> Float64) +Float.rint : func(x: Float -> Float) ``` Rounds a number to the nearest integer, with ties rounded to the nearest even integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded. | - +x | `Float` | The number to be rounded. | - **Return:** The nearest integer value of `x`. @@ -909,17 +909,17 @@ assert (3.5).rint() == 4 assert (2.5).rint() == 2 ``` -## Float64.round +## Float.round ```tomo -Float64.round : func(x: Float64 -> Float64) +Float.round : func(x: Float -> Float) ``` Rounds a number to the nearest whole number integer. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be rounded. | - +x | `Float` | The number to be rounded. | - **Return:** The nearest integer value of `x`. @@ -930,17 +930,17 @@ assert (2.3).round() == 2 assert (2.7).round() == 3 ``` -## Float64.significand +## Float.significand ```tomo -Float64.significand : func(x: Float64 -> Float64) +Float.significand : func(x: Float -> Float) ``` Extracts the significand (or mantissa) of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number from which to extract the significand. | - +x | `Float` | The number from which to extract the significand. | - **Return:** The significand of `x`. @@ -950,17 +950,17 @@ x | `Float64` | The number from which to extract the significand. | - assert (1234.567).significand() == 0.1234567 ``` -## Float64.sin +## Float.sin ```tomo -Float64.sin : func(x: Float64 -> Float64) +Float.sin : func(x: Float -> Float) ``` Computes the sine of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The sine of `x`. @@ -970,17 +970,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).sin() == 0 ``` -## Float64.sinh +## Float.sinh ```tomo -Float64.sinh : func(x: Float64 -> Float64) +Float.sinh : func(x: Float -> Float) ``` Computes the hyperbolic sine of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic sine is to be calculated. | - +x | `Float` | The number for which the hyperbolic sine is to be calculated. | - **Return:** The hyperbolic sine of `x`. @@ -990,17 +990,17 @@ x | `Float64` | The number for which the hyperbolic sine is to be calculated. | assert (0.0).sinh() == 0 ``` -## Float64.sqrt +## Float.sqrt ```tomo -Float64.sqrt : func(x: Float64 -> Float64) +Float.sqrt : func(x: Float -> Float) ``` Computes the square root of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the square root is to be calculated. | - +x | `Float` | The number for which the square root is to be calculated. | - **Return:** The square root of `x`. @@ -1010,17 +1010,17 @@ x | `Float64` | The number for which the square root is to be calculated. | - assert (16.0).sqrt() == 4 ``` -## Float64.tan +## Float.tan ```tomo -Float64.tan : func(x: Float64 -> Float64) +Float.tan : func(x: Float -> Float) ``` Computes the tangent of a number (angle in radians). Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The angle in radians. | - +x | `Float` | The angle in radians. | - **Return:** The tangent of `x`. @@ -1030,17 +1030,17 @@ x | `Float64` | The angle in radians. | - assert (0.0).tan() == 0 ``` -## Float64.tanh +## Float.tanh ```tomo -Float64.tanh : func(x: Float64 -> Float64) +Float.tanh : func(x: Float -> Float) ``` Computes the hyperbolic tangent of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the hyperbolic tangent is to be calculated. | - +x | `Float` | The number for which the hyperbolic tangent is to be calculated. | - **Return:** The hyperbolic tangent of `x`. @@ -1050,17 +1050,17 @@ x | `Float64` | The number for which the hyperbolic tangent is to be calculated. assert (0.0).tanh() == 0 ``` -## Float64.tgamma +## Float.tgamma ```tomo -Float64.tgamma : func(x: Float64 -> Float64) +Float.tgamma : func(x: Float -> Float) ``` Computes the gamma function of a number. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the gamma function is to be calculated. | - +x | `Float` | The number for which the gamma function is to be calculated. | - **Return:** The gamma function of `x`. @@ -1070,17 +1070,17 @@ x | `Float64` | The number for which the gamma function is to be calculated. | assert (1.0).tgamma() == 1 ``` -## Float64.trunc +## Float.trunc ```tomo -Float64.trunc : func(x: Float64 -> Float64) +Float.trunc : func(x: Float -> Float) ``` Truncates a number to the nearest integer towards zero. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number to be truncated. | - +x | `Float` | The number to be truncated. | - **Return:** The integer part of `x` towards zero. @@ -1091,18 +1091,18 @@ assert (3.7).trunc() == 3 assert (-3.7).trunc() == -3 ``` -## Float64.with_precision +## Float.with_precision ```tomo -Float64.with_precision : func(n: Float64, precision: Float64 -> Float64) +Float.with_precision : func(n: Float, precision: Float -> Float) ``` Round a number to the given precision level (specified as `10`, `.1`, `.001` etc). Argument | Type | Description | Default ---------|------|-------------|--------- -n | `Float64` | The number to be rounded to a given precision. | - -precision | `Float64` | The precision to which the number should be rounded. | - +n | `Float` | The number to be rounded to a given precision. | - +precision | `Float` | The precision to which the number should be rounded. | - **Return:** The number, rounded to the given precision level. @@ -1114,17 +1114,17 @@ assert (123456.).with_precision(100) == 123500 assert (1234567.).with_precision(5) == 1234565 ``` -## Float64.y0 +## Float.y0 ```tomo -Float64.y0 : func(x: Float64 -> Float64) +Float.y0 : func(x: Float -> Float) ``` Computes the Bessel function of the second kind of order 0. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the second kind of order 0 of `x`. @@ -1134,17 +1134,17 @@ x | `Float64` | The number for which the Bessel function is to be calculated. | assert (1.0).y0() == -0.7652 ``` -## Float64.y1 +## Float.y1 ```tomo -Float64.y1 : func(x: Float64 -> Float64) +Float.y1 : func(x: Float -> Float) ``` Computes the Bessel function of the second kind of order 1. Argument | Type | Description | Default ---------|------|-------------|--------- -x | `Float64` | The number for which the Bessel function is to be calculated. | - +x | `Float` | The number for which the Bessel function is to be calculated. | - **Return:** The Bessel function of the second kind of order 1 of `x`. diff --git a/api/floats.yaml b/api/floats.yaml index 64ec6719..3720b160 100644 --- a/api/floats.yaml +++ b/api/floats.yaml @@ -1,339 +1,339 @@ -Float64.abs: +Float.abs: short: absolute value description: > Calculates the absolute value of a number. return: - type: 'Float64' + type: 'Float' description: > The absolute value of `n`. args: n: - type: 'Float64' + type: 'Float' description: > The number whose absolute value is to be computed. example: | assert (-3.5).abs() == 3.5 -Float64.acos: +Float.acos: short: arc cosine description: > Computes the arc cosine of a number. return: - type: 'Float64' + type: 'Float' description: > The arc cosine of `x` in radians. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the arc cosine is to be calculated. example: | assert (0.0).acos() == 1.5708 -Float64.acosh: +Float.acosh: short: arc hyperbolic cosine description: > Computes the inverse hyperbolic cosine of a number. return: - type: 'Float64' + type: 'Float' description: > The inverse hyperbolic cosine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the inverse hyperbolic cosine is to be calculated. example: | assert (1.0).acosh() == 0 -Float64.asin: +Float.asin: short: arc sine description: > Computes the arc sine of a number. return: - type: 'Float64' + type: 'Float' description: > The arc sine of `x` in radians. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the arc sine is to be calculated. example: | assert (0.5).asin() == 0.5236 -Float64.asinh: +Float.asinh: short: arc hyperbolic sine description: > Computes the inverse hyperbolic sine of a number. return: - type: 'Float64' + type: 'Float' description: > The inverse hyperbolic sine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the inverse hyperbolic sine is to be calculated. example: | assert (0.0).asinh() == 0 -Float64.atan: +Float.atan: short: arc tangent description: > Computes the arc tangent of a number. return: - type: 'Float64' + type: 'Float' description: > The arc tangent of `x` in radians. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the arc tangent is to be calculated. example: | assert (1.0).atan() == 0.7854 -Float64.atan2: +Float.atan2: short: arc tangent from 2 variables description: > Computes the arc tangent of the quotient of two numbers. return: - type: 'Float64' + type: 'Float' description: > The arc tangent of `x/y` in radians. args: x: - type: 'Float64' + type: 'Float' description: > The numerator. y: - type: 'Float64' + type: 'Float' description: > The denominator. example: | - assert Float64.atan2(1, 1) == 0.7854 + assert Float.atan2(1, 1) == 0.7854 -Float64.atanh: +Float.atanh: short: arc hyperbolic tangent. description: > Computes the inverse hyperbolic tangent of a number. return: - type: 'Float64' + type: 'Float' description: > The inverse hyperbolic tangent of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the inverse hyperbolic tangent is to be calculated. example: | assert (0.5).atanh() == 0.5493 -Float64.cbrt: +Float.cbrt: short: cube root description: > Computes the cube root of a number. return: - type: 'Float64' + type: 'Float' description: > The cube root of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the cube root is to be calculated. example: | assert (27.0).cbrt() == 3 -Float64.ceil: +Float.ceil: short: ceiling function description: > Rounds a number up to the nearest integer. return: - type: 'Float64' + type: 'Float' description: > The smallest integer greater than or equal to `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number to be rounded up. example: | assert (3.2).ceil() == 4 -Float64.clamped: +Float.clamped: short: clamp a number description: > Returns the given number clamped between two values so that it is within that range. return: - type: 'Float64' + type: 'Float' description: > The first argument clamped between the other two arguments. args: x: - type: 'Float64' + type: 'Float' description: > The number to clamp. low: - type: 'Float64' + type: 'Float' description: > The lowest value the result can take. high: - type: 'Float64' + type: 'Float' description: > The highest value the result can take. example: | assert (2.5).clamped(5.5, 10.5) == 5.5 -Float64.copysign: +Float.copysign: short: copy a number's sign description: > Copies the sign of one number to another. return: - type: 'Float64' + type: 'Float' description: > A number with the magnitude of `x` and the sign of `y`. args: x: - type: 'Float64' + type: 'Float' description: > The number whose magnitude will be copied. y: - type: 'Float64' + type: 'Float' description: > The number whose sign will be copied. example: | assert (3.0).copysign(-1) == -3 -Float64.cos: +Float.cos: short: cosine description: > Computes the cosine of a number (angle in radians). return: - type: 'Float64' + type: 'Float' description: > The cosine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The angle in radians. example: | assert (0.0).cos() == 1 -Float64.cosh: +Float.cosh: short: hyperbolic cosine description: > Computes the hyperbolic cosine of a number. return: - type: 'Float64' + type: 'Float' description: > The hyperbolic cosine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the hyperbolic cosine is to be calculated. example: | assert (0.0).cosh() == 1 -Float64.erf: +Float.erf: short: error function description: > Computes the error function of a number. return: - type: 'Float64' + type: 'Float' description: > The error function of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the error function is to be calculated. example: | assert (0.0).erf() == 0 -Float64.erfc: +Float.erfc: short: complimentary error function description: > Computes the complementary error function of a number. return: - type: 'Float64' + type: 'Float' description: > The complementary error function of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the complementary error function is to be calculated. example: | assert (0.0).erfc() == 1 -Float64.exp: +Float.exp: short: base-e exponentiation description: > Computes the exponential function $e^x$ for a number. return: - type: 'Float64' + type: 'Float' description: > The value of $e^x$. args: x: - type: 'Float64' + type: 'Float' description: > The exponent. example: | assert (1.0).exp() == 2.7183 -Float64.exp2: +Float.exp2: short: base-2 exponentiation description: > Computes $2^x$ for a number. return: - type: 'Float64' + type: 'Float' description: > The value of $2^x$. args: x: - type: 'Float64' + type: 'Float' description: > The exponent. example: | assert (3.0).exp2() == 8 -Float64.expm1: +Float.expm1: short: base-e exponential minus 1 description: > Computes $e^x - 1$ for a number. return: - type: 'Float64' + type: 'Float' description: > The value of $e^x - 1$. args: x: - type: 'Float64' + type: 'Float' description: > The exponent. example: | assert (1.0).expm1() == 1.7183 -Float64.fdim: +Float.fdim: short: positive difference description: > Computes the positive difference between two numbers. return: - type: 'Float64' + type: 'Float' description: > The positive difference $\max(0, x - y)$. args: x: - type: 'Float64' + type: 'Float' description: > The first number. y: - type: 'Float64' + type: 'Float' description: > The second number. example: | @@ -341,43 +341,43 @@ Float64.fdim: assert (5.0).fdim(3) == 2 -Float64.floor: +Float.floor: short: floor function description: > Rounds a number down to the nearest integer. return: - type: 'Float64' + type: 'Float' description: > The largest integer less than or equal to `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number to be rounded down. example: | assert (3.7).floor() == 3 -Float64.hypot: +Float.hypot: short: Euclidean distance function description: > Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. return: - type: 'Float64' + type: 'Float' description: > The Euclidean norm of `x` and `y`. args: x: - type: 'Float64' + type: 'Float' description: > The first number. y: - type: 'Float64' + type: 'Float' description: > The second number. example: | - assert Float64.hypot(3, 4) == 5 + assert Float.hypot(3, 4) == 5 -Float64.isfinite: +Float.isfinite: short: check for finite number description: > Checks if a number is finite. @@ -387,14 +387,14 @@ Float64.isfinite: `yes` if `n` is finite, `no` otherwise. args: n: - type: 'Float64' + type: 'Float' description: > The number to be checked. example: | assert (1.0).isfinite() == yes - assert Float64.INF.isfinite() == no + assert Float.INF.isfinite() == no -Float64.is_between: +Float.is_between: short: check if a number is in a range description: > Determines if a number is between two numbers (inclusive). @@ -404,15 +404,15 @@ Float64.is_between: `yes` if `low <= x and x <= high`, otherwise `no` args: x: - type: 'Float64' + type: 'Float' description: > The integer to be checked. low: - type: 'Float64' + type: 'Float' description: > The lower bound to check (inclusive). high: - type: 'Float64' + type: 'Float' description: > The upper bound to check (inclusive). example: | @@ -420,7 +420,7 @@ Float64.is_between: assert (7.5).is_between(100, 200) == no assert (7.5).is_between(1, 7.5) == yes -Float64.isinf: +Float.isinf: short: check for infinite number description: > Checks if a number is infinite. @@ -430,151 +430,151 @@ Float64.isinf: `yes` if `n` is infinite, `no` otherwise. args: n: - type: 'Float64' + type: 'Float' description: > The number to be checked. example: | - assert Float64.INF.isinf() == yes + assert Float.INF.isinf() == yes assert (1.0).isinf() == no -Float64.j0: +Float.j0: short: Bessel function description: > Computes the Bessel function of the first kind of order 0. return: - type: 'Float64' + type: 'Float' description: > The Bessel function of the first kind of order 0 of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the Bessel function is to be calculated. example: | assert (0.0).j0() == 1 -Float64.j1: +Float.j1: short: Bessel function description: > Computes the Bessel function of the first kind of order 1. return: - type: 'Float64' + type: 'Float' description: > The Bessel function of the first kind of order 1 of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the Bessel function is to be calculated. example: | assert (0.0).j1() == 0 -Float64.log: +Float.log: short: natural logarithm description: > Computes the natural logarithm (base $e$) of a number. return: - type: 'Float64' + type: 'Float' description: > The natural logarithm of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the natural logarithm is to be calculated. example: | - assert Float64.E.log() == 1 + assert Float.E.log() == 1 -Float64.log10: +Float.log10: short: logarithm base-10 description: > Computes the base-10 logarithm of a number. return: - type: 'Float64' + type: 'Float' description: > The base-10 logarithm of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the base-10 logarithm is to be calculated. example: | assert (100.0).log10() == 2 -Float64.log1p: +Float.log1p: short: logarithm of 1 plus x description: > Computes $\log(1 + x)$ for a number. return: - type: 'Float64' + type: 'Float' description: > The value of $\log(1 + x)$. args: x: - type: 'Float64' + type: 'Float' description: > The number for which $\log(1 + x)$ is to be calculated. example: | assert (1.0).log1p() == 0.6931 -Float64.log2: +Float.log2: short: logarithm base-2 description: > Computes the base-2 logarithm of a number. return: - type: 'Float64' + type: 'Float' description: > The base-2 logarithm of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the base-2 logarithm is to be calculated. example: | assert (8.0).log2() == 3 -Float64.logb: +Float.logb: short: exponent of a floating point value description: > Computes the binary exponent (base-2 logarithm) of a number. return: - type: 'Float64' + type: 'Float' description: > The binary exponent of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the binary exponent is to be calculated. example: | assert (8.0).logb() == 3 -Float64.mix: +Float.mix: short: mix two numbers by an amount description: > Interpolates between two numbers based on a given amount. return: - type: 'Float64' + type: 'Float' description: > The interpolated number between `x` and `y` based on `amount`. args: amount: - type: 'Float64' + type: 'Float' description: > The interpolation factor (between `0` and `1`). x: - type: 'Float64' + type: 'Float' description: > The starting number. y: - type: 'Float64' + type: 'Float' description: > The ending number. example: | assert (0.5).mix(10, 20) == 15 assert (0.25).mix(10, 20) == 12.5 -Float64.near: +Float.near: short: check if two numbers are near each other description: > Checks if two numbers are approximately equal within specified tolerances. If @@ -586,20 +586,20 @@ Float64.near: `yes` if `x` and `y` are approximately equal within the specified tolerances, `no` otherwise. args: x: - type: 'Float64' + type: 'Float' description: > The first number. y: - type: 'Float64' + type: 'Float' description: > The second number. ratio: - type: 'Float64' + type: 'Float' default: '1e-9' description: > The relative tolerance. Default is `1e-9`. min_epsilon: - type: 'Float64' + type: 'Float' default: '1e-9' description: > The absolute tolerance. Default is `1e-9`. @@ -608,32 +608,32 @@ Float64.near: assert (100.0).near(110, ratio=0.1) == yes assert (5.0).near(5.1, min_epsilon=0.1) == yes -Float64.nextafter: +Float.nextafter: short: next floating point number description: > Computes the next representable value after a given number towards a specified direction. return: - type: 'Float64' + type: 'Float' description: > The next representable value after `x` in the direction of `y`. args: x: - type: 'Float64' + type: 'Float' description: > The starting number. y: - type: 'Float64' + type: 'Float' description: > The direction towards which to find the next representable value. example: | assert (1.0).nextafter(1.1) == 1.0000000000000002 -Float64.parse: +Float.parse: short: convert text to number description: > Converts a text representation of a number into a floating-point number. return: - type: 'Float64?' + type: 'Float?' description: > The number represented by the text or `none` if the entire text can't be parsed as a number. @@ -649,14 +649,14 @@ Float64.parse: If non-none, this argument will be set to the remainder of the text after the matching part. If none, parsing will only succeed if the entire text matches. example: | - assert Float64.parse("3.14") == 3.14 - assert Float64.parse("1e3") == 1000 - assert Float64.parse("1.5junk") == none + assert Float.parse("3.14") == 3.14 + assert Float.parse("1e3") == 1000 + assert Float.parse("1.5junk") == none remainder : Text - assert Float64.parse("1.5junk", &remainder) == 1.5 + assert Float.parse("1.5junk", &remainder) == 1.5 assert remainder == "junk" -Float64.percent: +Float.percent: short: format as a percentage description: > Convert a number into a percentage text with a percent sign. @@ -666,11 +666,11 @@ Float64.percent: A text representation of the number as a percentage with a percent sign. args: n: - type: 'Float64' + type: 'Float' description: > The number to be converted to a percent. precision: - type: 'Float64' + type: 'Float' default: '0.01' description: > Round the percentage to this precision level. @@ -680,21 +680,21 @@ Float64.percent: assert (1./3.).percent(2, precision=0.0001) == "33.3333%" assert (1./3.).percent(2, precision=10.) == "30%" -Float64.with_precision: +Float.with_precision: short: round to a given precision description: > Round a number to the given precision level (specified as `10`, `.1`, `.001` etc). return: - type: 'Float64' + type: 'Float' description: > The number, rounded to the given precision level. args: n: - type: 'Float64' + type: 'Float' description: > The number to be rounded to a given precision. precision: - type: 'Float64' + type: 'Float' description: > The precision to which the number should be rounded. example: | @@ -702,269 +702,269 @@ Float64.with_precision: assert (123456.).with_precision(100) == 123500 assert (1234567.).with_precision(5) == 1234565 -Float64.rint: +Float.rint: short: round to nearest integer description: > Rounds a number to the nearest integer, with ties rounded to the nearest even integer. return: - type: 'Float64' + type: 'Float' description: > The nearest integer value of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number to be rounded. example: | assert (3.5).rint() == 4 assert (2.5).rint() == 2 -Float64.round: +Float.round: short: round to nearest integer description: > Rounds a number to the nearest whole number integer. return: - type: 'Float64' + type: 'Float' description: > The nearest integer value of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number to be rounded. example: | assert (2.3).round() == 2 assert (2.7).round() == 3 -Float64.significand: +Float.significand: short: get mantissa description: > Extracts the significand (or mantissa) of a number. return: - type: 'Float64' + type: 'Float' description: > The significand of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number from which to extract the significand. example: | assert (1234.567).significand() == 0.1234567 -Float64.sin: +Float.sin: short: sine description: > Computes the sine of a number (angle in radians). return: - type: 'Float64' + type: 'Float' description: > The sine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The angle in radians. example: | assert (0.0).sin() == 0 -Float64.sinh: +Float.sinh: short: hyperbolic sine description: > Computes the hyperbolic sine of a number. return: - type: 'Float64' + type: 'Float' description: > The hyperbolic sine of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the hyperbolic sine is to be calculated. example: | assert (0.0).sinh() == 0 -Float64.sqrt: +Float.sqrt: short: square root description: > Computes the square root of a number. return: - type: 'Float64' + type: 'Float' description: > The square root of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the square root is to be calculated. example: | assert (16.0).sqrt() == 4 -Float64.tan: +Float.tan: short: tangent description: > Computes the tangent of a number (angle in radians). return: - type: 'Float64' + type: 'Float' description: > The tangent of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The angle in radians. example: | assert (0.0).tan() == 0 -Float64.tanh: +Float.tanh: short: hyperbolic tangent description: > Computes the hyperbolic tangent of a number. return: - type: 'Float64' + type: 'Float' description: > The hyperbolic tangent of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the hyperbolic tangent is to be calculated. example: | assert (0.0).tanh() == 0 -Float64.tgamma: +Float.tgamma: short: "true gamma function" description: > Computes the gamma function of a number. return: - type: 'Float64' + type: 'Float' description: > The gamma function of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the gamma function is to be calculated. example: | assert (1.0).tgamma() == 1 -Float64.trunc: +Float.trunc: short: truncate a number description: > Truncates a number to the nearest integer towards zero. return: - type: 'Float64' + type: 'Float' description: > The integer part of `x` towards zero. args: x: - type: 'Float64' + type: 'Float' description: > The number to be truncated. example: | assert (3.7).trunc() == 3 assert (-3.7).trunc() == -3 -Float64.y0: +Float.y0: short: Bessel function description: > Computes the Bessel function of the second kind of order 0. return: - type: 'Float64' + type: 'Float' description: > The Bessel function of the second kind of order 0 of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the Bessel function is to be calculated. example: | assert (1.0).y0() == -0.7652 -Float64.y1: +Float.y1: short: Bessel function description: > Computes the Bessel function of the second kind of order 1. return: - type: 'Float64' + type: 'Float' description: > The Bessel function of the second kind of order 1 of `x`. args: x: - type: 'Float64' + type: 'Float' description: > The number for which the Bessel function is to be calculated. example: | assert (1.0).y1() == 0.4401 -Float64.1_PI: +Float.1_PI: short: 1/pi - type: Float64 + type: Float description: > The constant $\frac{1}{\pi}$. -Float64.2_PI: +Float.2_PI: short: 2*pi - type: Float64 + type: Float description: > The constant $2 \times \pi$. -Float64.2_SQRTPI: +Float.2_SQRTPI: short: 2*sqrt(pi) - type: Float64 + type: Float description: > The constant $2 \times \sqrt{\pi}$. -Float64.E: +Float.E: short: Euler's constant - type: Float64 + type: Float description: > The base of the natural logarithm ($e$). -Float64.INF: +Float.INF: short: infinity - type: Float64 + type: Float description: > Positive infinity. -Float64.LN10: +Float.LN10: short: log(10) - type: Float64 + type: Float description: > The natural logarithm of 10. -Float64.LN2: +Float.LN2: short: log(2) - type: Float64 + type: Float description: > The natural logarithm of 2. -Float64.LOG2E: +Float.LOG2E: short: log_2(e) - type: Float64 + type: Float description: > The base 2 logarithm of $e$ -Float64.PI: +Float.PI: short: pi - type: Float64 + type: Float description: > Pi ($\pi$). -Float64.PI_2: +Float.PI_2: short: pi/2 - type: Float64 + type: Float description: > $\frac{\pi}{2}$ -Float64.PI_4: +Float.PI_4: short: pi/4 - type: Float64 + type: Float description: > $\frac{\pi}{4}$ -Float64.SQRT1_2: +Float.SQRT1_2: short: sqrt(1/2) - type: Float64 + type: Float description: > $\sqrt{\frac{1}{2}}$ -Float64.SQRT2: +Float.SQRT2: short: sqrt(2) - type: Float64 + type: Float description: > $\sqrt{2}$ -Float64.TAU: +Float.TAU: short: 2*pi - type: Float64 + type: Float description: > Tau ($2 \times \pi$) diff --git a/man/man3/tomo-Float64.1_PI.3 b/man/man3/tomo-Float.1_PI.3 index 67f6b16a..924e676d 100644 --- a/man/man3/tomo-Float64.1_PI.3 +++ b/man/man3/tomo-Float.1_PI.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.1_PI 3 2025-12-11 "Tomo man-pages" +.TH Float.1_PI 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.1_PI \- 1/pi +Float.1_PI \- 1/pi .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.1_PI\ :\ Float64 +.BI Float.1_PI\ :\ Float .fi .SH DESCRIPTION The constant $\frac{1}{\pi}$. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.2_PI.3 b/man/man3/tomo-Float.2_PI.3 index 5a9edc50..aebce5eb 100644 --- a/man/man3/tomo-Float64.2_PI.3 +++ b/man/man3/tomo-Float.2_PI.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.2_PI 3 2025-12-11 "Tomo man-pages" +.TH Float.2_PI 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.2_PI \- 2*pi +Float.2_PI \- 2*pi .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.2_PI\ :\ Float64 +.BI Float.2_PI\ :\ Float .fi .SH DESCRIPTION The constant $2 \times \pi$. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.2_SQRTPI.3 b/man/man3/tomo-Float.2_SQRTPI.3 index 28d600ce..7784602b 100644 --- a/man/man3/tomo-Float64.2_SQRTPI.3 +++ b/man/man3/tomo-Float.2_SQRTPI.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.2_SQRTPI 3 2025-12-11 "Tomo man-pages" +.TH Float.2_SQRTPI 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.2_SQRTPI \- 2*sqrt(pi) +Float.2_SQRTPI \- 2*sqrt(pi) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.2_SQRTPI\ :\ Float64 +.BI Float.2_SQRTPI\ :\ Float .fi .SH DESCRIPTION The constant $2 \times \sqrt{\pi}$. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float.3 b/man/man3/tomo-Float.3 new file mode 100644 index 00000000..e58ea7a7 --- /dev/null +++ b/man/man3/tomo-Float.3 @@ -0,0 +1,523 @@ +'\" t +.\" Copyright (c) 2025 Bruce Hill +.\" All rights reserved. +.\" +.TH Float 3 2025-12-11 "Tomo man-pages" +.SH NAME +Float \- a Tomo type +.SH LIBRARY +Tomo Standard Library +.fi +.SH METHODS + +.TP +.BI Float.1_PI\ :\ Float +The constant $\frac{1}{\pi}$. + +For more, see: +.BR Tomo-Float.1_PI (3) + + +.TP +.BI Float.2_PI\ :\ Float +The constant $2 \times \pi$. + +For more, see: +.BR Tomo-Float.2_PI (3) + + +.TP +.BI Float.2_SQRTPI\ :\ Float +The constant $2 \times \sqrt{\pi}$. + +For more, see: +.BR Tomo-Float.2_SQRTPI (3) + + +.TP +.BI Float.E\ :\ Float +The base of the natural logarithm ($e$). + +For more, see: +.BR Tomo-Float.E (3) + + +.TP +.BI Float.INF\ :\ Float +Positive infinity. + +For more, see: +.BR Tomo-Float.INF (3) + + +.TP +.BI Float.LN10\ :\ Float +The natural logarithm of 10. + +For more, see: +.BR Tomo-Float.LN10 (3) + + +.TP +.BI Float.LN2\ :\ Float +The natural logarithm of 2. + +For more, see: +.BR Tomo-Float.LN2 (3) + + +.TP +.BI Float.LOG2E\ :\ Float +The base 2 logarithm of $e$ + +For more, see: +.BR Tomo-Float.LOG2E (3) + + +.TP +.BI Float.PI\ :\ Float +Pi ($\pi$). + +For more, see: +.BR Tomo-Float.PI (3) + + +.TP +.BI Float.PI_2\ :\ Float +$\frac{\pi}{2}$ + +For more, see: +.BR Tomo-Float.PI_2 (3) + + +.TP +.BI Float.PI_4\ :\ Float +$\frac{\pi}{4}$ + +For more, see: +.BR Tomo-Float.PI_4 (3) + + +.TP +.BI Float.SQRT1_2\ :\ Float +$\sqrt{\frac{1}{2}}$ + +For more, see: +.BR Tomo-Float.SQRT1_2 (3) + + +.TP +.BI Float.SQRT2\ :\ Float +$\sqrt{2}$ + +For more, see: +.BR Tomo-Float.SQRT2 (3) + + +.TP +.BI Float.TAU\ :\ Float +Tau ($2 \times \pi$) + +For more, see: +.BR Tomo-Float.TAU (3) + + +.TP +.BI Float.abs\ :\ func(n:\ Float\ ->\ Float) +Calculates the absolute value of a number. + +For more, see: +.BR Tomo-Float.abs (3) + + +.TP +.BI Float.acos\ :\ func(x:\ Float\ ->\ Float) +Computes the arc cosine of a number. + +For more, see: +.BR Tomo-Float.acos (3) + + +.TP +.BI Float.acosh\ :\ func(x:\ Float\ ->\ Float) +Computes the inverse hyperbolic cosine of a number. + +For more, see: +.BR Tomo-Float.acosh (3) + + +.TP +.BI Float.asin\ :\ func(x:\ Float\ ->\ Float) +Computes the arc sine of a number. + +For more, see: +.BR Tomo-Float.asin (3) + + +.TP +.BI Float.asinh\ :\ func(x:\ Float\ ->\ Float) +Computes the inverse hyperbolic sine of a number. + +For more, see: +.BR Tomo-Float.asinh (3) + + +.TP +.BI Float.atan\ :\ func(x:\ Float\ ->\ Float) +Computes the arc tangent of a number. + +For more, see: +.BR Tomo-Float.atan (3) + + +.TP +.BI Float.atan2\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) +Computes the arc tangent of the quotient of two numbers. + +For more, see: +.BR Tomo-Float.atan2 (3) + + +.TP +.BI Float.atanh\ :\ func(x:\ Float\ ->\ Float) +Computes the inverse hyperbolic tangent of a number. + +For more, see: +.BR Tomo-Float.atanh (3) + + +.TP +.BI Float.cbrt\ :\ func(x:\ Float\ ->\ Float) +Computes the cube root of a number. + +For more, see: +.BR Tomo-Float.cbrt (3) + + +.TP +.BI Float.ceil\ :\ func(x:\ Float\ ->\ Float) +Rounds a number up to the nearest integer. + +For more, see: +.BR Tomo-Float.ceil (3) + + +.TP +.BI Float.clamped\ :\ func(x:\ Float,\ low:\ Float,\ high:\ Float\ ->\ Float) +Returns the given number clamped between two values so that it is within that range. + +For more, see: +.BR Tomo-Float.clamped (3) + + +.TP +.BI Float.copysign\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) +Copies the sign of one number to another. + +For more, see: +.BR Tomo-Float.copysign (3) + + +.TP +.BI Float.cos\ :\ func(x:\ Float\ ->\ Float) +Computes the cosine of a number (angle in radians). + +For more, see: +.BR Tomo-Float.cos (3) + + +.TP +.BI Float.cosh\ :\ func(x:\ Float\ ->\ Float) +Computes the hyperbolic cosine of a number. + +For more, see: +.BR Tomo-Float.cosh (3) + + +.TP +.BI Float.erf\ :\ func(x:\ Float\ ->\ Float) +Computes the error function of a number. + +For more, see: +.BR Tomo-Float.erf (3) + + +.TP +.BI Float.erfc\ :\ func(x:\ Float\ ->\ Float) +Computes the complementary error function of a number. + +For more, see: +.BR Tomo-Float.erfc (3) + + +.TP +.BI Float.exp\ :\ func(x:\ Float\ ->\ Float) +Computes the exponential function $e^x$ for a number. + +For more, see: +.BR Tomo-Float.exp (3) + + +.TP +.BI Float.exp2\ :\ func(x:\ Float\ ->\ Float) +Computes $2^x$ for a number. + +For more, see: +.BR Tomo-Float.exp2 (3) + + +.TP +.BI Float.expm1\ :\ func(x:\ Float\ ->\ Float) +Computes $e^x - 1$ for a number. + +For more, see: +.BR Tomo-Float.expm1 (3) + + +.TP +.BI Float.fdim\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) +Computes the positive difference between two numbers. + +For more, see: +.BR Tomo-Float.fdim (3) + + +.TP +.BI Float.floor\ :\ func(x:\ Float\ ->\ Float) +Rounds a number down to the nearest integer. + +For more, see: +.BR Tomo-Float.floor (3) + + +.TP +.BI Float.hypot\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) +Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. + +For more, see: +.BR Tomo-Float.hypot (3) + + +.TP +.BI Float.is_between\ :\ func(x:\ Float,\ low:\ Float,\ high:\ Float\ ->\ Bool) +Determines if a number is between two numbers (inclusive). + +For more, see: +.BR Tomo-Float.is_between (3) + + +.TP +.BI Float.isfinite\ :\ func(n:\ Float\ ->\ Bool) +Checks if a number is finite. + +For more, see: +.BR Tomo-Float.isfinite (3) + + +.TP +.BI Float.isinf\ :\ func(n:\ Float\ ->\ Bool) +Checks if a number is infinite. + +For more, see: +.BR Tomo-Float.isinf (3) + + +.TP +.BI Float.j0\ :\ func(x:\ Float\ ->\ Float) +Computes the Bessel function of the first kind of order 0. + +For more, see: +.BR Tomo-Float.j0 (3) + + +.TP +.BI Float.j1\ :\ func(x:\ Float\ ->\ Float) +Computes the Bessel function of the first kind of order 1. + +For more, see: +.BR Tomo-Float.j1 (3) + + +.TP +.BI Float.log\ :\ func(x:\ Float\ ->\ Float) +Computes the natural logarithm (base $e$) of a number. + +For more, see: +.BR Tomo-Float.log (3) + + +.TP +.BI Float.log10\ :\ func(x:\ Float\ ->\ Float) +Computes the base-10 logarithm of a number. + +For more, see: +.BR Tomo-Float.log10 (3) + + +.TP +.BI Float.log1p\ :\ func(x:\ Float\ ->\ Float) +Computes $\log(1 + x)$ for a number. + +For more, see: +.BR Tomo-Float.log1p (3) + + +.TP +.BI Float.log2\ :\ func(x:\ Float\ ->\ Float) +Computes the base-2 logarithm of a number. + +For more, see: +.BR Tomo-Float.log2 (3) + + +.TP +.BI Float.logb\ :\ func(x:\ Float\ ->\ Float) +Computes the binary exponent (base-2 logarithm) of a number. + +For more, see: +.BR Tomo-Float.logb (3) + + +.TP +.BI Float.mix\ :\ func(amount:\ Float,\ x:\ Float,\ y:\ Float\ ->\ Float) +Interpolates between two numbers based on a given amount. + +For more, see: +.BR Tomo-Float.mix (3) + + +.TP +.BI Float.near\ :\ func(x:\ Float,\ y:\ Float,\ ratio:\ Float\ =\ 1e-9,\ min_epsilon:\ Float\ =\ 1e-9\ ->\ Bool) +Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. + +For more, see: +.BR Tomo-Float.near (3) + + +.TP +.BI Float.nextafter\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) +Computes the next representable value after a given number towards a specified direction. + +For more, see: +.BR Tomo-Float.nextafter (3) + + +.TP +.BI Float.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Float?) +Converts a text representation of a number into a floating-point number. + +For more, see: +.BR Tomo-Float.parse (3) + + +.TP +.BI Float.percent\ :\ func(n:\ Float,\ precision:\ Float\ =\ 0.01\ ->\ Text) +Convert a number into a percentage text with a percent sign. + +For more, see: +.BR Tomo-Float.percent (3) + + +.TP +.BI Float.rint\ :\ func(x:\ Float\ ->\ Float) +Rounds a number to the nearest integer, with ties rounded to the nearest even integer. + +For more, see: +.BR Tomo-Float.rint (3) + + +.TP +.BI Float.round\ :\ func(x:\ Float\ ->\ Float) +Rounds a number to the nearest whole number integer. + +For more, see: +.BR Tomo-Float.round (3) + + +.TP +.BI Float.significand\ :\ func(x:\ Float\ ->\ Float) +Extracts the significand (or mantissa) of a number. + +For more, see: +.BR Tomo-Float.significand (3) + + +.TP +.BI Float.sin\ :\ func(x:\ Float\ ->\ Float) +Computes the sine of a number (angle in radians). + +For more, see: +.BR Tomo-Float.sin (3) + + +.TP +.BI Float.sinh\ :\ func(x:\ Float\ ->\ Float) +Computes the hyperbolic sine of a number. + +For more, see: +.BR Tomo-Float.sinh (3) + + +.TP +.BI Float.sqrt\ :\ func(x:\ Float\ ->\ Float) +Computes the square root of a number. + +For more, see: +.BR Tomo-Float.sqrt (3) + + +.TP +.BI Float.tan\ :\ func(x:\ Float\ ->\ Float) +Computes the tangent of a number (angle in radians). + +For more, see: +.BR Tomo-Float.tan (3) + + +.TP +.BI Float.tanh\ :\ func(x:\ Float\ ->\ Float) +Computes the hyperbolic tangent of a number. + +For more, see: +.BR Tomo-Float.tanh (3) + + +.TP +.BI Float.tgamma\ :\ func(x:\ Float\ ->\ Float) +Computes the gamma function of a number. + +For more, see: +.BR Tomo-Float.tgamma (3) + + +.TP +.BI Float.trunc\ :\ func(x:\ Float\ ->\ Float) +Truncates a number to the nearest integer towards zero. + +For more, see: +.BR Tomo-Float.trunc (3) + + +.TP +.BI Float.with_precision\ :\ func(n:\ Float,\ precision:\ Float\ ->\ Float) +Round a number to the given precision level (specified as \fB10\fR, \fB.1\fR, \fB.001\fR etc). + +For more, see: +.BR Tomo-Float.with_precision (3) + + +.TP +.BI Float.y0\ :\ func(x:\ Float\ ->\ Float) +Computes the Bessel function of the second kind of order 0. + +For more, see: +.BR Tomo-Float.y0 (3) + + +.TP +.BI Float.y1\ :\ func(x:\ Float\ ->\ Float) +Computes the Bessel function of the second kind of order 1. + +For more, see: +.BR Tomo-Float.y1 (3) + diff --git a/man/man3/tomo-Float64.E.3 b/man/man3/tomo-Float.E.3 index dd131dc5..3bab1eb2 100644 --- a/man/man3/tomo-Float64.E.3 +++ b/man/man3/tomo-Float.E.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.E 3 2025-12-11 "Tomo man-pages" +.TH Float.E 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.E \- Euler's constant +Float.E \- Euler's constant .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.E\ :\ Float64 +.BI Float.E\ :\ Float .fi .SH DESCRIPTION The base of the natural logarithm ($e$). .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.INF.3 b/man/man3/tomo-Float.INF.3 index bab84c98..a166f126 100644 --- a/man/man3/tomo-Float64.INF.3 +++ b/man/man3/tomo-Float.INF.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.INF 3 2025-12-11 "Tomo man-pages" +.TH Float.INF 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.INF \- infinity +Float.INF \- infinity .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.INF\ :\ Float64 +.BI Float.INF\ :\ Float .fi .SH DESCRIPTION Positive infinity. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.LN10.3 b/man/man3/tomo-Float.LN10.3 index e229e0ea..98fb36ac 100644 --- a/man/man3/tomo-Float64.LN10.3 +++ b/man/man3/tomo-Float.LN10.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.LN10 3 2025-12-11 "Tomo man-pages" +.TH Float.LN10 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.LN10 \- log(10) +Float.LN10 \- log(10) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.LN10\ :\ Float64 +.BI Float.LN10\ :\ Float .fi .SH DESCRIPTION The natural logarithm of 10. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.LN2.3 b/man/man3/tomo-Float.LN2.3 index edb172c8..bbfd9381 100644 --- a/man/man3/tomo-Float64.LN2.3 +++ b/man/man3/tomo-Float.LN2.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.LN2 3 2025-12-11 "Tomo man-pages" +.TH Float.LN2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.LN2 \- log(2) +Float.LN2 \- log(2) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.LN2\ :\ Float64 +.BI Float.LN2\ :\ Float .fi .SH DESCRIPTION The natural logarithm of 2. .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.LOG2E.3 b/man/man3/tomo-Float.LOG2E.3 index d92414a0..949b6db6 100644 --- a/man/man3/tomo-Float64.LOG2E.3 +++ b/man/man3/tomo-Float.LOG2E.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.LOG2E 3 2025-12-11 "Tomo man-pages" +.TH Float.LOG2E 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.LOG2E \- log_2(e) +Float.LOG2E \- log_2(e) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.LOG2E\ :\ Float64 +.BI Float.LOG2E\ :\ Float .fi .SH DESCRIPTION The base 2 logarithm of $e$ .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.PI.3 b/man/man3/tomo-Float.PI.3 index 957a7204..3cfe28d6 100644 --- a/man/man3/tomo-Float64.PI.3 +++ b/man/man3/tomo-Float.PI.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.PI 3 2025-12-11 "Tomo man-pages" +.TH Float.PI 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.PI \- pi +Float.PI \- pi .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.PI\ :\ Float64 +.BI Float.PI\ :\ Float .fi .SH DESCRIPTION Pi ($\pi$). .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.PI_2.3 b/man/man3/tomo-Float.PI_2.3 index 2d3e1c3c..27e73490 100644 --- a/man/man3/tomo-Float64.PI_2.3 +++ b/man/man3/tomo-Float.PI_2.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.PI_2 3 2025-12-11 "Tomo man-pages" +.TH Float.PI_2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.PI_2 \- pi/2 +Float.PI_2 \- pi/2 .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.PI_2\ :\ Float64 +.BI Float.PI_2\ :\ Float .fi .SH DESCRIPTION $\frac{\pi}{2}$ .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.PI_4.3 b/man/man3/tomo-Float.PI_4.3 index 9a0109a4..96ef1c28 100644 --- a/man/man3/tomo-Float64.PI_4.3 +++ b/man/man3/tomo-Float.PI_4.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.PI_4 3 2025-12-11 "Tomo man-pages" +.TH Float.PI_4 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.PI_4 \- pi/4 +Float.PI_4 \- pi/4 .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.PI_4\ :\ Float64 +.BI Float.PI_4\ :\ Float .fi .SH DESCRIPTION $\frac{\pi}{4}$ .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.SQRT1_2.3 b/man/man3/tomo-Float.SQRT1_2.3 index 78f3f205..a2d5a83b 100644 --- a/man/man3/tomo-Float64.SQRT1_2.3 +++ b/man/man3/tomo-Float.SQRT1_2.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.SQRT1_2 3 2025-12-11 "Tomo man-pages" +.TH Float.SQRT1_2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.SQRT1_2 \- sqrt(1/2) +Float.SQRT1_2 \- sqrt(1/2) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.SQRT1_2\ :\ Float64 +.BI Float.SQRT1_2\ :\ Float .fi .SH DESCRIPTION $\sqrt{\frac{1}{2}}$ .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.SQRT2.3 b/man/man3/tomo-Float.SQRT2.3 index a830339a..0a75b3ad 100644 --- a/man/man3/tomo-Float64.SQRT2.3 +++ b/man/man3/tomo-Float.SQRT2.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.SQRT2 3 2025-12-11 "Tomo man-pages" +.TH Float.SQRT2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.SQRT2 \- sqrt(2) +Float.SQRT2 \- sqrt(2) .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.SQRT2\ :\ Float64 +.BI Float.SQRT2\ :\ Float .fi .SH DESCRIPTION $\sqrt{2}$ .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.TAU.3 b/man/man3/tomo-Float.TAU.3 index 0ad0087e..3127cbc8 100644 --- a/man/man3/tomo-Float64.TAU.3 +++ b/man/man3/tomo-Float.TAU.3 @@ -2,18 +2,18 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.TAU 3 2025-12-11 "Tomo man-pages" +.TH Float.TAU 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.TAU \- 2*pi +Float.TAU \- 2*pi .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.TAU\ :\ Float64 +.BI Float.TAU\ :\ Float .fi .SH DESCRIPTION Tau ($2 \times \pi$) .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.abs.3 b/man/man3/tomo-Float.abs.3 index b27e3610..7e749008 100644 --- a/man/man3/tomo-Float64.abs.3 +++ b/man/man3/tomo-Float.abs.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.abs 3 2025-12-11 "Tomo man-pages" +.TH Float.abs 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.abs \- absolute value +Float.abs \- absolute value .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.abs\ :\ func(n:\ Float64\ ->\ Float64) +.BI Float.abs\ :\ func(n:\ Float\ ->\ Float) .fi .SH DESCRIPTION Calculates the absolute value of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -n Float64 The number whose absolute value is to be computed. +n Float The number whose absolute value is to be computed. .TE .SH RETURN The absolute value of `n`. @@ -32,4 +32,4 @@ The absolute value of `n`. assert (-3.5).abs() == 3.5 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.acos.3 b/man/man3/tomo-Float.acos.3 index 43031316..44733782 100644 --- a/man/man3/tomo-Float64.acos.3 +++ b/man/man3/tomo-Float.acos.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.acos 3 2025-12-11 "Tomo man-pages" +.TH Float.acos 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.acos \- arc cosine +Float.acos \- arc cosine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.acos\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.acos\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the arc cosine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the arc cosine is to be calculated. +x Float The number for which the arc cosine is to be calculated. .TE .SH RETURN The arc cosine of `x` in radians. @@ -32,4 +32,4 @@ The arc cosine of `x` in radians. assert (0.0).acos() == 1.5708 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.acosh.3 b/man/man3/tomo-Float.acosh.3 index 79c426fb..f2f63f13 100644 --- a/man/man3/tomo-Float64.acosh.3 +++ b/man/man3/tomo-Float.acosh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.acosh 3 2025-12-11 "Tomo man-pages" +.TH Float.acosh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.acosh \- arc hyperbolic cosine +Float.acosh \- arc hyperbolic cosine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.acosh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.acosh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the inverse hyperbolic cosine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the inverse hyperbolic cosine is to be calculated. +x Float The number for which the inverse hyperbolic cosine is to be calculated. .TE .SH RETURN The inverse hyperbolic cosine of `x`. @@ -32,4 +32,4 @@ The inverse hyperbolic cosine of `x`. assert (1.0).acosh() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.asin.3 b/man/man3/tomo-Float.asin.3 index 2cff0652..4ab9f0fa 100644 --- a/man/man3/tomo-Float64.asin.3 +++ b/man/man3/tomo-Float.asin.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.asin 3 2025-12-11 "Tomo man-pages" +.TH Float.asin 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.asin \- arc sine +Float.asin \- arc sine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.asin\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.asin\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the arc sine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the arc sine is to be calculated. +x Float The number for which the arc sine is to be calculated. .TE .SH RETURN The arc sine of `x` in radians. @@ -32,4 +32,4 @@ The arc sine of `x` in radians. assert (0.5).asin() == 0.5236 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.asinh.3 b/man/man3/tomo-Float.asinh.3 index b1d596fb..62436446 100644 --- a/man/man3/tomo-Float64.asinh.3 +++ b/man/man3/tomo-Float.asinh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.asinh 3 2025-12-11 "Tomo man-pages" +.TH Float.asinh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.asinh \- arc hyperbolic sine +Float.asinh \- arc hyperbolic sine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.asinh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.asinh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the inverse hyperbolic sine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the inverse hyperbolic sine is to be calculated. +x Float The number for which the inverse hyperbolic sine is to be calculated. .TE .SH RETURN The inverse hyperbolic sine of `x`. @@ -32,4 +32,4 @@ The inverse hyperbolic sine of `x`. assert (0.0).asinh() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.atan.3 b/man/man3/tomo-Float.atan.3 index 550c8d99..22e28da7 100644 --- a/man/man3/tomo-Float64.atan.3 +++ b/man/man3/tomo-Float.atan.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.atan 3 2025-12-11 "Tomo man-pages" +.TH Float.atan 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.atan \- arc tangent +Float.atan \- arc tangent .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.atan\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.atan\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the arc tangent of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the arc tangent is to be calculated. +x Float The number for which the arc tangent is to be calculated. .TE .SH RETURN The arc tangent of `x` in radians. @@ -32,4 +32,4 @@ The arc tangent of `x` in radians. assert (1.0).atan() == 0.7854 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.atan2.3 b/man/man3/tomo-Float.atan2.3 index 3be0ee98..e92bec28 100644 --- a/man/man3/tomo-Float64.atan2.3 +++ b/man/man3/tomo-Float.atan2.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.atan2 3 2025-12-11 "Tomo man-pages" +.TH Float.atan2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.atan2 \- arc tangent from 2 variables +Float.atan2 \- arc tangent from 2 variables .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.atan2\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.atan2\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the arc tangent of the quotient of two numbers. @@ -22,15 +22,15 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The numerator. -y Float64 The denominator. +x Float The numerator. +y Float The denominator. .TE .SH RETURN The arc tangent of `x/y` in radians. .SH EXAMPLES .EX -assert Float64.atan2(1, 1) == 0.7854 +assert Float.atan2(1, 1) == 0.7854 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.atanh.3 b/man/man3/tomo-Float.atanh.3 index c311cf36..d32acdf9 100644 --- a/man/man3/tomo-Float64.atanh.3 +++ b/man/man3/tomo-Float.atanh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.atanh 3 2025-12-11 "Tomo man-pages" +.TH Float.atanh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.atanh \- arc hyperbolic tangent. +Float.atanh \- arc hyperbolic tangent. .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.atanh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.atanh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the inverse hyperbolic tangent of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the inverse hyperbolic tangent is to be calculated. +x Float The number for which the inverse hyperbolic tangent is to be calculated. .TE .SH RETURN The inverse hyperbolic tangent of `x`. @@ -32,4 +32,4 @@ The inverse hyperbolic tangent of `x`. assert (0.5).atanh() == 0.5493 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.cbrt.3 b/man/man3/tomo-Float.cbrt.3 index 077990a3..864a0a9e 100644 --- a/man/man3/tomo-Float64.cbrt.3 +++ b/man/man3/tomo-Float.cbrt.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.cbrt 3 2025-12-11 "Tomo man-pages" +.TH Float.cbrt 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.cbrt \- cube root +Float.cbrt \- cube root .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.cbrt\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.cbrt\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the cube root of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the cube root is to be calculated. +x Float The number for which the cube root is to be calculated. .TE .SH RETURN The cube root of `x`. @@ -32,4 +32,4 @@ The cube root of `x`. assert (27.0).cbrt() == 3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.ceil.3 b/man/man3/tomo-Float.ceil.3 index a46915cb..0386f50c 100644 --- a/man/man3/tomo-Float64.ceil.3 +++ b/man/man3/tomo-Float.ceil.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.ceil 3 2025-12-11 "Tomo man-pages" +.TH Float.ceil 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.ceil \- ceiling function +Float.ceil \- ceiling function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.ceil\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.ceil\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Rounds a number up to the nearest integer. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to be rounded up. +x Float The number to be rounded up. .TE .SH RETURN The smallest integer greater than or equal to `x`. @@ -32,4 +32,4 @@ The smallest integer greater than or equal to `x`. assert (3.2).ceil() == 4 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.clamped.3 b/man/man3/tomo-Float.clamped.3 index 3aa78f9d..1d6998f8 100644 --- a/man/man3/tomo-Float64.clamped.3 +++ b/man/man3/tomo-Float.clamped.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.clamped 3 2025-12-11 "Tomo man-pages" +.TH Float.clamped 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.clamped \- clamp a number +Float.clamped \- clamp a number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.clamped\ :\ func(x:\ Float64,\ low:\ Float64,\ high:\ Float64\ ->\ Float64) +.BI Float.clamped\ :\ func(x:\ Float,\ low:\ Float,\ high:\ Float\ ->\ Float) .fi .SH DESCRIPTION Returns the given number clamped between two values so that it is within that range. @@ -22,9 +22,9 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to clamp. -low Float64 The lowest value the result can take. -high Float64 The highest value the result can take. +x Float The number to clamp. +low Float The lowest value the result can take. +high Float The highest value the result can take. .TE .SH RETURN The first argument clamped between the other two arguments. @@ -34,4 +34,4 @@ The first argument clamped between the other two arguments. assert (2.5).clamped(5.5, 10.5) == 5.5 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.copysign.3 b/man/man3/tomo-Float.copysign.3 index 3a6b5bba..2b75c782 100644 --- a/man/man3/tomo-Float64.copysign.3 +++ b/man/man3/tomo-Float.copysign.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.copysign 3 2025-12-11 "Tomo man-pages" +.TH Float.copysign 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.copysign \- copy a number's sign +Float.copysign \- copy a number's sign .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.copysign\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.copysign\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Copies the sign of one number to another. @@ -22,8 +22,8 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number whose magnitude will be copied. -y Float64 The number whose sign will be copied. +x Float The number whose magnitude will be copied. +y Float The number whose sign will be copied. .TE .SH RETURN A number with the magnitude of `x` and the sign of `y`. @@ -33,4 +33,4 @@ A number with the magnitude of `x` and the sign of `y`. assert (3.0).copysign(-1) == -3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.cos.3 b/man/man3/tomo-Float.cos.3 index c9d3c0e8..266dd5fd 100644 --- a/man/man3/tomo-Float64.cos.3 +++ b/man/man3/tomo-Float.cos.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.cos 3 2025-12-11 "Tomo man-pages" +.TH Float.cos 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.cos \- cosine +Float.cos \- cosine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.cos\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.cos\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the cosine of a number (angle in radians). @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The angle in radians. +x Float The angle in radians. .TE .SH RETURN The cosine of `x`. @@ -32,4 +32,4 @@ The cosine of `x`. assert (0.0).cos() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.cosh.3 b/man/man3/tomo-Float.cosh.3 index eabcba45..5de41a15 100644 --- a/man/man3/tomo-Float64.cosh.3 +++ b/man/man3/tomo-Float.cosh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.cosh 3 2025-12-11 "Tomo man-pages" +.TH Float.cosh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.cosh \- hyperbolic cosine +Float.cosh \- hyperbolic cosine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.cosh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.cosh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the hyperbolic cosine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the hyperbolic cosine is to be calculated. +x Float The number for which the hyperbolic cosine is to be calculated. .TE .SH RETURN The hyperbolic cosine of `x`. @@ -32,4 +32,4 @@ The hyperbolic cosine of `x`. assert (0.0).cosh() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.erf.3 b/man/man3/tomo-Float.erf.3 index 9d36375d..d356f844 100644 --- a/man/man3/tomo-Float64.erf.3 +++ b/man/man3/tomo-Float.erf.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.erf 3 2025-12-11 "Tomo man-pages" +.TH Float.erf 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.erf \- error function +Float.erf \- error function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.erf\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.erf\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the error function of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the error function is to be calculated. +x Float The number for which the error function is to be calculated. .TE .SH RETURN The error function of `x`. @@ -32,4 +32,4 @@ The error function of `x`. assert (0.0).erf() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.erfc.3 b/man/man3/tomo-Float.erfc.3 index c14e2e35..6ff7891b 100644 --- a/man/man3/tomo-Float64.erfc.3 +++ b/man/man3/tomo-Float.erfc.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.erfc 3 2025-12-11 "Tomo man-pages" +.TH Float.erfc 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.erfc \- complimentary error function +Float.erfc \- complimentary error function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.erfc\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.erfc\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the complementary error function of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the complementary error function is to be calculated. +x Float The number for which the complementary error function is to be calculated. .TE .SH RETURN The complementary error function of `x`. @@ -32,4 +32,4 @@ The complementary error function of `x`. assert (0.0).erfc() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.exp.3 b/man/man3/tomo-Float.exp.3 index ae2702e8..e073e1ef 100644 --- a/man/man3/tomo-Float64.exp.3 +++ b/man/man3/tomo-Float.exp.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.exp 3 2025-12-11 "Tomo man-pages" +.TH Float.exp 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.exp \- base-e exponentiation +Float.exp \- base-e exponentiation .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.exp\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.exp\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the exponential function $e^x$ for a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The exponent. +x Float The exponent. .TE .SH RETURN The value of $e^x$. @@ -32,4 +32,4 @@ The value of $e^x$. assert (1.0).exp() == 2.7183 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.exp2.3 b/man/man3/tomo-Float.exp2.3 index 95bb02c3..b4dd35e2 100644 --- a/man/man3/tomo-Float64.exp2.3 +++ b/man/man3/tomo-Float.exp2.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.exp2 3 2025-12-11 "Tomo man-pages" +.TH Float.exp2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.exp2 \- base-2 exponentiation +Float.exp2 \- base-2 exponentiation .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.exp2\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.exp2\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes $2^x$ for a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The exponent. +x Float The exponent. .TE .SH RETURN The value of $2^x$. @@ -32,4 +32,4 @@ The value of $2^x$. assert (3.0).exp2() == 8 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.expm1.3 b/man/man3/tomo-Float.expm1.3 index 4aa82378..5b4cf3df 100644 --- a/man/man3/tomo-Float64.expm1.3 +++ b/man/man3/tomo-Float.expm1.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.expm1 3 2025-12-11 "Tomo man-pages" +.TH Float.expm1 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.expm1 \- base-e exponential minus 1 +Float.expm1 \- base-e exponential minus 1 .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.expm1\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.expm1\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes $e^x - 1$ for a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The exponent. +x Float The exponent. .TE .SH RETURN The value of $e^x - 1$. @@ -32,4 +32,4 @@ The value of $e^x - 1$. assert (1.0).expm1() == 1.7183 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.fdim.3 b/man/man3/tomo-Float.fdim.3 index 54774806..a3be0af5 100644 --- a/man/man3/tomo-Float64.fdim.3 +++ b/man/man3/tomo-Float.fdim.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.fdim 3 2025-12-11 "Tomo man-pages" +.TH Float.fdim 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.fdim \- positive difference +Float.fdim \- positive difference .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.fdim\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.fdim\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the positive difference between two numbers. @@ -22,8 +22,8 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The first number. -y Float64 The second number. +x Float The first number. +y Float The second number. .TE .SH RETURN The positive difference $\max(0, x - y)$. @@ -35,4 +35,4 @@ fd assert (5.0).fdim(3) == 2 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.floor.3 b/man/man3/tomo-Float.floor.3 index 86953b9e..55f5924d 100644 --- a/man/man3/tomo-Float64.floor.3 +++ b/man/man3/tomo-Float.floor.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.floor 3 2025-12-11 "Tomo man-pages" +.TH Float.floor 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.floor \- floor function +Float.floor \- floor function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.floor\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.floor\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Rounds a number down to the nearest integer. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to be rounded down. +x Float The number to be rounded down. .TE .SH RETURN The largest integer less than or equal to `x`. @@ -32,4 +32,4 @@ The largest integer less than or equal to `x`. assert (3.7).floor() == 3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.hypot.3 b/man/man3/tomo-Float.hypot.3 index 5780f390..3189de94 100644 --- a/man/man3/tomo-Float64.hypot.3 +++ b/man/man3/tomo-Float.hypot.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.hypot 3 2025-12-11 "Tomo man-pages" +.TH Float.hypot 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.hypot \- Euclidean distance function +Float.hypot \- Euclidean distance function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.hypot\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.hypot\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. @@ -22,15 +22,15 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The first number. -y Float64 The second number. +x Float The first number. +y Float The second number. .TE .SH RETURN The Euclidean norm of `x` and `y`. .SH EXAMPLES .EX -assert Float64.hypot(3, 4) == 5 +assert Float.hypot(3, 4) == 5 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.is_between.3 b/man/man3/tomo-Float.is_between.3 index ffe62d2a..34eb9c98 100644 --- a/man/man3/tomo-Float64.is_between.3 +++ b/man/man3/tomo-Float.is_between.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.is_between 3 2025-12-11 "Tomo man-pages" +.TH Float.is_between 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.is_between \- check if a number is in a range +Float.is_between \- check if a number is in a range .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.is_between\ :\ func(x:\ Float64,\ low:\ Float64,\ high:\ Float64\ ->\ Bool) +.BI Float.is_between\ :\ func(x:\ Float,\ low:\ Float,\ high:\ Float\ ->\ Bool) .fi .SH DESCRIPTION Determines if a number is between two numbers (inclusive). @@ -22,9 +22,9 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The integer to be checked. -low Float64 The lower bound to check (inclusive). -high Float64 The upper bound to check (inclusive). +x Float The integer to be checked. +low Float The lower bound to check (inclusive). +high Float The upper bound to check (inclusive). .TE .SH RETURN `yes` if `low <= x and x <= high`, otherwise `no` @@ -36,4 +36,4 @@ assert (7.5).is_between(100, 200) == no assert (7.5).is_between(1, 7.5) == yes .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.isfinite.3 b/man/man3/tomo-Float.isfinite.3 index ef5c7a3b..ee831f3d 100644 --- a/man/man3/tomo-Float64.isfinite.3 +++ b/man/man3/tomo-Float.isfinite.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.isfinite 3 2025-12-11 "Tomo man-pages" +.TH Float.isfinite 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.isfinite \- check for finite number +Float.isfinite \- check for finite number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.isfinite\ :\ func(n:\ Float64\ ->\ Bool) +.BI Float.isfinite\ :\ func(n:\ Float\ ->\ Bool) .fi .SH DESCRIPTION Checks if a number is finite. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -n Float64 The number to be checked. +n Float The number to be checked. .TE .SH RETURN `yes` if `n` is finite, `no` otherwise. @@ -30,7 +30,7 @@ n Float64 The number to be checked. .SH EXAMPLES .EX assert (1.0).isfinite() == yes -assert Float64.INF.isfinite() == no +assert Float.INF.isfinite() == no .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.isinf.3 b/man/man3/tomo-Float.isinf.3 index e8c97daa..8d4dfe7a 100644 --- a/man/man3/tomo-Float64.isinf.3 +++ b/man/man3/tomo-Float.isinf.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.isinf 3 2025-12-11 "Tomo man-pages" +.TH Float.isinf 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.isinf \- check for infinite number +Float.isinf \- check for infinite number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.isinf\ :\ func(n:\ Float64\ ->\ Bool) +.BI Float.isinf\ :\ func(n:\ Float\ ->\ Bool) .fi .SH DESCRIPTION Checks if a number is infinite. @@ -22,15 +22,15 @@ allbox; lb lb lbx l l l. Name Type Description -n Float64 The number to be checked. +n Float The number to be checked. .TE .SH RETURN `yes` if `n` is infinite, `no` otherwise. .SH EXAMPLES .EX -assert Float64.INF.isinf() == yes +assert Float.INF.isinf() == yes assert (1.0).isinf() == no .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.j0.3 b/man/man3/tomo-Float.j0.3 index 94e3155f..f7570210 100644 --- a/man/man3/tomo-Float64.j0.3 +++ b/man/man3/tomo-Float.j0.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.j0 3 2025-12-11 "Tomo man-pages" +.TH Float.j0 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.j0 \- Bessel function +Float.j0 \- Bessel function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.j0\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.j0\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the Bessel function of the first kind of order 0. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the Bessel function is to be calculated. +x Float The number for which the Bessel function is to be calculated. .TE .SH RETURN The Bessel function of the first kind of order 0 of `x`. @@ -32,4 +32,4 @@ The Bessel function of the first kind of order 0 of `x`. assert (0.0).j0() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.j1.3 b/man/man3/tomo-Float.j1.3 index f63ad696..17df3bd2 100644 --- a/man/man3/tomo-Float64.j1.3 +++ b/man/man3/tomo-Float.j1.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.j1 3 2025-12-11 "Tomo man-pages" +.TH Float.j1 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.j1 \- Bessel function +Float.j1 \- Bessel function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.j1\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.j1\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the Bessel function of the first kind of order 1. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the Bessel function is to be calculated. +x Float The number for which the Bessel function is to be calculated. .TE .SH RETURN The Bessel function of the first kind of order 1 of `x`. @@ -32,4 +32,4 @@ The Bessel function of the first kind of order 1 of `x`. assert (0.0).j1() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.log.3 b/man/man3/tomo-Float.log.3 index 885a2d6d..13360d0f 100644 --- a/man/man3/tomo-Float64.log.3 +++ b/man/man3/tomo-Float.log.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.log 3 2025-12-11 "Tomo man-pages" +.TH Float.log 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.log \- natural logarithm +Float.log \- natural logarithm .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.log\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.log\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the natural logarithm (base $e$) of a number. @@ -22,14 +22,14 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the natural logarithm is to be calculated. +x Float The number for which the natural logarithm is to be calculated. .TE .SH RETURN The natural logarithm of `x`. .SH EXAMPLES .EX -assert Float64.E.log() == 1 +assert Float.E.log() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.log10.3 b/man/man3/tomo-Float.log10.3 index 07b4131b..c50e0fb0 100644 --- a/man/man3/tomo-Float64.log10.3 +++ b/man/man3/tomo-Float.log10.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.log10 3 2025-12-11 "Tomo man-pages" +.TH Float.log10 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.log10 \- logarithm base-10 +Float.log10 \- logarithm base-10 .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.log10\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.log10\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the base-10 logarithm of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the base-10 logarithm is to be calculated. +x Float The number for which the base-10 logarithm is to be calculated. .TE .SH RETURN The base-10 logarithm of `x`. @@ -32,4 +32,4 @@ The base-10 logarithm of `x`. assert (100.0).log10() == 2 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.log1p.3 b/man/man3/tomo-Float.log1p.3 index 6c19d416..bfb86cbc 100644 --- a/man/man3/tomo-Float64.log1p.3 +++ b/man/man3/tomo-Float.log1p.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.log1p 3 2025-12-11 "Tomo man-pages" +.TH Float.log1p 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.log1p \- logarithm of 1 plus x +Float.log1p \- logarithm of 1 plus x .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.log1p\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.log1p\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes $\log(1 + x)$ for a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which $\log(1 + x)$ is to be calculated. +x Float The number for which $\log(1 + x)$ is to be calculated. .TE .SH RETURN The value of $\log(1 + x)$. @@ -32,4 +32,4 @@ The value of $\log(1 + x)$. assert (1.0).log1p() == 0.6931 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.log2.3 b/man/man3/tomo-Float.log2.3 index 58b4299c..9cea62d9 100644 --- a/man/man3/tomo-Float64.log2.3 +++ b/man/man3/tomo-Float.log2.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.log2 3 2025-12-11 "Tomo man-pages" +.TH Float.log2 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.log2 \- logarithm base-2 +Float.log2 \- logarithm base-2 .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.log2\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.log2\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the base-2 logarithm of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the base-2 logarithm is to be calculated. +x Float The number for which the base-2 logarithm is to be calculated. .TE .SH RETURN The base-2 logarithm of `x`. @@ -32,4 +32,4 @@ The base-2 logarithm of `x`. assert (8.0).log2() == 3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.logb.3 b/man/man3/tomo-Float.logb.3 index 8f474df9..38ac47f6 100644 --- a/man/man3/tomo-Float64.logb.3 +++ b/man/man3/tomo-Float.logb.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.logb 3 2025-12-11 "Tomo man-pages" +.TH Float.logb 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.logb \- exponent of a floating point value +Float.logb \- exponent of a floating point value .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.logb\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.logb\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the binary exponent (base-2 logarithm) of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the binary exponent is to be calculated. +x Float The number for which the binary exponent is to be calculated. .TE .SH RETURN The binary exponent of `x`. @@ -32,4 +32,4 @@ The binary exponent of `x`. assert (8.0).logb() == 3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.mix.3 b/man/man3/tomo-Float.mix.3 index c8afc56e..0bbd1f04 100644 --- a/man/man3/tomo-Float64.mix.3 +++ b/man/man3/tomo-Float.mix.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.mix 3 2025-12-11 "Tomo man-pages" +.TH Float.mix 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.mix \- mix two numbers by an amount +Float.mix \- mix two numbers by an amount .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.mix\ :\ func(amount:\ Float64,\ x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.mix\ :\ func(amount:\ Float,\ x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Interpolates between two numbers based on a given amount. @@ -22,9 +22,9 @@ allbox; lb lb lbx l l l. Name Type Description -amount Float64 The interpolation factor (between \fB0\fR and \fB1\fR). -x Float64 The starting number. -y Float64 The ending number. +amount Float The interpolation factor (between \fB0\fR and \fB1\fR). +x Float The starting number. +y Float The ending number. .TE .SH RETURN The interpolated number between `x` and `y` based on `amount`. @@ -35,4 +35,4 @@ assert (0.5).mix(10, 20) == 15 assert (0.25).mix(10, 20) == 12.5 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.near.3 b/man/man3/tomo-Float.near.3 index 3cf40244..6418dc1f 100644 --- a/man/man3/tomo-Float64.near.3 +++ b/man/man3/tomo-Float.near.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.near 3 2025-12-11 "Tomo man-pages" +.TH Float.near 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.near \- check if two numbers are near each other +Float.near \- check if two numbers are near each other .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.near\ :\ func(x:\ Float64,\ y:\ Float64,\ ratio:\ Float64\ =\ 1e-9,\ min_epsilon:\ Float64\ =\ 1e-9\ ->\ Bool) +.BI Float.near\ :\ func(x:\ Float,\ y:\ Float,\ ratio:\ Float\ =\ 1e-9,\ min_epsilon:\ Float\ =\ 1e-9\ ->\ Bool) .fi .SH DESCRIPTION Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. @@ -22,10 +22,10 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -x Float64 The first number. - -y Float64 The second number. - -ratio Float64 The relative tolerance. Default is \fB1e-9\fR. 1e-9 -min_epsilon Float64 The absolute tolerance. Default is \fB1e-9\fR. 1e-9 +x Float The first number. - +y Float The second number. - +ratio Float The relative tolerance. Default is \fB1e-9\fR. 1e-9 +min_epsilon Float The absolute tolerance. Default is \fB1e-9\fR. 1e-9 .TE .SH RETURN `yes` if `x` and `y` are approximately equal within the specified tolerances, `no` otherwise. @@ -37,4 +37,4 @@ assert (100.0).near(110, ratio=0.1) == yes assert (5.0).near(5.1, min_epsilon=0.1) == yes .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.nextafter.3 b/man/man3/tomo-Float.nextafter.3 index 8345d23e..69c07eca 100644 --- a/man/man3/tomo-Float64.nextafter.3 +++ b/man/man3/tomo-Float.nextafter.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.nextafter 3 2025-12-11 "Tomo man-pages" +.TH Float.nextafter 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.nextafter \- next floating point number +Float.nextafter \- next floating point number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.nextafter\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) +.BI Float.nextafter\ :\ func(x:\ Float,\ y:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the next representable value after a given number towards a specified direction. @@ -22,8 +22,8 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The starting number. -y Float64 The direction towards which to find the next representable value. +x Float The starting number. +y Float The direction towards which to find the next representable value. .TE .SH RETURN The next representable value after `x` in the direction of `y`. @@ -33,4 +33,4 @@ The next representable value after `x` in the direction of `y`. assert (1.0).nextafter(1.1) == 1.0000000000000002 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.parse.3 b/man/man3/tomo-Float.parse.3 index 2ad4c1c4..d8c27f11 100644 --- a/man/man3/tomo-Float64.parse.3 +++ b/man/man3/tomo-Float.parse.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.parse 3 2025-12-11 "Tomo man-pages" +.TH Float.parse 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.parse \- convert text to number +Float.parse \- convert text to number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Float64?) +.BI Float.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Float?) .fi .SH DESCRIPTION Converts a text representation of a number into a floating-point number. @@ -30,12 +30,12 @@ The number represented by the text or `none` if the entire text can't be parsed .SH EXAMPLES .EX -assert Float64.parse("3.14") == 3.14 -assert Float64.parse("1e3") == 1000 -assert Float64.parse("1.5junk") == none +assert Float.parse("3.14") == 3.14 +assert Float.parse("1e3") == 1000 +assert Float.parse("1.5junk") == none remainder : Text -assert Float64.parse("1.5junk", &remainder) == 1.5 +assert Float.parse("1.5junk", &remainder) == 1.5 assert remainder == "junk" .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.percent.3 b/man/man3/tomo-Float.percent.3 index d93adbd6..b079b7fb 100644 --- a/man/man3/tomo-Float64.percent.3 +++ b/man/man3/tomo-Float.percent.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.percent 3 2025-12-11 "Tomo man-pages" +.TH Float.percent 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.percent \- format as a percentage +Float.percent \- format as a percentage .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.percent\ :\ func(n:\ Float64,\ precision:\ Float64\ =\ 0.01\ ->\ Text) +.BI Float.percent\ :\ func(n:\ Float,\ precision:\ Float\ =\ 0.01\ ->\ Text) .fi .SH DESCRIPTION Convert a number into a percentage text with a percent sign. @@ -22,8 +22,8 @@ allbox; lb lb lbx lb l l l l. Name Type Description Default -n Float64 The number to be converted to a percent. - -precision Float64 Round the percentage to this precision level. 0.01 +n Float The number to be converted to a percent. - +precision Float Round the percentage to this precision level. 0.01 .TE .SH RETURN A text representation of the number as a percentage with a percent sign. @@ -36,4 +36,4 @@ assert (1./3.).percent(2, precision=0.0001) == "33.3333%" assert (1./3.).percent(2, precision=10.) == "30%" .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.rint.3 b/man/man3/tomo-Float.rint.3 index dace55c7..026c4284 100644 --- a/man/man3/tomo-Float64.rint.3 +++ b/man/man3/tomo-Float.rint.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.rint 3 2025-12-11 "Tomo man-pages" +.TH Float.rint 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.rint \- round to nearest integer +Float.rint \- round to nearest integer .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.rint\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.rint\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Rounds a number to the nearest integer, with ties rounded to the nearest even integer. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to be rounded. +x Float The number to be rounded. .TE .SH RETURN The nearest integer value of `x`. @@ -33,4 +33,4 @@ assert (3.5).rint() == 4 assert (2.5).rint() == 2 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.round.3 b/man/man3/tomo-Float.round.3 index e422416e..584f53b1 100644 --- a/man/man3/tomo-Float64.round.3 +++ b/man/man3/tomo-Float.round.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.round 3 2025-12-11 "Tomo man-pages" +.TH Float.round 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.round \- round to nearest integer +Float.round \- round to nearest integer .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.round\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.round\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Rounds a number to the nearest whole number integer. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to be rounded. +x Float The number to be rounded. .TE .SH RETURN The nearest integer value of `x`. @@ -33,4 +33,4 @@ assert (2.3).round() == 2 assert (2.7).round() == 3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.significand.3 b/man/man3/tomo-Float.significand.3 index d06f9b21..e184ea92 100644 --- a/man/man3/tomo-Float64.significand.3 +++ b/man/man3/tomo-Float.significand.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.significand 3 2025-12-11 "Tomo man-pages" +.TH Float.significand 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.significand \- get mantissa +Float.significand \- get mantissa .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.significand\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.significand\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Extracts the significand (or mantissa) of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number from which to extract the significand. +x Float The number from which to extract the significand. .TE .SH RETURN The significand of `x`. @@ -32,4 +32,4 @@ The significand of `x`. assert (1234.567).significand() == 0.1234567 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.sin.3 b/man/man3/tomo-Float.sin.3 index 7aeb22a5..c5b16683 100644 --- a/man/man3/tomo-Float64.sin.3 +++ b/man/man3/tomo-Float.sin.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.sin 3 2025-12-11 "Tomo man-pages" +.TH Float.sin 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.sin \- sine +Float.sin \- sine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.sin\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.sin\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the sine of a number (angle in radians). @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The angle in radians. +x Float The angle in radians. .TE .SH RETURN The sine of `x`. @@ -32,4 +32,4 @@ The sine of `x`. assert (0.0).sin() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.sinh.3 b/man/man3/tomo-Float.sinh.3 index 1fa6bdcb..53f95562 100644 --- a/man/man3/tomo-Float64.sinh.3 +++ b/man/man3/tomo-Float.sinh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.sinh 3 2025-12-11 "Tomo man-pages" +.TH Float.sinh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.sinh \- hyperbolic sine +Float.sinh \- hyperbolic sine .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.sinh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.sinh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the hyperbolic sine of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the hyperbolic sine is to be calculated. +x Float The number for which the hyperbolic sine is to be calculated. .TE .SH RETURN The hyperbolic sine of `x`. @@ -32,4 +32,4 @@ The hyperbolic sine of `x`. assert (0.0).sinh() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.sqrt.3 b/man/man3/tomo-Float.sqrt.3 index 40d61477..47e81d53 100644 --- a/man/man3/tomo-Float64.sqrt.3 +++ b/man/man3/tomo-Float.sqrt.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.sqrt 3 2025-12-11 "Tomo man-pages" +.TH Float.sqrt 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.sqrt \- square root +Float.sqrt \- square root .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.sqrt\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.sqrt\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the square root of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the square root is to be calculated. +x Float The number for which the square root is to be calculated. .TE .SH RETURN The square root of `x`. @@ -32,4 +32,4 @@ The square root of `x`. assert (16.0).sqrt() == 4 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.tan.3 b/man/man3/tomo-Float.tan.3 index f110b453..bd404863 100644 --- a/man/man3/tomo-Float64.tan.3 +++ b/man/man3/tomo-Float.tan.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.tan 3 2025-12-11 "Tomo man-pages" +.TH Float.tan 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.tan \- tangent +Float.tan \- tangent .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.tan\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.tan\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the tangent of a number (angle in radians). @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The angle in radians. +x Float The angle in radians. .TE .SH RETURN The tangent of `x`. @@ -32,4 +32,4 @@ The tangent of `x`. assert (0.0).tan() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.tanh.3 b/man/man3/tomo-Float.tanh.3 index a0f6c7b8..9826595b 100644 --- a/man/man3/tomo-Float64.tanh.3 +++ b/man/man3/tomo-Float.tanh.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.tanh 3 2025-12-11 "Tomo man-pages" +.TH Float.tanh 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.tanh \- hyperbolic tangent +Float.tanh \- hyperbolic tangent .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.tanh\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.tanh\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the hyperbolic tangent of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the hyperbolic tangent is to be calculated. +x Float The number for which the hyperbolic tangent is to be calculated. .TE .SH RETURN The hyperbolic tangent of `x`. @@ -32,4 +32,4 @@ The hyperbolic tangent of `x`. assert (0.0).tanh() == 0 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.tgamma.3 b/man/man3/tomo-Float.tgamma.3 index 5559d4c2..f355b436 100644 --- a/man/man3/tomo-Float64.tgamma.3 +++ b/man/man3/tomo-Float.tgamma.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.tgamma 3 2025-12-11 "Tomo man-pages" +.TH Float.tgamma 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.tgamma \- true gamma function +Float.tgamma \- true gamma function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.tgamma\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.tgamma\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the gamma function of a number. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the gamma function is to be calculated. +x Float The number for which the gamma function is to be calculated. .TE .SH RETURN The gamma function of `x`. @@ -32,4 +32,4 @@ The gamma function of `x`. assert (1.0).tgamma() == 1 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.trunc.3 b/man/man3/tomo-Float.trunc.3 index dfd8e387..3b041c9f 100644 --- a/man/man3/tomo-Float64.trunc.3 +++ b/man/man3/tomo-Float.trunc.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.trunc 3 2025-12-11 "Tomo man-pages" +.TH Float.trunc 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.trunc \- truncate a number +Float.trunc \- truncate a number .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.trunc\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.trunc\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Truncates a number to the nearest integer towards zero. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number to be truncated. +x Float The number to be truncated. .TE .SH RETURN The integer part of `x` towards zero. @@ -33,4 +33,4 @@ assert (3.7).trunc() == 3 assert (-3.7).trunc() == -3 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.with_precision.3 b/man/man3/tomo-Float.with_precision.3 index a98064cf..7746bde7 100644 --- a/man/man3/tomo-Float64.with_precision.3 +++ b/man/man3/tomo-Float.with_precision.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.with_precision 3 2025-12-11 "Tomo man-pages" +.TH Float.with_precision 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.with_precision \- round to a given precision +Float.with_precision \- round to a given precision .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.with_precision\ :\ func(n:\ Float64,\ precision:\ Float64\ ->\ Float64) +.BI Float.with_precision\ :\ func(n:\ Float,\ precision:\ Float\ ->\ Float) .fi .SH DESCRIPTION Round a number to the given precision level (specified as `10`, `.1`, `.001` etc). @@ -22,8 +22,8 @@ allbox; lb lb lbx l l l. Name Type Description -n Float64 The number to be rounded to a given precision. -precision Float64 The precision to which the number should be rounded. +n Float The number to be rounded to a given precision. +precision Float The precision to which the number should be rounded. .TE .SH RETURN The number, rounded to the given precision level. @@ -35,4 +35,4 @@ assert (123456.).with_precision(100) == 123500 assert (1234567.).with_precision(5) == 1234565 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.y0.3 b/man/man3/tomo-Float.y0.3 index 1724a29d..c3089d36 100644 --- a/man/man3/tomo-Float64.y0.3 +++ b/man/man3/tomo-Float.y0.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.y0 3 2025-12-11 "Tomo man-pages" +.TH Float.y0 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.y0 \- Bessel function +Float.y0 \- Bessel function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.y0\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.y0\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the Bessel function of the second kind of order 0. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the Bessel function is to be calculated. +x Float The number for which the Bessel function is to be calculated. .TE .SH RETURN The Bessel function of the second kind of order 0 of `x`. @@ -32,4 +32,4 @@ The Bessel function of the second kind of order 0 of `x`. assert (1.0).y0() == -0.7652 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.y1.3 b/man/man3/tomo-Float.y1.3 index 0896d1e7..cbf1ab45 100644 --- a/man/man3/tomo-Float64.y1.3 +++ b/man/man3/tomo-Float.y1.3 @@ -2,14 +2,14 @@ .\" Copyright (c) 2025 Bruce Hill .\" All rights reserved. .\" -.TH Float64.y1 3 2025-12-11 "Tomo man-pages" +.TH Float.y1 3 2025-12-11 "Tomo man-pages" .SH NAME -Float64.y1 \- Bessel function +Float.y1 \- Bessel function .SH LIBRARY Tomo Standard Library .SH SYNOPSIS .nf -.BI Float64.y1\ :\ func(x:\ Float64\ ->\ Float64) +.BI Float.y1\ :\ func(x:\ Float\ ->\ Float) .fi .SH DESCRIPTION Computes the Bessel function of the second kind of order 1. @@ -22,7 +22,7 @@ allbox; lb lb lbx l l l. Name Type Description -x Float64 The number for which the Bessel function is to be calculated. +x Float The number for which the Bessel function is to be calculated. .TE .SH RETURN The Bessel function of the second kind of order 1 of `x`. @@ -32,4 +32,4 @@ The Bessel function of the second kind of order 1 of `x`. assert (1.0).y1() == 0.4401 .EE .SH SEE ALSO -.BR Tomo-Float64 (3) +.BR Tomo-Float (3) diff --git a/man/man3/tomo-Float64.3 b/man/man3/tomo-Float64.3 deleted file mode 100644 index 02bea385..00000000 --- a/man/man3/tomo-Float64.3 +++ /dev/null @@ -1,523 +0,0 @@ -'\" t -.\" Copyright (c) 2025 Bruce Hill -.\" All rights reserved. -.\" -.TH Float64 3 2025-12-11 "Tomo man-pages" -.SH NAME -Float64 \- a Tomo type -.SH LIBRARY -Tomo Standard Library -.fi -.SH METHODS - -.TP -.BI Float64.1_PI\ :\ Float64 -The constant $\frac{1}{\pi}$. - -For more, see: -.BR Tomo-Float64.1_PI (3) - - -.TP -.BI Float64.2_PI\ :\ Float64 -The constant $2 \times \pi$. - -For more, see: -.BR Tomo-Float64.2_PI (3) - - -.TP -.BI Float64.2_SQRTPI\ :\ Float64 -The constant $2 \times \sqrt{\pi}$. - -For more, see: -.BR Tomo-Float64.2_SQRTPI (3) - - -.TP -.BI Float64.E\ :\ Float64 -The base of the natural logarithm ($e$). - -For more, see: -.BR Tomo-Float64.E (3) - - -.TP -.BI Float64.INF\ :\ Float64 -Positive infinity. - -For more, see: -.BR Tomo-Float64.INF (3) - - -.TP -.BI Float64.LN10\ :\ Float64 -The natural logarithm of 10. - -For more, see: -.BR Tomo-Float64.LN10 (3) - - -.TP -.BI Float64.LN2\ :\ Float64 -The natural logarithm of 2. - -For more, see: -.BR Tomo-Float64.LN2 (3) - - -.TP -.BI Float64.LOG2E\ :\ Float64 -The base 2 logarithm of $e$ - -For more, see: -.BR Tomo-Float64.LOG2E (3) - - -.TP -.BI Float64.PI\ :\ Float64 -Pi ($\pi$). - -For more, see: -.BR Tomo-Float64.PI (3) - - -.TP -.BI Float64.PI_2\ :\ Float64 -$\frac{\pi}{2}$ - -For more, see: -.BR Tomo-Float64.PI_2 (3) - - -.TP -.BI Float64.PI_4\ :\ Float64 -$\frac{\pi}{4}$ - -For more, see: -.BR Tomo-Float64.PI_4 (3) - - -.TP -.BI Float64.SQRT1_2\ :\ Float64 -$\sqrt{\frac{1}{2}}$ - -For more, see: -.BR Tomo-Float64.SQRT1_2 (3) - - -.TP -.BI Float64.SQRT2\ :\ Float64 -$\sqrt{2}$ - -For more, see: -.BR Tomo-Float64.SQRT2 (3) - - -.TP -.BI Float64.TAU\ :\ Float64 -Tau ($2 \times \pi$) - -For more, see: -.BR Tomo-Float64.TAU (3) - - -.TP -.BI Float64.abs\ :\ func(n:\ Float64\ ->\ Float64) -Calculates the absolute value of a number. - -For more, see: -.BR Tomo-Float64.abs (3) - - -.TP -.BI Float64.acos\ :\ func(x:\ Float64\ ->\ Float64) -Computes the arc cosine of a number. - -For more, see: -.BR Tomo-Float64.acos (3) - - -.TP -.BI Float64.acosh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the inverse hyperbolic cosine of a number. - -For more, see: -.BR Tomo-Float64.acosh (3) - - -.TP -.BI Float64.asin\ :\ func(x:\ Float64\ ->\ Float64) -Computes the arc sine of a number. - -For more, see: -.BR Tomo-Float64.asin (3) - - -.TP -.BI Float64.asinh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the inverse hyperbolic sine of a number. - -For more, see: -.BR Tomo-Float64.asinh (3) - - -.TP -.BI Float64.atan\ :\ func(x:\ Float64\ ->\ Float64) -Computes the arc tangent of a number. - -For more, see: -.BR Tomo-Float64.atan (3) - - -.TP -.BI Float64.atan2\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) -Computes the arc tangent of the quotient of two numbers. - -For more, see: -.BR Tomo-Float64.atan2 (3) - - -.TP -.BI Float64.atanh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the inverse hyperbolic tangent of a number. - -For more, see: -.BR Tomo-Float64.atanh (3) - - -.TP -.BI Float64.cbrt\ :\ func(x:\ Float64\ ->\ Float64) -Computes the cube root of a number. - -For more, see: -.BR Tomo-Float64.cbrt (3) - - -.TP -.BI Float64.ceil\ :\ func(x:\ Float64\ ->\ Float64) -Rounds a number up to the nearest integer. - -For more, see: -.BR Tomo-Float64.ceil (3) - - -.TP -.BI Float64.clamped\ :\ func(x:\ Float64,\ low:\ Float64,\ high:\ Float64\ ->\ Float64) -Returns the given number clamped between two values so that it is within that range. - -For more, see: -.BR Tomo-Float64.clamped (3) - - -.TP -.BI Float64.copysign\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) -Copies the sign of one number to another. - -For more, see: -.BR Tomo-Float64.copysign (3) - - -.TP -.BI Float64.cos\ :\ func(x:\ Float64\ ->\ Float64) -Computes the cosine of a number (angle in radians). - -For more, see: -.BR Tomo-Float64.cos (3) - - -.TP -.BI Float64.cosh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the hyperbolic cosine of a number. - -For more, see: -.BR Tomo-Float64.cosh (3) - - -.TP -.BI Float64.erf\ :\ func(x:\ Float64\ ->\ Float64) -Computes the error function of a number. - -For more, see: -.BR Tomo-Float64.erf (3) - - -.TP -.BI Float64.erfc\ :\ func(x:\ Float64\ ->\ Float64) -Computes the complementary error function of a number. - -For more, see: -.BR Tomo-Float64.erfc (3) - - -.TP -.BI Float64.exp\ :\ func(x:\ Float64\ ->\ Float64) -Computes the exponential function $e^x$ for a number. - -For more, see: -.BR Tomo-Float64.exp (3) - - -.TP -.BI Float64.exp2\ :\ func(x:\ Float64\ ->\ Float64) -Computes $2^x$ for a number. - -For more, see: -.BR Tomo-Float64.exp2 (3) - - -.TP -.BI Float64.expm1\ :\ func(x:\ Float64\ ->\ Float64) -Computes $e^x - 1$ for a number. - -For more, see: -.BR Tomo-Float64.expm1 (3) - - -.TP -.BI Float64.fdim\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) -Computes the positive difference between two numbers. - -For more, see: -.BR Tomo-Float64.fdim (3) - - -.TP -.BI Float64.floor\ :\ func(x:\ Float64\ ->\ Float64) -Rounds a number down to the nearest integer. - -For more, see: -.BR Tomo-Float64.floor (3) - - -.TP -.BI Float64.hypot\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) -Computes the Euclidean norm, $\sqrt{x^2 + y^2}$, of two numbers. - -For more, see: -.BR Tomo-Float64.hypot (3) - - -.TP -.BI Float64.is_between\ :\ func(x:\ Float64,\ low:\ Float64,\ high:\ Float64\ ->\ Bool) -Determines if a number is between two numbers (inclusive). - -For more, see: -.BR Tomo-Float64.is_between (3) - - -.TP -.BI Float64.isfinite\ :\ func(n:\ Float64\ ->\ Bool) -Checks if a number is finite. - -For more, see: -.BR Tomo-Float64.isfinite (3) - - -.TP -.BI Float64.isinf\ :\ func(n:\ Float64\ ->\ Bool) -Checks if a number is infinite. - -For more, see: -.BR Tomo-Float64.isinf (3) - - -.TP -.BI Float64.j0\ :\ func(x:\ Float64\ ->\ Float64) -Computes the Bessel function of the first kind of order 0. - -For more, see: -.BR Tomo-Float64.j0 (3) - - -.TP -.BI Float64.j1\ :\ func(x:\ Float64\ ->\ Float64) -Computes the Bessel function of the first kind of order 1. - -For more, see: -.BR Tomo-Float64.j1 (3) - - -.TP -.BI Float64.log\ :\ func(x:\ Float64\ ->\ Float64) -Computes the natural logarithm (base $e$) of a number. - -For more, see: -.BR Tomo-Float64.log (3) - - -.TP -.BI Float64.log10\ :\ func(x:\ Float64\ ->\ Float64) -Computes the base-10 logarithm of a number. - -For more, see: -.BR Tomo-Float64.log10 (3) - - -.TP -.BI Float64.log1p\ :\ func(x:\ Float64\ ->\ Float64) -Computes $\log(1 + x)$ for a number. - -For more, see: -.BR Tomo-Float64.log1p (3) - - -.TP -.BI Float64.log2\ :\ func(x:\ Float64\ ->\ Float64) -Computes the base-2 logarithm of a number. - -For more, see: -.BR Tomo-Float64.log2 (3) - - -.TP -.BI Float64.logb\ :\ func(x:\ Float64\ ->\ Float64) -Computes the binary exponent (base-2 logarithm) of a number. - -For more, see: -.BR Tomo-Float64.logb (3) - - -.TP -.BI Float64.mix\ :\ func(amount:\ Float64,\ x:\ Float64,\ y:\ Float64\ ->\ Float64) -Interpolates between two numbers based on a given amount. - -For more, see: -.BR Tomo-Float64.mix (3) - - -.TP -.BI Float64.near\ :\ func(x:\ Float64,\ y:\ Float64,\ ratio:\ Float64\ =\ 1e-9,\ min_epsilon:\ Float64\ =\ 1e-9\ ->\ Bool) -Checks if two numbers are approximately equal within specified tolerances. If two numbers are within an absolute difference or the ratio between the two is small enough, they are considered near each other. - -For more, see: -.BR Tomo-Float64.near (3) - - -.TP -.BI Float64.nextafter\ :\ func(x:\ Float64,\ y:\ Float64\ ->\ Float64) -Computes the next representable value after a given number towards a specified direction. - -For more, see: -.BR Tomo-Float64.nextafter (3) - - -.TP -.BI Float64.parse\ :\ func(text:\ Text,\ remainder:\ &Text?\ =\ none\ ->\ Float64?) -Converts a text representation of a number into a floating-point number. - -For more, see: -.BR Tomo-Float64.parse (3) - - -.TP -.BI Float64.percent\ :\ func(n:\ Float64,\ precision:\ Float64\ =\ 0.01\ ->\ Text) -Convert a number into a percentage text with a percent sign. - -For more, see: -.BR Tomo-Float64.percent (3) - - -.TP -.BI Float64.rint\ :\ func(x:\ Float64\ ->\ Float64) -Rounds a number to the nearest integer, with ties rounded to the nearest even integer. - -For more, see: -.BR Tomo-Float64.rint (3) - - -.TP -.BI Float64.round\ :\ func(x:\ Float64\ ->\ Float64) -Rounds a number to the nearest whole number integer. - -For more, see: -.BR Tomo-Float64.round (3) - - -.TP -.BI Float64.significand\ :\ func(x:\ Float64\ ->\ Float64) -Extracts the significand (or mantissa) of a number. - -For more, see: -.BR Tomo-Float64.significand (3) - - -.TP -.BI Float64.sin\ :\ func(x:\ Float64\ ->\ Float64) -Computes the sine of a number (angle in radians). - -For more, see: -.BR Tomo-Float64.sin (3) - - -.TP -.BI Float64.sinh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the hyperbolic sine of a number. - -For more, see: -.BR Tomo-Float64.sinh (3) - - -.TP -.BI Float64.sqrt\ :\ func(x:\ Float64\ ->\ Float64) -Computes the square root of a number. - -For more, see: -.BR Tomo-Float64.sqrt (3) - - -.TP -.BI Float64.tan\ :\ func(x:\ Float64\ ->\ Float64) -Computes the tangent of a number (angle in radians). - -For more, see: -.BR Tomo-Float64.tan (3) - - -.TP -.BI Float64.tanh\ :\ func(x:\ Float64\ ->\ Float64) -Computes the hyperbolic tangent of a number. - -For more, see: -.BR Tomo-Float64.tanh (3) - - -.TP -.BI Float64.tgamma\ :\ func(x:\ Float64\ ->\ Float64) -Computes the gamma function of a number. - -For more, see: -.BR Tomo-Float64.tgamma (3) - - -.TP -.BI Float64.trunc\ :\ func(x:\ Float64\ ->\ Float64) -Truncates a number to the nearest integer towards zero. - -For more, see: -.BR Tomo-Float64.trunc (3) - - -.TP -.BI Float64.with_precision\ :\ func(n:\ Float64,\ precision:\ Float64\ ->\ Float64) -Round a number to the given precision level (specified as \fB10\fR, \fB.1\fR, \fB.001\fR etc). - -For more, see: -.BR Tomo-Float64.with_precision (3) - - -.TP -.BI Float64.y0\ :\ func(x:\ Float64\ ->\ Float64) -Computes the Bessel function of the second kind of order 0. - -For more, see: -.BR Tomo-Float64.y0 (3) - - -.TP -.BI Float64.y1\ :\ func(x:\ Float64\ ->\ Float64) -Computes the Bessel function of the second kind of order 1. - -For more, see: -.BR Tomo-Float64.y1 (3) - |
