diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2018-07-13 13:59:40 +0300 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2018-07-13 13:59:40 +0300 |
commit | c8bcf55be11e29d5df00013d2a267ce0ca2ba4c6 (patch) | |
tree | 1b0021d8c9ff8bacf94249e7016496cb9a5173e9 /test/fix-fmtspcl.awk | |
parent | d5d9470814e516fd04dd5a0122e8e4e702c767d9 (diff) | |
parent | 52e6f76e7c0199cf5ae64e4b23698884cc245912 (diff) | |
download | egawk-c8bcf55be11e29d5df00013d2a267ce0ca2ba4c6.tar.gz egawk-c8bcf55be11e29d5df00013d2a267ce0ca2ba4c6.tar.bz2 egawk-c8bcf55be11e29d5df00013d2a267ce0ca2ba4c6.zip |
Merge branch 'master' into feature/fix-comments
Diffstat (limited to 'test/fix-fmtspcl.awk')
-rw-r--r-- | test/fix-fmtspcl.awk | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/test/fix-fmtspcl.awk b/test/fix-fmtspcl.awk new file mode 100644 index 00000000..018f519d --- /dev/null +++ b/test/fix-fmtspcl.awk @@ -0,0 +1,23 @@ +BEGIN { + pnan = sprintf("%g",sqrt(-1)) + nnan = sprintf("%g",-sqrt(-1)) + pinf = sprintf("%g",-log(0)) + ninf = sprintf("%g",log(0)) + + pnanu = toupper(pnan) + nnanu = toupper(nnan) + pinfu = toupper(pinf) + ninfu = toupper(ninf) +} +{ + sub(/positive_nan/, pnan) + sub(/negative_nan/, nnan) + sub(/positive_infinity/, pinf) + sub(/negative_infinity/, ninf) + sub(/POSITIVE_NAN/, pnanu) + sub(/NEGATIVE_NAN/, nnanu) + sub(/POSITIVE_INFINITY/, pinfu) + sub(/NEGATIVE_INFINITY/, ninfu) + sub(/fmtspcl/,(sd "/fmtspcl")) + print +} |