1. RE: Writing 64-bit numbers to memory

> 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

new topic     » topic index » view message » categorize

2. RE: Writing 64-bit numbers to memory

In addition to the other posts...

It helps to know exactly what you are intending to use these
64 bit numbers for too.

Take care,
Al

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu