2.11 三角関数を計算する
# 標準関数のみで実現 sub tan { my $theta = shift; return sin($theta) / cos($theta) } # POSIXを使用 use POSIX; $y = acos(3.7); # Math::Trigを使用 use Math::Trig; $y = acos(3.7);
# 標準関数のみで実現 sub tan { my $theta = shift; return sin($theta) / cos($theta) } # POSIXを使用 use POSIX; $y = acos(3.7); # Math::Trigを使用 use Math::Trig; $y = acos(3.7);