⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bigexp.t

📁 source of perl for linux application,
💻 T
字号:
#!/usr/bin/perl -w################################################################################ test for bug #18025: bignum/bigrat can lead to a number that is both 1 and 0use Test::More;use strict;BEGIN  {  $| = 1;  chdir 't' if -d 't';  unshift @INC, '../lib';  plan tests => 4;  }use bignum;my $lnev = -7 / (10**17);my $ev=exp($lnev);is( sprintf('%0.5f',$ev) , '1.00000', '($ev) is approx. 1' );is( sprintf('%0.5f',1-$ev) , '0.00000', '(1-$ev) is approx. 0' );is( sprintf('%0.5f',1-"$ev") , '0.00000', '(1-"$ev") is approx. 0' );cmp_ok( $ev, '!=', 0, '$ev should not equal 0');

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -