1919//! inputs, but we don't do so to avoid the code bloat. Each bignum is still
2020//! tracked for the actual usages, so it normally doesn't matter.
2121
22+ // This module is only for dec2flt and flt2dec, and only public because of libcoretest.
23+ // It is not intended to ever be stabilized.
24+ #![ doc( hidden) ]
25+ #![ unstable( feature = "core_private_bignum" ,
26+ reason = "internal routines only exposed for testing" ,
27+ issue = "0" ) ]
2228#![ macro_use]
2329
2430use prelude:: v1:: * ;
@@ -194,7 +200,7 @@ macro_rules! define_bignum {
194200 /// Adds `other` to itself and returns its own mutable reference.
195201 pub fn add<' a>( & ' a mut self , other: & $name) -> & ' a mut $name {
196202 use cmp;
197- use num:: flt2dec :: bignum:: FullOps ;
203+ use num:: bignum:: FullOps ;
198204
199205 let mut sz = cmp:: max( self . size, other. size) ;
200206 let mut carry = false ;
@@ -212,7 +218,7 @@ macro_rules! define_bignum {
212218 }
213219
214220 pub fn add_small( & mut self , other: $ty) -> & mut $name {
215- use num:: flt2dec :: bignum:: FullOps ;
221+ use num:: bignum:: FullOps ;
216222
217223 let ( mut carry, v) = self . base[ 0 ] . full_add( other, false ) ;
218224 self . base[ 0 ] = v;
@@ -232,7 +238,7 @@ macro_rules! define_bignum {
232238 /// Subtracts `other` from itself and returns its own mutable reference.
233239 pub fn sub<' a>( & ' a mut self , other: & $name) -> & ' a mut $name {
234240 use cmp;
235- use num:: flt2dec :: bignum:: FullOps ;
241+ use num:: bignum:: FullOps ;
236242
237243 let sz = cmp:: max( self . size, other. size) ;
238244 let mut noborrow = true ;
@@ -249,7 +255,7 @@ macro_rules! define_bignum {
249255 /// Multiplies itself by a digit-sized `other` and returns its own
250256 /// mutable reference.
251257 pub fn mul_small( & mut self , other: $ty) -> & mut $name {
252- use num:: flt2dec :: bignum:: FullOps ;
258+ use num:: bignum:: FullOps ;
253259
254260 let mut sz = self . size;
255261 let mut carry = 0 ;
@@ -310,7 +316,7 @@ macro_rules! define_bignum {
310316 /// Multiplies itself by `5^e` and returns its own mutable reference.
311317 pub fn mul_pow5( & mut self , mut e: usize ) -> & mut $name {
312318 use mem;
313- use num:: flt2dec :: bignum:: SMALL_POW5 ;
319+ use num:: bignum:: SMALL_POW5 ;
314320
315321 // There are exactly n trailing zeros on 2^n, and the only relevant digit sizes
316322 // are consecutive powers of two, so this is well suited index for the table.
@@ -341,7 +347,7 @@ macro_rules! define_bignum {
341347 pub fn mul_digits<' a>( & ' a mut self , other: & [ $ty] ) -> & ' a mut $name {
342348 // the internal routine. works best when aa.len() <= bb.len().
343349 fn mul_inner( ret: & mut [ $ty; $n] , aa: & [ $ty] , bb: & [ $ty] ) -> usize {
344- use num:: flt2dec :: bignum:: FullOps ;
350+ use num:: bignum:: FullOps ;
345351
346352 let mut retsz = 0 ;
347353 for ( i, & a) in aa. iter( ) . enumerate( ) {
@@ -378,7 +384,7 @@ macro_rules! define_bignum {
378384 /// Divides itself by a digit-sized `other` and returns its own
379385 /// mutable reference *and* the remainder.
380386 pub fn div_rem_small( & mut self , other: $ty) -> ( & mut $name, $ty) {
381- use num:: flt2dec :: bignum:: FullOps ;
387+ use num:: bignum:: FullOps ;
382388
383389 assert!( other > 0 ) ;
384390
0 commit comments