System.out.println( "length: " + i + " precision: " + d.precision( i ) );
System.out.println( "length: " + i + " scientific precision: "
+ d.scientificPrecision( i ) );
}
*/
Complex c = new Complex( 4, 5 );
Format f = new Format( c, Base.DECIMAL );
System.out.println( "--------------------" );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 0, 1 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 1, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 0.002, -1 );
f = new Format( c, Base.DECIMAL );
System.out.println( "--------------------" );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( -1, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( -12, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 123, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 1234, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 5, 20, true, true ) );
c = new Complex( 12345, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 123456, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 12345678, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 123456789, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567891.0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 12345678912.0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 123456789123.0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567891234.0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 12345678912345.0, 0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234.0, -4321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234.0, -4321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 12345.0, -54321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 123456.0, -654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567.0, -7654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 12345678.0, -87654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 123456789.0, -987654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 234567891.0, -1987654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567891.0, -987654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
c = new Complex( 1234567891.0, -1987654321.0 );
f = new Format( c, Base.DECIMAL );
System.out.println( f.formatStandard( Base.DECIMAL, 9, 20, true, true ) );
}