Shop OBEX P1 Docs P2 Docs Learn Events
Been a while - I''m really rusty.. — Parallax Forums

Been a while - I''m really rusty..

ArchiverArchiver Posts: 46,084
edited 2003-06-10 21:43 in General Discussion
>What would be the best way to multiply 199.9 (var) x 1.1508 (con) with a
>stamp so as to get back a result of xxx.x?
>I've looked at the ** operator, but can't seem to figure out how to get the
>correct result.
>
>TIA,
>Chris

X var word
Y var word
X=1999

Y = X ** 9883 + X

debug dec Y/10,".",dec1 X

' prints 230.0 -- correct answer is 230.04492

' 9883/65536 approximates 1508/10000



-- Tracy
Sign In or Register to comment.