|
- Author:
- Don Clugston (IP: 195.243.104.114)
- Timestamp:
- 08/25/08 09:51:46 (16 years ago)
- Comment:
Basic docs for BigInt?
Legend:
- Unmodified
- Added
- Removed
- Modified
-
ChapterMath
v33 |
v34 |
|
218 | 218 | |
---|
219 | 219 | '''Never''' store a pointer as an integer payload inside a NaN. The garbage collector will not be able to find it! |
---|
| 220 | |
---|
| 221 | [[docs(math.BigInt,tango.math.BigInt.html,h2)]] |
---|
| 222 | |
---|
| 223 | The built-in integral types are have inadequate precision for certain applications, such as high-precision mathematics and cryptography. Tango provides arbitrary-precision arithmetic using the BigInt type, which is capable of performing calculations with thousands of digits of precision. Generally speaking, BigInt can be used as a drop-in replacement for {{{int}}} or {{{long}}}. |
---|
| 224 | To achieve this, BigInt uses value semantics, implemented in D1.0 using Copy-on-Write. Unfortunately, this results in the creation of many temporary heap objects (a problem which will not occur in D2.0). |
---|
| 225 | |
---|
| 226 | BigInt is intended to provide excellent performance for small to moderate numbers of digits (up to a few thousand decimal digits). Highly optimised assembly routines are used for the most widely-used processors. |
---|
| 227 | For extremely large numbers, or for relatively obscure processors, consider using GMP (http://www.gmplib.org/). |
---|
220 | 228 | |
---|
221 | 229 | [[docs(math.Bracket,tango.math.Bracket.html,h2)]] |
|
|
|
|
|
Copyright © 2006-2024 Tango. All Rights Reserved. | Page Width:
Static or
Dynamic