RE: Writing 64-bit numbers to memory
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> Feb 06, 2003
- 414 views
> From: Jonas Temple [mailto:jktemple at yhti.net] > All, > > I know how to get a 64-bit number: > > peek4u(mem) + (peek4u(mem+4) * power(2,32)) > > But how do you put a 64-bit number? This should work: a = peek4u(mem) + (peek4u(mem+4) * power(2,32)) poke4( mem, a ) poke4( mem + 4, floor(a * power( 2, -32 )) ) Of course, if your number is bigger than 2^52, you'll lose precision, since that's how big the mantissa is for 64-bit fp numbers. Matt Lewis