1. Poking decimals
- Posted by 1evan at sbcglobal.net Jun 25, 2003
- 440 views
How do you go about poking decimals into memory? I just need about 3 decimal places of precision.
2. Re: Poking decimals
- Posted by 1evan at sbcglobal.net Jun 26, 2003
- 430 views
Oh, duh. Thanks for your help, again. Brian Broker wrote: > > > Floating point representation? > use atom_to_float32() or atom_to_float64() > > -- Brian > > 1evan wrote: > >> >>How do you go about poking decimals into memory? I just need about 3 >>decimal places of precision. >> >> > > > TOPICA - Start your own email discussion group. FREE! > >
3. Re: Poking decimals
- Posted by jbrown105 at speedymail.org Jun 26, 2003
- 468 views
Using poke4(address, number*1000) and (peek4s(address)/1000) will get you a fixed precision of 3 decimal places, at the cost of reducing the whole number part of the decimal by the 3 uppermost decimal places that a 32bit number can represent ... you probably don't need to worry about this, and if you do then you are better off using 64bit floating point instead of fixed precision. jbrown 1evan wrote: >How do you go about poking decimals into memory? I just need about 3 >decimal places of precision. -- /"\ ASCII ribbon | http://www.geocities.com/jbrown1050/ \ / campain against | Linux User:190064 X HTML in e-mail and | Linux Machine:84163 /*\ news, and unneeded MIME | http://verify.stanford.edu/evote.html
4. Re: Poking decimals
- Posted by 1evan at sbcglobal.net Jun 26, 2003
- 445 views
That makes a heck of a lot of sense. I think my brain is on an extended vacation. The built-in atom_to_float32 works wonderfully, too. (Thanks Brian Broker) Thanks for the suggestion. I should probably go to bed now, but I'm having too much fun! jbrown105 at speedymail.org wrote: > > > Using poke4(address, number*1000) and (peek4s(address)/1000) will get you > a fixed precision of 3 decimal places, at the cost of reducing the whole > number part of the decimal by the 3 uppermost decimal places that a 32bit > number > can represent ... you probably don't need to worry about this, and if you do > then you are better off using 64bit floating point instead of fixed precision. > > jbrown > > 1evan wrote: > > >>How do you go about poking decimals into memory? I just need about 3 >>decimal places of precision. > >