i need to divide/multiply by 1.8 in masm. Anyone know of a tried and tested method?
Thanks
:)
I just know a way for 2.7:
.DATA
Float1 REAL4 10.7
Floar2 REAL4 2.7
Float3 REAL4 1.0
.CODE
finit
fld Float1
fdiv Floar2
fstp Float3
FWAIT
Nick
PS Didn't tried and didn't tested. May be buggy!!! Use with extreme care! :)
FPU is one option..
Sticking to integers:
a * 1.8 = a * 9 / 5
a / 1.8 = a * 5 / 9
Although, depending what your numbers are, you might find better numbers for binary ops, e.g. shifts, to avoid mul and div.