OpenBoot 3.x Command Reference Manual

# Single-Precision Arithmetic Functions

Table I-9 Single-Precision Arithmetic Functions

Command

Stack Diagram

Description

+

( nu1 nu2 -- sum )

-

( nu1 nu2 -- diff )

Subtract nu1 - nu2.

*

( nu1 nu2 -- prod )

Multiply nu1 * nu2.

*/

( nu1 nu2 nu3 -- quot )

Calculates nu1 * nu2 / n3.

/

( n1 n2 -- quot )

Divide n1 by n2; remainder is discarded.

1+

( nu1 -- nu2 )

1-

( nu1 -- nu2 )

Subtract 1.

2+

( nu1 -- nu2 )

2-

( nu1 -- nu2 )

Subtract 2.

abs

( n -- u )

Absolute value.

bounds

( n count -- n+count n )

Prepare arguments for do or ?do loop.

even

( n -- n | n+1 )

Round to nearest even integer >= n.

max

( n1 n2 -- n1|n2 )

Return the maximum of n1 and n2.

min

( n1 n2 -- n1|n2 )

Return the minimum of n1 and n2.

mod

( n1 n2 -- rem )

Remainder of n1 / n2.

*/mod

( n1 n2 n3 -- rem quot )

Remainder, quotient of n1 * n2 / n3.

/mod

( n1 n2 -- rem quot )

Remainder, quotient of n1 / n2.

negate

( n1 -- n2 )

Change the sign of n1.

u*

( u1 u2 -- uprod )

Multiply 2 unsigned numbers yielding an unsigned product.

u/mod

( u1 u2 -- urem uquot )

Divide unsigned number by an unsigned number; yield remainder and quotient.