mpPrint method
void
mpPrint(
- MPData val
Implementation
void mpPrint( MPData val ){
MultiPrec mp = ClipProc.procMultiPrec();
int p = mp.getPrec( val );
int l = mp.getLen( val );
debugPrint( "len $l" );
if( p > 0 ){
debugPrint( "prec $p" );
}
if( val.val(0) < 0 ){
debugPrint( "minus" );
} else {
debugPrint( "plus" );
}
debugPrint( "data:" );
String data = "";
for( int i = 1; i <= l; i++ ){
if( i % 10 == 1 ){
if( i != 1 ) {
debugPrint(data);
data = "";
}
} else {
data += " ";
}
int k = ClipMath.pow( 10, MultiPrec.digit - 1 ).toInt();
for( int j = 0; j < MultiPrec.digit; j++ ){
data += "${(val.val(i) ~/ k) % 10}";
k = k ~/ 10;
}
}
debugPrint( data );
debugPrint( "value:" );
if( p == 0 ){
debugPrint( mp.num2str( val ) );
} else {
debugPrint( mp.fnum2str( val ) );
}
}