[AccessD] Weekend fun: Primes

Susan Harkins harkinsss at bellsouth.net
Sat Dec 10 07:59:33 CST 2005


ARE THERE NO MONITORS AWAKE TO STOP THIS MADNESS!!!!!!!!!!!! ;) <jk>

<sorry>

Susan H. 

On 9 Dec 2005 at 18:17, Josh McFarlane wrote:

> On 12/9/05, stuart at lexacorp.com.pg <stuart at lexacorp.com.pg> wrote: > 
> You can use "scaled integers": > > Currency > - 8 bytes =
> -922,337,203,685,477.5808 to 922,337,203,685,477.5807 > or > Decimal >
> - 14 bytes =  +/-79,228,162,514,264,337,593,543,950,335 with no 
> decimal point
> 
> But then you enter the land of floating point calculations. 

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

> It was more out of curiosity though, as C++ has long long.

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)."


   

--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com

--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.371 / Virus Database: 267.13.13/197 - Release Date: 12/9/2005
 




More information about the AccessD mailing list