3b: Floating Point
+fn
+fnFloat.
A mold for the floating-point arithmetic using the base of two, the formula is .
Produces either a float (%f), an infinity of other sign (%i), or not-a-number (%n). .s refers to sign, the $flags & or |; .e to exponent, a signed decimal; and .a to the significand, an unsigned integer.
Source
++ fn
$% [%f s=? e=@s a=@u]
[%i s=?]
[%n ~]
==Examples
> *fn
[%n ~]> (add:fl [%f & --33 2] [%f | --23 2])
[%f s=%.y e=-79 a=10.374.452.512.267.829.421.849.019.032.797.184]> (add:fl [%i &] [%i &])
[%i s=%.y]+dn
+dnDecimal float.
A mold for the floating-point arithmetic using the base of 10; the formula is .
Valid values are a float (%d), an infinity (%i), or a not-a-number (%n). .s refers to sign, the $flags & or |; .e to exponent, a signed decimal; and .a to the significand, an unsigned integer.
Examples
+rn
+rnParsed decimal float.
A mold for the floating-point arithmetic using the base of 10; the formula is .
Produces either a parsed float (%d), infinity of either sign (%i), or not-a-number (%n).
Source
Examples
+fl
+flArbitrary-precision floating-point.
Container arm for floating-point arithmetic functions.
Precision (
.p): number of bits in the significand; must be at least 2. Default is113.Minimum exponent (
.v): minimum value of.e. Default is-16.494.Width (
.w): Max. value of.eminus min. value of.e.0is for fixed-point. Default is32.765.Rounding mode (
.r): Possible modes are nearest (%n), up (%u), down (%d), to zero (%z), and away from zero (%a). Default value is%n.Behavior (
.d): return denormals (%d), flush denormals to zero (%z), infinite exponent range (%i). Default value is%d.
Source
^rou:fl
^rou:flRound.
Rounds .a to a the nearest float that can be represented with a 113-bit significand. There is no term to sign the significand, meaning that a positive sign will always be produced.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
An fn.
Source
Examples
+rau:fl
+rau:flVarious roundings.
Rounds .a based on what the state of of .r in the core contained in +fl. .t is a sticky bit that represents a value less than when passed to +lug:fl.
Accepts
.a is a cell of a signed integer and an unsigned integer.
.t is a $flag.
Produces
An +fn.
Source
Examples
Discussion
See +lug:fl for possible rounding operations.
^add:fl
^add:flAdd.
Produces the sum of .a and .b. .e is used to choose between an exact result (any-sized significand) or a rounded result (113-bit significand).
There is no term to sign the significands, so a positive sign will always be produced.
Accepts
.a is an +fn.
.b is an +fn
.e is a $flag.
Produces
An +fn.
Source
Examples
^sub:fl
^sub:flSubtract.
Produces the difference of .a minus b. .e is used to choose between an exact result (any-sized significand) or a rounded result (113-bit significand).
Accepts
.a is a cell of a signed integer and an unsigned integer.
.b is a cell of a signed integer and an unsigned integer.
.e is a $flag.
Produces
An +fn.
Source
Examples
^mul:fl
^mul:flMultiply.
Produces the product of .a multiplied by .b. There is no term to sign the significands, so a positive sign will always be produced.
Accepts
.a is a cell of a signed integer and an unsigned integer.
.b is a cell of a signed integer and an unsigned integer.
Produces
An +fn.
Source
Examples
^div:fl
^div:flDivide.
Produces the quotient of .a divided by .b. There is no term to sign the significands, so a positive sign will always be produced.
Accepts
.a is a cell of a signed integer and an unsigned integer.
.b is a cell of a signed integer and an unsigned integer.
Produces
An +fn.
Source
Examples
^sqt:fl
^sqt:flSquare root.
Produces the square root of .a.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
An +fn.
Source
Examples
^lth:fl
^lth:flLess than.
Tests if .a is less than .b.
Accepts
.a is a cell of a signed integer and an unsigned integer.
.b is a cell of a signed integer and an unsigned integer.
Produces
An $flag.
Source
Examples
^equ:fl
^equ:flEquals.
Tests if .a is equal to .b.
Accepts
.a is a cell of a signed integer and an unsigned integer.
.b is a cell of a signed integer and an unsigned integer.
Produces
A $flag.
Source
Examples
+ibl:fl
+ibl:flInteger binary logarithm.
Produces the lowest power to which the number 2 must be raised to obtain .a or greater.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
A signed integer.
Source
Examples
+uni:fl
+uni:flChange representation to odd.
Produces another representation of the floating point .a where the significand is odd. Every floating-point number has a unique representation of this kind. If the significand of .a is already odd, nothing changes.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
A cell of a signed integer and an unsigned integer.
Source
Examples
+xpd:fl
+xpd:flExpand.
Produces the fully precise form of .a, or the denormalized form of .a.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
A cell of a signed integer and an unsigned integer.
Sources
Examples
+lug:fl
+lug:flCentral rounding mechanism.
Performs various rounding operations on .a. An operation is chosen based on the value selected for .t. .s is a sticky bit that represents a value less than .
Possible rounding operations:
Floor (
%fl)Ceiling (
%ce)Smaller (
%sm)Larger (
%lg)Nearest (
%ne) -- Rounds ties away from 0 if the number is even, rounds toward 0 if the number is odd.
Accepts
.t is one of the following: %fl, %ce, %sm, %lg, %ne, %na, or %nt.
.a is a cell of a signed integer and an unsigned integer.
.s is a $flag.
Produces
An +fn.
Source
^drg:fl
^drg:flGet printable decimal.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
A cell of a signed integer and an unsigned integer.
Source
Examples
^toj:fl
^toj:flRound to integer.
Rounds float .a to the nearest decimal float with an exponent of 0.
Accepts
.a is a cell of a signed integer and an unsigned integer.
Produces
An +fn.
Source
Examples
+ned:fl
+ned:flRequire float.
Produces .a if .a is a is of floating-point representation. If .a is another case of +fn, such as infinity or not-a-number, a crash is produced.
Accepts
.a is an +fn.
Produces
A cell of a signed integer and an unsigned integer.
Source
Examples
+shf:fl
+shf:flShift power.
Multiplies .a by 2 to the .b power without rounding. This results in shifting the exponent term by .b.
Accepts
.a is an +fn.
.b is a signed integer.
Produces
An +fn.
Source
Examples
+fli:fl
+fli:flFlip sign.
Produces .a with its signed changed from positive to negative, or vice versa.
Accepts
.a is an +fn.
Produces
An +fn.
Source
Examples
+swr:fl
+swr:flSwitch rounding.
Switches the rounding mode of r:fl.
Source
Examples
Below is the default +fl core.
The second new-fl below is a new +fl core with changed state.
+prc:fl
+prc:flForce precision of 2 or greater.
Produces .p, the core's precision, if .p is greater than or equal to 2. Otherwise, a crash is produced.
Source
Examples
+den:fl
+den:flBehavior.
Produces d:fl. Denormalizes if d:fl is %d. Flushes denormals to zero if d:fl is %f.
Denormalizes if
d:flis%d.Flushes denormals to zero if
d:flis%f.Infinite exponent range if
%dis%i.
The default value of .d is %d.
Source
Examples
+emn:fl
+emn:flMinimum exponent.
Produces v:fl, the minimum exponent. The default minimum exponent is -16.494.
Source
Examples
+emx:fl
+emx:flMaximum exponent.
Returns the maximum exponent of +fl. The default maximum exponent is --16.271.
Source
Examples
+spd:fl
+spd:flSmallest denormal.
Produces the smallest possible denormalized float.
Source
Examples
+spn:fl
+spn:flSmallest normal.
Produces the smallest representable normal float.
Source
Examples
+lfn:fl
+lfn:flLargest normal.
Produces the largest representable normal float.
Source
Examples
+lfe:fl
+lfe:flMaximum.
Produces the sum of emx:fl plus prc:fl.
Source
Examples
+zer:fl
+zer:flZero.
Produces zero represented as a float.
Source
Examples
+rou:fl
+rou:flRound.
Rounds .a. The way in which .a is rounded depends on the value of r:fl.
Accepts
.a is an +fn.
Produes
An +fn.
Source
Examples
+syn:fl
+syn:flGet sign.
Produces the sign of .a.
Accepts
.a is an +fn.
Produes
An +fn.
Source
Examples
+abs:fl
+abs:flAbsolute value.
Produces the absolute value of .a.
Accepts
.a is an +fn.
Produes
An +fn.
Sources
Examples
+add:fl
+add:flAdd.
Produces the sum of .a plus .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Source
Examples
+ead:fl
+ead:flExact add.
Produces the exact sum of .a plus .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Source
Examples
+sub:fl
+sub:flSubtract.
Produces the difference of .a minus .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Source
Examples
+mul:fl
+mul:flMultiply.
Produces the product of .a multiplied by .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Source
+emu:fl
+emu:flExact multiply.
Produces the exact product of .a multiplied by .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Examples
+div:fl
+div:flDivide.
Produces the quotient of .a divided by .b.
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +fn.
Source
+fma:fl
+fma:flFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is an +fn.
.b is an +fn.
.c is an +fn.
Produces
An +fn.
Source
Examples
+sqt:fl
+sqt:flSquare root.
Produces the square root of .a.
Accepts
.a is an +fn.
Produces
An +fn.
Source
Examples
+inv:fl
+inv:flInverse.
Produces the inverse of .a by dividing 1 by .a.
Accepts
.a is an +fn.
Produces
An +fn.
Source
Examples
+sun:fl
+sun:flUnsigned integer to float.
Produces .a in floating-point representation.
Accepts
.a is an unsigned integer.
Produces
An +fn.
Source
Examples
+san:fl
+san:flSigned integer to float.
Produces the floating-point representation of .a, a signed integer.
Accepts
.a is a signed integer.
Produces
An +fn.
Source
Examples
+lth:fl
+lth:flLess than.
Tests if .a is less than .b. Returns ~ in the event of .a or .b being a NaN ([%n ~]).
Accepts
.a is an +fn.
.b is an +fn.
Produces
A +unit of $flag.
Source
Examples
+lte:fl
+lte:flLess than or equal.
Tests whether .a is less than or equal to .b. Returns ~ in the event of .a or .b being a NaN ([%n ~]).
Accepts
.a is an +fn.
.b is an +fn.
Produces
A +unit of $flag.
Source
Examples
+equ:fl
+equ:flEquals.
Tests if .a is equal to .b. Returns ~ in the event of .a or .b being a NaN ([%n ~]).
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +unit of $flag.
Source
Examples
+gte:fl
+gte:flGreater or equal than.
Tests whether .a is greater than or equal to .b. Returns ~ in the event of .a or .b being a NaN ([%n ~]).
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +unit of $flag.
Source
Examples
+gth:fl
+gth:flGreater than.
Tests whether .a is greater than .b. Returns ~ in the event of .a or .b being a NaN ([%n ~]).
Accepts
.a is an +fn.
.b is an +fn.
Produces
An +unit of $flag.
Source
Examples
+drg:fl
+drg:flFloat to decimal.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is an +fn.
Produces
A +dn.
Source
Examples
+grd:fl
+grd:flDecimal to float.
Converts decimal .a to +fn.
Accepts
.a is a +dn.
Produces
An +fn.
Source
Examples
+toi:fl
+toi:flRound to signed integer.
Rounds .a to the nearest signed integer.
Accepts
.a is an +fn.
Produces
A +unit of @s.
Source
Examples
+toj:fl
+toj:flRound to integer fn.
Rounds .a to the nearest decimal integer.
Accepts
.a is an +fn.
Produces
A +unit of @s.
Source
Examples
+ff
+ffIEEE 754 Formatting.
Container core for IEEE 754 formatting operations.
.wis width: The number of bits in the exponent field..pis precision: The number of bits in the significand field..bis bias: Added to exponent when storing..ris rounding mode: Possible modes are nearest (%n), up (%u), down (%d), to zero (%z), and away from zero (%a). Default value is%a.
Source
Examples
Discussion
+ff has no use outside of the functionality provided to other cores: +rd, +rs, +rq, and +rh. It's not intended to be used directly; it's just meant to power those cores.
+sb:ff
+sb:ffSign bit.
Produces the sign bit of +ff.
Source
Examples
+me:ff
+me:ffMinimum exponent.
Produces the minimum possible exponent of +ff.
Source
Examples
+pa:ff
+pa:ffInitialize +fl.
Instantiates the core +fl, giving values to its samples based on the configuration of the +ff core.
Source
Examples
Discussion
+pa exists exclusively for internal use of +ff, and +ff exists for internal use in other cores.
+sea:ff
+sea:ff@r to +fn.
Converts .a from @r to +fn.
Accepts
.a is a @r, an IEEE float.
Produces
A +unit of @s.
Source
Examples
+bit:ff
+bit:ff+fn to @r, rounding.
Converts .a from +fn to @r and applies rounding.
Accepts
.a is an +fn.
Produces
A @r.
Source
Examples
+bif:ff
+bif:ff+fn to @r, no rounding.
Converts .a from +fn to @r. No rounding is applied.
Accepts
.a is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+sig:ff
+sig:ffGet sign.
Produces the sign of .a.
Accepts
.a is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+exp:ff
+exp:ffGet exponent.
Produces the exponent of .a.
Accepts
.a is a @r, an IEEE float.
Produces
A signed integer.
Source
Examples
+add:ff
+add:ffAdd.
Produces the sum of .a plus .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Source
Examples
+sub:ff
+sub:ffSub.
Produces the sum of .a plus .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Source
Examples
+mul:ff
+mul:ffMultiply.
Produces the product of .a multiplied by .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Multiply
Examples
+div:ff
+div:ffDivide.
Produces the quotient of .a divided by .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Source
Examples
+fma:ff
+fma:ffFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
.c is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Source
Examples
+sqt:ff
+sqt:ffSquare root.
Produces the square root of .a.
Accepts
.a is a @r, an IEEE float.
Produces
A @r, an IEEE float.
Source
Examples
+lth:ff
+lth:ffLess than.
Tests whether .a is less than .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+lte:ff
+lte:ffLess than or equal to.
Tests whether .a is less than or equal to .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+equ:ff
+equ:ffEquals.
Tests whether .a is equal to .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+gte:ff
+gte:ffGreater or equal than.
Tests whether .a is greater than or equal to .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+gth:ff
+gth:ffGreater than.
Tests whether .a is greater than or equal to .b.
Accepts
.a is a @r, an IEEE float.
.b is a @r, an IEEE float.
Produces
A $flag.
Source
Examples
+sun:ff
+sun:ffUnsigned integer to @r.
Converts .a from an unsigned integer (@u) to @r.
Accepts
.a is @u, unsigned integer.
Produces
A @r, an IEEE float.
Source
Examples
+san:ff
+san:ffSigned integer to @r.
Converts .a from a signed integer to @r.
Accepts
.a is @s, a signed integer.
Produces
A @r, an IEEE float.
Source
Examples
+toi:ff
+toi:ffRound to integer.
Rounds .a to the nearest signed integer.
Accepts
.a is a @r, an IEEE float.
Produces
A $flag of @s.
Source
Examples
+drg:ff
+drg:ff@r to decimal float.
Converts .a from @r to +dn using the Dragon4 algorithm.
Accepts
.a is a @r, an IEEE float.
Produces
A +dn.
Source
Examples
+grd:ff
+grd:ffDecimal float to @r.
Converts .a from +dn to @r.
Accepts
.a is a +dn.
Produces
A @r, an IEEE float.
Source
Examples
+rlyd
+rlydPrep @rd for print.
Converts .a from a double-precision binary float to decimal64.
Accepts
.a is a @rd, a double-precision float.
Produces
A +dn.
Source
Examples
+rlys
+rlysPrep @rs for print.
Converts .a from a single-precision binary float to decimal32.
Accepts
.a is a @rs, a single-precision float.
Produces
A +dn.
Source
Examples
+rlyh
+rlyhPrep @rh for print.
Converts .a from a half-precision binary float to decimal16.
Accepts
.a is a @rh, a half-precision float.
Produces
A +dn.
Source
Examples
+rlyq
+rlyqPrep @rq for print.
Converts .a from a quad-precision binary float to decimal128.
Accepts
.a is a @rq, a quad-precision float.
Produces
A +dn.
Source
Examples
+ryld
+ryldFinish parsing @rd.
Converts .a from a decimal float to a double-precision binary float.
Accepts
.a is a +dn.
Produces
A a @rd, a double-precision float.
Source
Examples
+ryls
+rylsFinish parsing @rs.
Converts .a from a decimal float to a single-precision binary float.
Accepts
.a is a +dn.
Produces
A a @rs, a single-precision float.
Source
Examples
+rylh
+rylhFinish parsing @rh.
Converts .a from a decimal float to a half-precision binary float.
Accepts
.a is a +dn.
Produces
A a @rh, a half-precision float.
Source
Examples
+rylq
+rylqFinish parsing @rq.
Converts .a from a decimal float to a quad-precision binary float.
Accepts
.a is a +dn.
Produces
A a @rq, a quad-precision float.
Source
Examples
+rd
+rdDouble-precision floating-point operations.
A container core for operations related to double-precision binary floats.
+rd has four rounding modes: round to nearest (%n), round up (%u), round down (%d), and round to zero (%z). The default rounding mode is %z. If you need a different rounding mode, you'd do something like =/ rd-n ~(. rd %n) and then call the arms of your modified version instead.
Source
+ma:rd
+ma:rdInitialize +ff.
Instantiates the core +ff, giving values to its samples based on the configuration of the +rd core. This arm is used internally by +rd, you would not normally call this directly.
Source
Examples
+sea:rd
+sea:rd@rd to +fn.
Converts .a from a double-precision binary float to +fn.
Source
Examples
+bit:rd
+bit:rd+fn to @rd.
Converts .a from +fn to a double-precision binary float.
Accepts
.a is an +fn.
Produces
A @rd, a double-precision float.
Source
Examples
+add:rd
+add:rdAdd.
Produces the sum of .a plus .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A @rd.
Source
Examples
+sub:rd
+sub:rdSubtract.
Produces the difference of .a minus .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A @rd.
Source
Examples
+mul:rd
+mul:rdMultiply.
Produces the product of .a times .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A @rd.
Source
Examples
+div:rd
+div:rdDivide.
Produces the quotient of .a divided by .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd.
Produces
A @rd.
Source
Examples
+fma:rd
+fma:rdFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is a @rd, an IEEE float.
.b is a @rd.
.c is a @rd.
Produces
A @rd.
Source
Examples
+sqt:rd
+sqt:rdSquare root.
Produces the square root of .a.
Accepts
.a is a @rd, a double-precision float.
Produces
A @rd.
Source
Examples
+lth:rd
+lth:rdLess than.
Test whether .a is less than .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A $flag.
Source
Examples
+lte:rd
+lte:rdLess than or equal.
Test whether .a is less than or equal to .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A $flag.
Source
Examples
+equ:rd
+equ:rdEquals.
Test whether .a is equal to .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A $flag.
Source
Examples
+gte:rd
+gte:rdGreater than or equal.
Test whether .a is greater than or equal to .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A $flag.
Source
Examples
+gth:rd
+gth:rdGreater than.
Test whether .a is greater .b.
Accepts
.a is a @rd, a double-precision float.
.b is a @rd, a double-precision float.
Produces
A $flag.
Source
Examples
+sun:rd
+sun:rdUnsigned integer to @rd.
Converts an unsigned integer .a to @rd.
Accepts
.a is a @u, an unsigned integer.
Produces
A @rd.
Source
Examples
+san:rd
+san:rdSigned integer to @rd.
Converts a signed integer .a to @rd.
Accepts
.a is a @s, a signed integer.
Produces
A @rd.
Source
Examples
+sig:rd
+sig:rdGet sign.
Produces the sign of .a.
Accepts
.a is a @rd
Produces
A $flag.
Source
Examples
+exp:rd
+exp:rdGet exponent.
Produces the exponent of .a.
Accepts
.a is a @rd
Produces
A @s.
Source
Examples
+toi:rd
+toi:rdRound to integer.
Rounds .a to the nearest integer.
Accepts
.a is a @rd
Produces
A +unit of @s.
Source
Examples
+drg:rd
+drg:rd@rd to decimal float.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is a @rd
Produces
A +dn.
Source
Examples
+grd:rd
+grd:rdDecimal float to @rd.
Converts .a from decimal float to @rd.
Accepts
.a is a @dn
Produces
A @rd.
Source
Examples
+rs
+rsSingle-precision floating-point operations.
A container core for operations related to single-precision binary floats.
+rs has four rounding modes: round to nearest (%n), round up (%u), round down (%d), and round to zero (%z). The default rounding mode is %z. If you need a different rounding mode, you'd do something like =/ rs-n ~(. rs %n) and then call the arms of your modified version instead.
Source
+ma:rs
+ma:rsInitialize +ff.
Instantiates the core +ff, giving values to its samples based on the configuration of the +rs core. This arm is used internally by +rs, you would not normally call this directly.
Source
Examples
+sea:rs
+sea:rs@rs to +fn.
Converts .a from @rs to +fn.
Accepts
.a is a @rs, an single-precision float.
Produces
An +fn.
Source
Examples
+bit:rs
+bit:rs+fn to @rs.
Converts .a from +fn to @rs.
Accepts
.a is an +fn.
Produces
A @rs, a single-precision float.
Source
Examples
+add:rs
+add:rsAdd.
Produces the sum of .a plus .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A @rs.
Source
Examples
+sub:rs
+sub:rsSubtract.
Subtracts .a from .b.
Accepts
.a is a @rs.
.b is a @rs.
Source
Examples
+mul:rs
+mul:rsMultiply.
Produces the product of .a multiplied by .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A @rs.
Source
Examples
+div:rs
+div:rsDivide.
Produces the quotient of .a divided by .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A @rs.
Source
Examples
+fma:rs
+fma:rsFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
.c is a @rs.
Produces
A @rs.
Source
Examples
+sqt:rs
+sqt:rsSquare root.
Produces the square root of .a.
Accepts
.a is a @rs, a single-precision float.
Produces
A @rs.
Source
Examples
+lth:rs
+lth:rsLess than.
Test whether .a is less than .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A $flag.
Source
Examples
+lte:rs
+lte:rsLess than or equal.
Test whether .a is less than or equal to .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A $flag.
Source
Examples
+equ:rs
+equ:rsEquals.
Test whether .a is equal to .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A $flag.
Source
Examples
+gte:rs
+gte:rsGreater than or equal.
Test whether .a is greater than or equal to .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A $flag.
Source
Examples
+gth:rs
+gth:rsGreater than.
Test whether .a is greater than .b.
Accepts
.a is a @rs, a single-precision float.
.b is a @rs.
Produces
A $flag.
Source
Examples
+sun:rs
+sun:rsUnsigned integer to @rs.
Converts .a from an unsigned integer to @rs.
Accepts
.a is an unsigned integer.
Produces
A @rs.
Source
Examples
+san:rs
+san:rsSigned integer to @rs.
Converts .a from a signed integer to @rs.
Accepts
.a is a signed integer.
Produces
A @rs.
Source
Examples
+sig:rs
+sig:rsGet sign.
Produces the sign of .a.
Accepts
.a is a @rs.
Produces
A $flag.
Source
Examples
+exp:rs
+exp:rsGet exponent.
Produces the exponent of .a.
Accepts
.a is a @rs.
Produces
A signed integer.
Source
Examples
+toi:rs
+toi:rsRound to integer.
Rounds .a to the nearest integer.
Accepts
.a is a @rs.
Produces
A +unit of @s.
Source
Examples
+drg:rs
+drg:rs@rs to decimal float.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is a @rs
Produces
A +dn.
Source
Examples
+grd:rs
+grd:rsDecimal float to @rs.
Converts .a from +dn to @rs.
Accepts
.a is a +dn.
Produces
A @rs.
Source
Examples
+rq
+rqQuadruple-precision fp.
A container core for operations related to quadruple-precision binary floats.
+rq has four rounding modes: round to nearest (%n), round up (%u), round down (%d), and round to zero (%z). The default rounding mode is %z. If you need a different rounding mode, you'd do something like =/ rq-n ~(. rq %n) and then call the arms of your modified version instead.
Source
+ma:rq
+ma:rqInitialize +ff.
Instantiates the core +ff, giving values to its samples based on the configuration of the +rq core. This arm is used internally by +rq, you would not normally call this directly.
Source
+sea:rq
+sea:rq@rq to +fn.
Converts .a from @rq to +fn.
Accepts
.a is a @rq, a quad-precision float.
Produces
An +fn.
Source
Examples
+bit:rq
+bit:rq+fn to @rq.
Converts .a from +fn to @rq.
Accepts
.a is an +fn.
Produces
A @rq, a quad-precision float.
Source
Examples
+add:rq
+add:rqAdd.
Produces the sum of .a plus .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A @rq.
Source
Examples
+sub:rq
+sub:rqSubtract.
Produces the difference of .a minus .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A @rq.
Source
Examples
+mul:rq
+mul:rqMultiply.
Produces the product of .a times .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A @rq.
Source
Examples
+div:rq
+div:rqDivide.
Produces the product of .a divided by .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A @rq.
Source
Examples
+fma:rq
+fma:rqFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
.c is a @rq.
Produces
A @rq.
Source
Examples
+sqt:rq
+sqt:rqSquare root.
Produces the square root of .a.
Accepts
.a is a @rq, a quad-precision float.
Produces
A @rq.
Source
Examples
+lth:rq
+lth:rqLess than.
Tests whether .a is less than .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A $flag.
Source
Examples
+lte:rq
+lte:rqLess than or equal.
Tests whether .a is less than or equal to .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A $flag.
Source
Examples
+equ:rq
+equ:rqEquals.
Tests whether .a is equal to .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A $flag.
Source
Examples
+gte:rq
+gte:rqGreater than or equal.
Tests whether .a is greater than or equal to .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A $flag.
Source
Examples
+gth:rq
+gth:rqTests whether .a is greater than .b.
Accepts
.a is a @rq, a quad-precision float.
.b is a @rq.
Produces
A $flag.
Source
Examples
+sun:rq
+sun:rqUnsigned integer to @rq.
Converts .a from an unsigned integer to @rq.
Accepts
.a is a @u, an unsigned integer.
Produces
A @rq, a quad-precision float.
Source
Examples
+san:rq
+san:rqSigned integer to +rq.
Converts .a from a signed integer to @rq.
Accepts
.a is a @s, a signed integer.
Produces
A @rq, a quad-precision float.
Source
Examples
+sig:rq
+sig:rqGet sign.
Produces the sign of .a.
Accepts
.a is a @rq, a quad-precision float.
Produces
A $flag.
Source
Examples
+exp:rq
+exp:rqGet exponent.
Gets the exponent of .a.
Accepts
.a is a @rq, a quad-precision float.
Produces
A @s, a signed integer.
Source
Examples
+toi:rq
+toi:rqRound to integer.
Rounds .a to the nearest integer.
Accepts
.a is a @rq, a quad-precision float.
Produces
A +unit of @s.
Source
Examples
+drg:rq
+drg:rq@rq to decimal float.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is a @rq, a quad-precision float.
Produces
A +dn.
Source
Examples
+grd:rq
+grd:rqDecimal float to @rq.
Converts .a from +dn to @rq.
Accepts
.a is +dn.
.a is a @rq.
Produces
A @rq, a quad-precision float.
Source
Examples
+rh
+rhHalf-precision fp.
A container core for operations related to half-precision binary floats.
+rh has four rounding modes: round to nearest (%n), round up (%u), round down (%d), and round to zero (%z). The default rounding mode is %z. If you need a different rounding mode, you'd do something like =/ rh-n ~(. rh %n) and then call the arms of your modified version instead.
Source
+ma:rh
+ma:rhInitialize +ff.
Instantiates the core +ff, giving values to its samples based on the configuration of the +rh core. This arm is used internally by +rh, you would not normally call this directly.
Source
+sea:rh
+sea:rh@rh to +fn.
Converts .a from @rh to +fn.
Accepts
.a is a @rh, a half-precision float.
Produces
An +fn.
Source
Examples
+bit:rh
+bit:rh+fn to @rh.
Converts .a from +fn to @rh.
Accepts
.a is an +fn.
Produces
A @rh, a half-precision float.
Source
Examples
+add:rh
+add:rhProduces the sum of .a plus .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A @rh.
Source
Examples
+sub:rh
+sub:rhSubtract.
Produces the difference of .a minus .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A @rh.
Source
Examples
+mul:rh
+mul:rhMultiply.
Produces the product of .a times .b.
Accepts
.a is a @rh, a quad-precision float.
.b is a @rh.
Produces
A @rh.
Source
Examples
+div:rh
+div:rhDivide.
Produces the product of .a divided by .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A @rh.
Source
examples
+fma:rh
+fma:rhFused multiply-add.
Produces the sum of .c plus the product of .a multiplied by .b; .
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
.c is a @rh.
Produces
A @rh.
Source
Examples
+sqt:rh
+sqt:rhSquare root.
Produces the square root of .a.
Accepts
.a is a @rh, a half-precision float.
Produces
A @rh.
Source
Example
+lth:rh
+lth:rhLess than.
Tests whether .a is less than .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A $flag.
Source
Examples
+lte:rh
+lte:rhLess than or equal.
Tests whether .a is less than or equal to .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A $flag.
Source
Examples
+equ:rh
+equ:rhEquals.
Tests whether .a is equal to .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A $flag.
Source
Examples
+gte:rh
+gte:rhGreater than or equal.
Tests whether .a is greater than or equal to .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A $flag.
Source
Examples
+gth:rh
+gth:rhTests whether .a is greater than .b.
Accepts
.a is a @rh, a half-precision float.
.b is a @rh.
Produces
A $flag.
Source
Examples
+tos:rh
+tos:rh@rh to @rs.
Converts @ from @rh to @rs.
Accepts
.a is a @rh, a half-precision float.
Produces
A @rs, a single-precision float.
Source
Examples
+fos:rh
+fos:rh@rs to @rh.
Converts @ from @rs to @rh.
Accepts
.a is a @rs, a single-precision float.
Produces
A @rh, a half-precision float.
Source
Examples
+sun:rh
+sun:rhUnsigned integer to @rh.
Converts .a from an unsigned integer to @rh.
Accepts
.a is a @u, an unsigned integer.
Produces
A @rh, a half-precision float.
Source
Examples
+san:rh
+san:rhSigned integer to @rh.
Converts .a from a signed integer to @rh.
Accepts
.a is a @s, a signed integer.
Produces
A @rh, a half-precision float.
Source
Examples
+sig:rh
+sig:rhGet sign.
Produces the sign of .a.
Accepts
.a is a @rh, a half-precision float.
Produces
A $flag.
Source
Examples
+exp:rh
+exp:rhGet exponent.
Gets the exponent of .a.
Accepts
.a is a @rh, a half-precision float.
Produces
A @s, a signed integer.
Source
Examples
+toi:rh
+toi:rhRound to integer.
Rounds .a to the nearest integer.
Accepts
.a is a @rh, a half-precision float.
Produces
A +unit of @s.
Source
Examples
+drg:rh
+drg:rh@rh to decimal float.
Produces the decimal form of .a using the Dragon4 algorithm. Guarantees accurate results for rounded floats.
Accepts
.a is a @rh, a half-precision float.
Produces
A +dn.
Source
Examples
+grd:rh
+grd:rhDecimal float to @rh.
Converts .a from +dn to @rh.
Accepts
.a is +dn.
.a is a @rh.
Produces
A @rh, a a half-precision float.
Source
Examples
Last updated