turugina #7765(2008/10/10 02:43 GMT) [ Perl ] Rating0/0=0.00
とりあえず、参考ページにあった数式で素直に計算。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
use strict; use warnings; use bignum; use List::Util qw/reduce/; use Memoize; sub fract { $_[0] == 0 || $_[0] == 1 ? 1 : $_[0] * fract($_[0]-1); } memoize(q/fract/); my $N = 32; print 6 * reduce { no warnings qw/once/; $a + $b } map { fract(2 * $_) / ((2 ** (4 * $_ + 1)) * (fract($_) ** 2) * (2 * $_ + 1)) } 0 .. $N;
Rating0/0=0.00-0+
1 reply [ reply ]
turugina
#7765()
[
Perl
]
Rating0/0=0.00
Rating0/0=0.00-0+
1 reply [ reply ]