perl 1.0 patch 1: Portability bugs and one possible SIGSEGV
[p5sagit/p5-mst-13.2.git] / t / op.exp
CommitLineData
8d063cd8 1#!./perl
2
3# $Header: op.exp,v 1.0 87/12/18 13:13:29 root Exp $
4
5print "1..6\n";
6
7# compile time evaluation
8
9$s = sqrt(2);
10if (substr($s,0,5) eq '1.414') {print "ok 1\n";} else {print "not ok 1\n";}
11
12$s = exp(1);
13if (substr($s,0,7) eq '2.71828') {print "ok 2\n";} else {print "not ok 2\n";}
14
15if (exp(log(1)) == 1) {print "ok 3\n";} else {print "not ok 3\n";}
16
17# run time evaluation
18
19$x1 = 1;
20$x2 = 2;
21$s = sqrt($x2);
22if (substr($s,0,5) eq '1.414') {print "ok 4\n";} else {print "not ok 4\n";}
23
24$s = exp($x1);
25if (substr($s,0,7) eq '2.71828') {print "ok 5\n";} else {print "not ok 5\n";}
26
27if (exp(log($x1)) == 1) {print "ok 6\n";} else {print "not ok 6\n";}