floating point numbers
weg
Posts: 2
Hi all,
Using the BS2p, I need to take the sine and cosine of pretty precise numbers.· For example, I need to evaluate the sine(xx.xxxxx) to·4·or 5 decimal places.· I know the BS2p has no "formal" way of using floating point numbers nor do I want to purchase the 8-pin IC to work with floating point #s, so I was just wondering if someone knows of a solution to my problem (perhaps an include file or some sort of hack)?· Please don't make me resort·to a PIC (using PIC C).
Thanks in advance!
Using the BS2p, I need to take the sine and cosine of pretty precise numbers.· For example, I need to evaluate the sine(xx.xxxxx) to·4·or 5 decimal places.· I know the BS2p has no "formal" way of using floating point numbers nor do I want to purchase the 8-pin IC to work with floating point #s, so I was just wondering if someone knows of a solution to my problem (perhaps an include file or some sort of hack)?· Please don't make me resort·to a PIC (using PIC C).
Thanks in advance!
Comments
·· Try the following link.·· There might be some other information on the site which could help you as well.
http://www.emesys.com/BS2math4.htm
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
csavage@parallax.com
www.emesys.com/BS2mathC.htm
For 5 decimal places, that method would have to be extended to double precision, but the principle is the same.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Tracy Allen
www.emesystems.com