#!perl
use bignum;
# This is Stirling's approximation for log(n!), but
# without the "-n" piece that cancels out below in any
# case.
sub xe{
$_[0]*log($_[0])+log(atan2(1,1)*8*$_[0])/2
+ 1/(12*$_[0]) - 1/(360*($_[0]**3)) + 1/(1260*($_[0]**5));
}
if (!@ARGV) {
@ARGV = qw{ 2**96 3*(10**6) 1*(10**6) };
}
my($m,$n,$r)=map {eval "use bignum;$_"}@ARGV;
my $e=exp(xe($m-$n)+xe($m-$r)-xe($m)-xe($m-$n-$r));
printf "%3.5g %3.5g %3.5g\n",$e,1-$e,(1-"$e");
####
use bignum;
$e = exp(2 ** (-128));
use Data::Dumper;
print Dumper($e);
print $e,"\n",1-$e,"\n";
##
##
@/=map{[/./g]}qw/.h_nJ Xapou cets krht ele_ r_ra/;
map{y/X_/\n /;print}map{pop@$_}@/for@/