$ perl -Mstrict -wE 'my $avg = (1.0 + 3.0) / 2.; say sprintf("%E", $avg)' 2.000000E+00