At 8:52 PM +0800 10/21/09, Majian wrote:
Hi, all ;I want to print this sentence " The number in scientific notation is 1.255000e+02". So I write a perl script like this : #!/usr/bin/perl sprintf "The number in scientific notation is %e", 1.255; But the screen output is "The number in scientific notation is 1.255000e+00"
I don't get anything when I execute that line. You must have used the printf function in your actual code.
1.255000e+00 is the correct scientific representation of the number 1.255. If you want to print 1.255000e+02, then you should print the number 125.5.
-- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected] http://learn.perl.org/
