Skip to content

Instantly share code, notes, and snippets.

@tomcha
Created November 22, 2018 02:10
Show Gist options
  • Save tomcha/ce588fecc5b13389e27e391f08740b6e to your computer and use it in GitHub Desktop.
Save tomcha/ce588fecc5b13389e27e391f08740b6e to your computer and use it in GitHub Desktop.
Perlでの小数計算
#!/usr/bin/env perl
use strict;
use warnings;
my $f = 0.0;
my $i = 0;
for (1..10000){
$f += 0.0001;
$i += 1;
}
print "$f\n";
print "$i\n";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment