Problem dividing decimal
Hi
I'm trying to divide a decimal number and it just doesnt give the correct answer...
This is what I have:
IF (SEQU=2)THEN
· COUNTER=DEG/(15/4)
ELSE
· COUNTER=DEG/(15/2)
ENDIF
I'm trying to divide the variable DEG with 3.75, first of all, it won't let me divide it by 3.75, so I tried dividing it by (15/4) and still doesnt work, so what I did is:
COUNTER=DEG*/68 and still wont get the right answer........I· had 68 because, 1/3.75 = .26666 and that multiplied by 256 gives 68.
Anyone?
Thx
I'm trying to divide a decimal number and it just doesnt give the correct answer...
This is what I have:
IF (SEQU=2)THEN
· COUNTER=DEG/(15/4)
ELSE
· COUNTER=DEG/(15/2)
ENDIF
I'm trying to divide the variable DEG with 3.75, first of all, it won't let me divide it by 3.75, so I tried dividing it by (15/4) and still doesnt work, so what I did is:
COUNTER=DEG*/68 and still wont get the right answer........I· had 68 because, 1/3.75 = .26666 and that multiplied by 256 gives 68.
Anyone?
Thx

Comments
Let's take 70 degrees.·
a = (70*100)*/$0044 = 1859
DEBUG dec a/100, ".", dec2 a, cr
This will display 18.59.· This is an error of· .3 percent.· Close enough?
Sid
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Sid Weaver
Need a TV Module?
Newzed@aol.com
·