void writeRepeatedSqr(DD xdd){
  if (xdd.ge(DD.valueOf(1)))   throw new IllegalArgumentException("Argument must be < 1");
  int count=0;
  while (xdd.doubleValue() > 1e-300) {
    count++;
    if (count == 100)     count=count;
    double x=xdd.doubleValue();
    DD xSqr=xdd.sqr();
    String s=xSqr.toString();
    DD xSqr2=DD.parse(s);
    xdd=xSqr;
  }
}

void writeRepeatedSqr ( DD xdd ) { if ( xdd . ge ( DD . valueOf ( 1 ) ) ) throw new IllegalArgumentException ( "Argument must be < 1" ) ; int count = 0 ; while ( xdd . doubleValue ( ) > 1e-300 ) { count ++ ; if ( count == 100 ) count = count ; double x = xdd . doubleValue ( ) ; DD xSqr = xdd . sqr ( ) ; String s = xSqr . toString ( ) ; DD xSqr2 = DD . parse ( s ) ; xdd = xSqr ; } }
this routine simply tests for robustness of the tostring function .
