#!/usr/bin/env perl use utf8; ############################################################################### # This program demonstrates floating point overflow. # # Copyright © 2020 Richard Lesh. All rights reserved. ############################################################################### use strict; use warnings; MAIN: { binmode(STDOUT, ":utf8"); binmode(STDERR, ":utf8"); binmode(STDIN, ":utf8"); my $large_float = 1e308; print "Larg float: ", $large_float, "\n"; $large_float *= 2.; print "Larger float: ", $large_float, "\n"; $large_float *= 2.; print "Largest float: ", $large_float, "\n"; }