//! Custom arbitrary-precision number (bignum) implementation.
//!
//! This is designed to avoid the heap allocation at expense of stack memory.
-//! The most used bignum type, `Big32x36`, is limited by 32 × 36 = 1,152 bits
-//! and will take at most 152 bytes of stack memory. This is (barely) enough
-//! for handling all possible finite `f64` values.
+//! The most used bignum type, `Big32x40`, is limited by 32 × 40 = 1,280 bits
+//! and will take at most 160 bytes of stack memory. This is more than enough
+//! for formatting and parsing all possible finite `f64` values.
//!
//! In principle it is possible to have multiple bignum types for different
//! inputs, but we don't do so to avoid the code bloat. Each bignum is still
)
}
-/// The digit type for `Big32x36`.
+/// The digit type for `Big32x40`.
pub type Digit32 = u32;
-define_bignum!(Big32x36: type=Digit32, n=36);
+define_bignum!(Big32x40: type=Digit32, n=40);
// this one is used for testing only.
#[doc(hidden)]
use num::flt2dec::{Decoded, MAX_SIG_DIGITS, round_up};
use num::flt2dec::estimator::estimate_scaling_factor;
use num::flt2dec::bignum::Digit32 as Digit;
-use num::flt2dec::bignum::Big32x36 as Big;
+use num::flt2dec::bignum::Big32x40 as Big;
static POW10: [Digit; 10] = [1, 10, 100, 1000, 10000, 100000,
1000000, 10000000, 100000000, 1000000000];
use std::{i16, f64};
use super::super::*;
use core::num::flt2dec::*;
-use core::num::flt2dec::bignum::Big32x36 as Big;
+use core::num::flt2dec::bignum::Big32x40 as Big;
use core::num::flt2dec::strategy::dragon::*;
#[test]