From 8909e00b57874e5858a210bc3a7e9e56e10eda35 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Fri, 18 Dec 2020 11:57:48 +0200 Subject: Inf and NaN values fixed and printing improved. "This time for sure!" --- bugs-fixed/inf-nan-torture.awk | 4 ++++ bugs-fixed/inf-nan-torture.in | 1 + bugs-fixed/inf-nan-torture.ok | 16 ++++++++++++++++ 3 files changed, 21 insertions(+) create mode 100644 bugs-fixed/inf-nan-torture.awk create mode 100644 bugs-fixed/inf-nan-torture.in create mode 100644 bugs-fixed/inf-nan-torture.ok (limited to 'bugs-fixed') diff --git a/bugs-fixed/inf-nan-torture.awk b/bugs-fixed/inf-nan-torture.awk new file mode 100644 index 0000000..8d145f2 --- /dev/null +++ b/bugs-fixed/inf-nan-torture.awk @@ -0,0 +1,4 @@ +{ + for (i = 1; i <= NF; i++) + print i, $i, $i + 0 +} diff --git a/bugs-fixed/inf-nan-torture.in b/bugs-fixed/inf-nan-torture.in new file mode 100644 index 0000000..45dfdc8 --- /dev/null +++ b/bugs-fixed/inf-nan-torture.in @@ -0,0 +1 @@ +-inf -inform inform -nan -nancy nancy -123 0 123 +123 nancy +nancy +nan inform +inform +inf diff --git a/bugs-fixed/inf-nan-torture.ok b/bugs-fixed/inf-nan-torture.ok new file mode 100644 index 0000000..40d3194 --- /dev/null +++ b/bugs-fixed/inf-nan-torture.ok @@ -0,0 +1,16 @@ +1 -inf -inf +2 -inform 0 +3 inform 0 +4 -nan -nan +5 -nancy 0 +6 nancy 0 +7 -123 -123 +8 0 0 +9 123 123 +10 +123 123 +11 nancy 0 +12 +nancy 0 +13 +nan +nan +14 inform 0 +15 +inform 0 +16 +inf +inf -- cgit v1.2.3