This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
move Math-Big* from ./dist to ./cpan
[perl5.git] / cpan / Math-BigRat / t / hang.t
diff --git a/cpan/Math-BigRat/t/hang.t b/cpan/Math-BigRat/t/hang.t
new file mode 100644 (file)
index 0000000..b2b94a0
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/perl -w
+
+# test for bug #34584: hang in exp(1/2)
+
+use strict;
+use Test::More tests => 1;
+
+use Math::BigRat;
+
+my $result = Math::BigRat->new('1/2')->bexp();
+
+is ("$result", "9535900335500879457687887524133067574481/5783815921445270815783609372070483523265",
+    "exp(1/2) worked");
+
+##############################################################################
+# done
+
+1;