diff options
author | john haque <j.eh@mchsi.com> | 2012-03-07 07:35:18 -0600 |
---|---|---|
committer | john haque <j.eh@mchsi.com> | 2012-03-07 07:35:18 -0600 |
commit | b5431a4825e325c61f4043e4d25e47d7891c228c (patch) | |
tree | 506dd7e7636f292b24e6bc81a81678762b9bf3e6 /test/mpfrrnd.awk | |
parent | 473623f186c3699c8886ccdd8a2afb7f4fe7a07e (diff) | |
download | egawk-b5431a4825e325c61f4043e4d25e47d7891c228c.tar.gz egawk-b5431a4825e325c61f4043e4d25e47d7891c228c.tar.bz2 egawk-b5431a4825e325c61f4043e4d25e47d7891c228c.zip |
Bug fixes and tests for MPFR.
Diffstat (limited to 'test/mpfrrnd.awk')
-rw-r--r-- | test/mpfrrnd.awk | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/mpfrrnd.awk b/test/mpfrrnd.awk new file mode 100644 index 00000000..eafefb9f --- /dev/null +++ b/test/mpfrrnd.awk @@ -0,0 +1,15 @@ +BEGIN { + N = 22/7 + printf(" %.15f\n", N) + + printf("* %.10f\n", N) # default + RNDMODE="N"; printf("N %.10f\n", N) + RNDMODE="U"; printf("U %.10f\n", N) + RNDMODE="D"; printf("D %.10f\n", N) + RNDMODE="Z"; printf("Z %.10f\n", N) + N = -N + RNDMODE="N"; printf("N %.10f\n", N) + RNDMODE="U"; printf("U %.10f\n", N) + RNDMODE="D"; printf("D %.10f\n", N) + RNDMODE="Z"; printf("Z %.10f\n", N) +} |