10 lines
229 B
Forth
Executable File
10 lines
229 B
Forth
Executable File
\ dmath.fs -- double-precision math
|
|
|
|
\ doubles are stored on stack as two integers, n1 n2
|
|
\ d = n1 + 4294967296 * n2
|
|
|
|
\ Multiplication
|
|
: d* ( d1 d2 -- d1*d2 )
|
|
\ (n1 + c * n2)(n3 + c * n4)
|
|
\ n1*n3 + c*(n2*n3 + n1*n4) + c^2*n2*n4
|