[AccessD] Weekend fun: Primes

Josh McFarlane darsant at gmail.com
Sat Dec 10 10:07:57 CST 2005


On 12/9/05, stuart at lexacorp.com.pg <stuart at lexacorp.com
> They are not floats, they are scaled integers.  They are stored and manipulated in
> integer format.
>
> Decimals are stored as 96-bit (12-byte) signed integers scaled by a variable power of
> 10. The power of 10 scaling factor specifies the number of digits to the right of
> the decimal point, and ranges from 0 to 28
>
> Currency variables are stored as 64-bit (8-byte) numbers in an integer format,
> scaled by 10,000 to give a fixed-point number with 15 digits to the left of the
> decimal point and 4 digits to the right

Oooooo! So that's how it works. Sorry, I just figured Microsoft was
trying to pull a fast one and call them ints and then use floating
points. That's a nifty trick.

> So does PowerBASIC - "Quad-integers are 64-bit (8 byte) signed integers (twice as
> many bits as Long integers) with a range of -9.22x10^18 to 9.22x10^18  ( -2^63 to
> 2^63 -1)."

I'm still worried about the day that I have to use a long long in code
as a counter. That'll be a fun load of data to deal with.

--
Josh McFarlane

"Peace cannot be kept by force. It can only be achieved by understanding."
-Albert Einstein



More information about the AccessD mailing list