12.6.2 Floating-Point extension words

12.6.2.1203 DF!
d-f-store FLOATING EXT
( df-addr -- ) ( F: r -- ) or ( r df-addr -- )

Store the floating-point number r as a 64-bit IEEE double-precision number at df-addr. If the significand of the internal representation of r has more precision than the IEEE double-precision format, it will be rounded using the round to nearest rule. An ambiguous condition exists if the exponent of r is too large to be accommodated in IEEE double-precision format. See: 12.3.1.1 Addresses, 12.3.2 Floating-point operations.

12.6.2.1204 DF@
d-f-fetch FLOATING EXT
( df-addr -- ) ( F: -- r ) or ( df-addr -- r )

Fetch the 64-bit IEEE double-precision number stored at df-addr to the floating-point stack as r in the internal representation. If the IEEE double-precision significand has more precision than the internal representation it will be rounded to the internal representation using the round to nearest rule. An ambiguous condition exists if the exponent of the IEEE double-precision representation is too large to be accommodated by the internal representation. See: 12.3.1.1 Addresses, 12.3.2 Floating-point operations.

12.6.2.1205 DFALIGN
d-f-align FLOATING EXT
( -- )

If the data-space pointer is not double-float aligned, reserve enough data space to make it so.

See: 12.3.1.1 Addresses.

12.6.2.1207 DFALIGNED
d-f-aligned FLOATING EXT
( addr -- df-addr )

df-addr is the first double-float-aligned address greater than or equal to addr.

See: 12.3.1.1 Addresses.

12.6.2.1208 DFLOAT+
d-float-plus FLOATING EXT
( df-addr1 -- df-addr2 )

Add the size in address units of a 64-bit IEEE double-precision number to df-addr1, giving df-addr2.

See: 12.3.1.1 Addresses.

2.6.2.1209 DFLOATS
d-floats FLOATING EXT
( n1 -- n2 )

n2 is the size in address units of n1 64-bit IEEE double-precision numbers.

12.6.2.1415 F**
f-star-star FLOATING EXT
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )

Raise r1 to the power r2, giving the product r3.

12.6.2.1427 F.
f-dot FLOATING EXT
( -- ) ( F: r -- ) or ( r -- )

Display, with a trailing space, the top number on the floating-point stack using fixed-point notation:

	[-] <digits>.<digits0>

An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.

See: 12.6.1.0558 >FLOAT.

12.6.2.1474 FABS
f-abs FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the absolute value of r1.

12.6.2.1476 FACOS
f-a-cos FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the principal radian angle whose cosine is r1. An ambiguous condition exists if |r1| is greater than one.

12.6.2.1477 FACOSH
f-a-cosh FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the floating-point value whose hyperbolic cosine is r1. An ambiguous condition exists if r1 is less than one.

12.6.2.1484 FALOG
f-a-log FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

Raise ten to the power r1, giving r2.

12.6.2.1486 FASIN
f-a-sine FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the principal radian angle whose sine is r1. An ambiguous condition exists if |r1| is greater than one.

12.6.2.1487 FASINH
f-a-cinch FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the floating-point value whose hyperbolic sine is r1. An ambiguous condition exists if r1 is less than zero.

12.6.2.1488 FATAN
f-a-tan FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the principal radian angle whose tangent is r1.

12.6.2.1489 FATAN2
f-a-tan-two FLOATING EXT
( F: r1 r2 -- r3 ) or ( r1 r2 -- r3 )

r3 is the radian angle whose tangent is r1/r2. An ambiguous condition exists if r1 and r2 are zero.

12.6.2.1491 FATANH
f-a-tan-h FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the floating-point value whose hyperbolic tangent is r1. An ambiguous condition exists if r1 is outside the range of -1E0 to 1E0.

12.6.2.1493 FCOS
f-cos FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the cosine of the radian angle r1.

12.6.2.1494 FCOSH
f-cosh FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the hyperbolic cosine of r1.

12.6.2.1513 FE.
f-e-dot FLOATING EXT
( -- ) ( F: r -- ) or ( r -- )

Display, with a trailing space, the top number on the floating-point stack using engineering notation, where the significand is greater than or equal to 1.0 and less than 1000.0 and the decimal exponent is a multiple of three.

An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.

See: 6.1.0750 BASE, 12.3.2 Floating-point operations, 12.6.1.2143 REPRESENT.

12.6.2.1515 FEXP
f-e-x-p FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

Raise e to the power r1, giving r2.

12.6.2.1516 FEXPM1
f-e-x-p-m-one FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

Raise e to the power r1 and subtract one, giving r2.

12.6.2.1553 FLN
f-l-n FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the natural logarithm of r1. An ambiguous condition exists if r1 is less than or equal to zero.

12.6.2.1554 FLNP1
f-l-n-p-one FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the natural logarithm of the quantity r1 plus one. An ambiguous condition exists if r1 is less than or equal to negative one.

12.6.2.1557 FLOG
f-log FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the base-ten logarithm of r1. An ambiguous condition exists if r1 is less than or equal to zero.

12.6.2.1613 FS.
f-s-dot FLOATING EXT
( -- ) ( F: r -- ) or ( r -- )

Display, with a trailing space, the top number on the floating-point stack in scientific notation:

	<significand><exponent>

where:

	<significand>  :=  [-]<digit>.<digits0>
	<exponent>     :=  E[-]<digits>

An ambiguous condition exists if the value of BASE is not (decimal) ten or if the character string representation exceeds the size of the pictured numeric output string buffer.

See: 6.1.0750 BASE, 12.3.2 Floating-point operations, 12.6.1.2143 REPRESENT.

12.6.2.1614 FSIN
f-sine FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the sine of the radian angle r1.

12.6.2.1616 FSINCOS
f-sine-cos FLOATING EXT
( F: r1 -- r2 r3 ) or ( r1 -- r2 r3 )

r2 is the sine of the radian angle r1. r3 is the cosine of the radian angle r1.

12.6.2.1617 FSINH
f-cinch FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the hyperbolic sine of r1.

12.6.2.1618 FSQRT
f-square-root FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the square root of r1. An ambiguous condition exists if r1 is less than zero.

12.6.2.1625 FTAN
f-tan FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the tangent of the radian angle r1. An ambiguous condition exists if cos(r1) is zero.

12.6.2.1626 FTANH
f-tan-h FLOATING EXT
( F: r1 -- r2 ) or ( r1 -- r2 )

r2 is the hyperbolic tangent of r1.

12.6.2.1640 F~
f-proximate FLOATING EXT
( -- flag ) ( F: r1 r2 r3 -- ) or ( r1 r2 r3 -- flag )

If r3 is positive, flag is true if the absolute value of (r1 minus r2) is less than r3.

If r3 is zero, flag is true if the implementation-dependent encoding of r1 and r2 are exactly identical (positive and negative zero are unequal if they have distinct encodings).

If r3 is negative, flag is true if the absolute value of (r1 minus r2) is less than the absolute value of r3 times the sum of the absolute values of r1 and r2.

12.6.2.2035 PRECISION
FLOATING EXT
( -- u )

Return the number of significant digits currently used by F., FE., or FS. as u.

12.6.2.2200 SET-PRECISION
FLOATING EXT
( u -- )

Set the number of significant digits currently used by F., FE., or FS. to u.

12.6.2.2202 SF!
s-f-store FLOATING EXT
( sf-addr -- ) ( F: r -- ) or ( r sf-addr -- )

Store the floating-point number r as a 32-bit IEEE single-precision number at sf-addr. If the significand of the internal representation of r has more precision than the IEEE single-precision format, it will be rounded using the round to nearest rule. An ambiguous condition exists if the exponent of r is too large to be accommodated by the IEEE single-precision format. See: 12.3.1.1 Addresses, 12.3.2 Floating-point operations.

12.6.2.2203 SF@
s-f-fetch FLOATING EXT
( sf-addr -- ) ( F: -- r ) or ( sf-addr -- r )

Fetch the 32-bit IEEE single-precision number stored at sf-addr to the floating-point stack as r in the internal representation. If the IEEE single-precision significand has more precision than the internal representation, it will be rounded to the internal representation using the round to nearest rule. An ambiguous condition exists if the exponent of the IEEE single-precision representation is too large to be accommodated by the internal representation. See: 12.3.1.1 Addresses, 12.3.2 Floating-point operations.

12.6.2.2204 SFALIGN
s-f-align FLOATING EXT
( -- )

If the data-space pointer is not single-float aligned, reserve enough data space to make it so.

See: 12.3.1.1 Addresses.

12.6.2.2206 SFALIGNED
s-f-aligned FLOATING EXT
( addr -- sf-addr )

sf-addr is the first single-float-aligned address greater than or equal to addr.

See: 12.3.1.1 Addresses.

12.6.2.2207 SFLOAT+
s-float-plus FLOATING EXT
( sf-addr1 -- sf-addr2 )

Add the size in address units of a 32-bit IEEE single-precision number to sf-addr1, giving sf-addr2.

See: 12.3.1.1 Addresses.

12.6.2.2208 SFLOATS
s-floats FLOATING EXT
( n1 -- n2 )

n2 is the size in address units of n1 32-bit IEEE single-precision numbers.

See: 12.3.1.1 Addresses.

Table of Contents
Next Section