Help for this page

Select Code to Download


  1. or download this
    perl -le 'printf "%.18f", 10.1'
    10.099999999999999645
    
  2. or download this
        # Fix for Perl and sprintf not rounding up like Excel.
        # http://rt.cpan.org/Public/Bug/Display.html?id=45626
        if ( $data =~ /^${number_result}5/ ) {
    ...
                sprintf "%0${str_length}.${after_decimal}f",
                $data . '1';
        }