print "print an example of negative zero\n"; @range = (-0.0000001, -0.000001, -0.00001, -0.0001); foreach $example (@range) { $tret = sprintf("rounded float:%7.5f, other:%7.5e",$example,$example); print "The Number $example is represented as $tret\n"; } #### print an example of negative zero The Number -1e-07 is represented as rounded float:-0.00000, other:-1.00000e-07 The Number -1e-06 is represented as rounded float:-0.00000, other:-1.00000e-06 The Number -1e-05 is represented as rounded float:-0.00001, other:-1.00000e-05 The Number -0.0001 is represented as rounded float:-0.00010, other:-1.00000e-04