diff options
author | revol <revol@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-04-17 18:23:18 +0000 |
---|---|---|
committer | revol <revol@280ebfd0-de03-0410-8827-d642c229c3f4> | 2001-04-17 18:23:18 +0000 |
commit | 40a6f32b48c2a168a83b6551f1e5d81368c3f12a (patch) | |
tree | 071530daaa3a1e5470443f7e7b084b5f855e0688 | |
parent | f8cede30ac01239c919274c9fb2ca45bf8e8c911 (diff) | |
download | mpfr-40a6f32b48c2a168a83b6551f1e5d81368c3f12a.tar.gz |
Case where argument < 0 included, NR 17-04-2001
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1076 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r-- | log.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -64,6 +64,12 @@ mpfr_log (r, a, rnd_mode) return 1; } + /* If a is negative, the result is NaN */ + if (MPFR_ISNEG(a)) { + MPFR_SET_NAN(r); + return 1; + } + MPFR_CLEAR_NAN(r); /* check for infinity before zero */ |