Integer Maths in Spin
Robiom
Posts: 9
Sorry for such a lame question but I cannot find the answer in the manual!
I have an equation in Spin and need to know if the answer is an integer. I think it will be but what do you guys think.
Code is:· datarate := (500_000_000/(command[noparse][[/noparse]3] * 10416))
Variables datarate·and command[noparse][[/noparse]3] are longs
Thanks for your help
I have an equation in Spin and need to know if the answer is an integer. I think it will be but what do you guys think.
Code is:· datarate := (500_000_000/(command[noparse][[/noparse]3] * 10416))
Variables datarate·and command[noparse][[/noparse]3] are longs
Thanks for your help
Comments
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Visit some of my articles at Propeller Wiki:
MATH on the propeller propeller.wikispaces.com/MATH
pPropQL: propeller.wikispaces.com/pPropQL
pPropQL020: propeller.wikispaces.com/pPropQL020
OMU for the pPropQL/020 propeller.wikispaces.com/OMU
pPropellerSim - A propeller simulator for ASM development sourceforge.net/projects/ppropellersim