jdk/src/share/classes/sun/misc/FloatingDecimal.java
changeset 4052 0464046ac1f9
parent 2170 f4454a8d22de
child 5506 202f599c92aa
equal deleted inserted replaced
4051:d5cdbf6529a9 4052:0464046ac1f9
   728                  * HACK! Java spec sez that we always have at least
   728                  * HACK! Java spec sez that we always have at least
   729                  * one digit after the . in either F- or E-form output.
   729                  * one digit after the . in either F- or E-form output.
   730                  * Thus we will need more than one digit if we're using
   730                  * Thus we will need more than one digit if we're using
   731                  * E-form
   731                  * E-form
   732                  */
   732                  */
   733                 if ( decExp <= -3 || decExp >= 8 ){
   733                 if ( decExp < -3 || decExp >= 8 ){
   734                     high = low = false;
   734                     high = low = false;
   735                 }
   735                 }
   736                 while( ! low && ! high ){
   736                 while( ! low && ! high ){
   737                     q = b / s;
   737                     q = b / s;
   738                     b = 10 * ( b % s );
   738                     b = 10 * ( b % s );
   781                  * HACK! Java spec sez that we always have at least
   781                  * HACK! Java spec sez that we always have at least
   782                  * one digit after the . in either F- or E-form output.
   782                  * one digit after the . in either F- or E-form output.
   783                  * Thus we will need more than one digit if we're using
   783                  * Thus we will need more than one digit if we're using
   784                  * E-form
   784                  * E-form
   785                  */
   785                  */
   786                 if ( decExp <= -3 || decExp >= 8 ){
   786                 if ( decExp < -3 || decExp >= 8 ){
   787                     high = low = false;
   787                     high = low = false;
   788                 }
   788                 }
   789                 while( ! low && ! high ){
   789                 while( ! low && ! high ){
   790                     q = (int) ( b / s );
   790                     q = (int) ( b / s );
   791                     b = 10 * ( b % s );
   791                     b = 10 * ( b % s );
   845              * HACK! Java spec sez that we always have at least
   845              * HACK! Java spec sez that we always have at least
   846              * one digit after the . in either F- or E-form output.
   846              * one digit after the . in either F- or E-form output.
   847              * Thus we will need more than one digit if we're using
   847              * Thus we will need more than one digit if we're using
   848              * E-form
   848              * E-form
   849              */
   849              */
   850             if ( decExp <= -3 || decExp >= 8 ){
   850             if ( decExp < -3 || decExp >= 8 ){
   851                 high = low = false;
   851                 high = low = false;
   852             }
   852             }
   853             while( ! low && ! high ){
   853             while( ! low && ! high ){
   854                 q = Bval.quoRemIteration( Sval );
   854                 q = Bval.quoRemIteration( Sval );
   855                 Mval = Mval.mult( 10 );
   855                 Mval = Mval.mult( 10 );