ForthVM.Words.Math (ForthVM v0.5.0) View Source
Math words
Link to this section Summary
Functions
abs: ( x -- n ) absolute of x
cos: ( x -- n ) cos of x
/: ( x y -- n ) divides x by y
max: ( x y -- n ) miaximum between two values
min: ( x y -- n ) minimum between two values
-: ( y x -- n ) subtracts y from x
/mod: ( x y -- rem div ) divides x by y, places divident and reminder on top of data stack
*: ( x y -- n ) multiplies x by y
*/: ( x -- n ) perform multiplication and divide result by x
@-: ( x -- n ) negates x
1-: ( x -- n ) subtracts 1 to x
1+: ( x -- n ) adds 1 to x
pi: ( -- n ) puts Pi value on top of stack
+: ( y x -- n ) sums y to x
**: ( x y -- n ) calculates pow of x by y
rand: ( -- n ) puts random number on stack
sin: ( x -- n ) sin of x
sqrt: ( x -- n ) sqrt of x
tan: ( x -- n ) tan of x
Link to this section Functions
abs: ( x -- n ) absolute of x
cos: ( x -- n ) cos of x
/: ( x y -- n ) divides x by y
max: ( x y -- n ) miaximum between two values
min: ( x y -- n ) minimum between two values
-: ( y x -- n ) subtracts y from x
/mod: ( x y -- rem div ) divides x by y, places divident and reminder on top of data stack
*: ( x y -- n ) multiplies x by y
*/: ( x -- n ) perform multiplication and divide result by x
@-: ( x -- n ) negates x
1-: ( x -- n ) subtracts 1 to x
1+: ( x -- n ) adds 1 to x
pi: ( -- n ) puts Pi value on top of stack
+: ( y x -- n ) sums y to x
**: ( x y -- n ) calculates pow of x by y
rand: ( -- n ) puts random number on stack
sin: ( x -- n ) sin of x
sqrt: ( x -- n ) sqrt of x
tan: ( x -- n ) tan of x