Douglas Pearson wrote:
Can someone clarify whether Number is actually just a simple wrapper round a
double precision floating point value?
Is this a problem with Flash? If so, any solutions?
Internally, it's a 32-bit single precision float and doesn't play well
if you need arbitrary precision integer manipulations. You can see the
link that Mick recommended for a longer discussion of this from Adobe.
This is a fairly common problem across many programming languages. As
such, most developers needing such functionality (e.g. for financial,
scientific or cryptographic usages) resort to libraries providing for
arbitrary precision integer storage and operations.
While I don't know of any ActionScript specific libraries for this,
there are several that have been written for Javascript and shouldn't be
too difficult to port if you're so inclined. Among others, see:
http://www.leemon.com/crypto/BigInt.html
http://www-cs-students.stanford.edu/~tjw/jsbn/
Jim Cheng
effectiveUI
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com