summaryrefslogtreecommitdiff
path: root/regress/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'regress/usr.bin')
-rw-r--r--regress/usr.bin/dc/Makefile5
-rw-r--r--regress/usr.bin/dc/t21.in64
-rw-r--r--regress/usr.bin/dc/t21.out8
3 files changed, 75 insertions, 2 deletions
diff --git a/regress/usr.bin/dc/Makefile b/regress/usr.bin/dc/Makefile
index 871b58f5529..65589ca2297 100644
--- a/regress/usr.bin/dc/Makefile
+++ b/regress/usr.bin/dc/Makefile
@@ -1,9 +1,9 @@
-# $OpenBSD: Makefile,v 1.11 2003/12/17 15:11:36 otto Exp $
+# $OpenBSD: Makefile,v 1.12 2004/10/19 07:39:36 otto Exp $
DC=dc -x
REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 \
- t18 t19 t20
+ t18 t19 t20 t21
# .in: input file
# .out: desired result
@@ -28,6 +28,7 @@ REGRESS_TARGETS=t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 t16 t17 \
# t18: read uninitialized and initialized array locations
# t19: test extended registers
# t20: towers of hanoi
+# t21: 500 decimals of pi
all: clean ${REGRESS_TARGET}
diff --git a/regress/usr.bin/dc/t21.in b/regress/usr.bin/dc/t21.in
new file mode 100644
index 00000000000..ee95a9ca943
--- /dev/null
+++ b/regress/usr.bin/dc/t21.in
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+ 20k
+[ 0lx-sx 1sw]s0
+[lx 2/sxly 1+sylx 2<1]s1
+[lglg*sglyd1-sy 0!=4]s4
+[ 1lg/Lxs.Las.Lbs.Lcs.Lds.Les.Lgs.Lts.Lws.Lys. 4Q]s5
+[lg 1/sglyd1-sy 0!=4 ltklw 1=5 lg 1/Lxs.Las.Lbs.Lcs.Lds.Les.Lgs.Lts.Lws.Lys. 3Q]s3
+[lblx*sblcla*lb+scldla*sdlcld/sglgle=3 lgselad1+sas. 1 1=2]s2
+[0Sy0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ps.
+q \ No newline at end of file
diff --git a/regress/usr.bin/dc/t21.out b/regress/usr.bin/dc/t21.out
new file mode 100644
index 00000000000..8cc2012e640
--- /dev/null
+++ b/regress/usr.bin/dc/t21.out
@@ -0,0 +1,8 @@
+3.1415926535897932384626433832795028841971693993751058209749445923078\
+164062862089986280348253421170679821480865132823066470938446095505822\
+317253594081284811174502841027019385211055596446229489549303819644288\
+109756659334461284756482337867831652712019091456485669234603486104543\
+266482133936072602491412737245870066063155881748815209209628292540917\
+153643678925903600113305305488204665213841469519415116094330572703657\
+595919530921861173819326117931051185480744623799627495673518857527248\
+9122793818301194912