programming-examples/perl/Datatype/A program that displays various floating-point scalar values.pl

15 lines
436 B
Perl
Raw Normal View History

2019-11-15 12:59:38 +01:00
#!/usr/local/bin/perl
$value = 34.0;
print ("first value is ", $value, "\n");
$value = 114.6e-01;
print ("second value is ", $value, "\n");
$value = 123.263e+19;
print ("third value is ", $value, "\n");
$value = 123456789000000000000000000000;
print ("fourth value is ", $value, "\n");
$value = 1.23e+999;
print ("fifth value is ", $value, "\n");
$value = 1.23e-999;
print ("sixth value is ", $value, "\n");