diff options
author | Ulrich Drepper <drepper@redhat.com> | 1997-05-07 15:31:21 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 1997-05-07 15:31:21 +0000 |
commit | 51702635af8445431054291c86aaace7c30b0970 (patch) | |
tree | e9cc4d28c401bd6046f71f62d186865d37c0141f /sysdeps/m68k/fpu/e_pow.c | |
parent | 1f07e6177553845817af5f7c90f148edd2e59d32 (diff) | |
download | glibc-51702635af8445431054291c86aaace7c30b0970.tar.gz glibc-51702635af8445431054291c86aaace7c30b0970.tar.xz glibc-51702635af8445431054291c86aaace7c30b0970.zip |
Update. cvs/libc-ud-970507
* locale/categories.def: Change type of _NL_CTYPE_CLASS_NAMES and _NL_CTYPE_MAP_NAMES field to stringlist. Change name of _NL_CTYPE_CODESET_NAME to "charmap". * locale/localeinfo.h (enum value_type): Add stringlist. * locale/programs/locale.c (show_info): Handle stringlist. * locale/programs/charmap.c (charmap_read): If charmap file is not using the given name try to find it by looking through all available charmap files and compare the code set name. * locale/programs/locale.c (write_charmaps): Also print names of charset in <code_set_name> fields in the files. * elf/ldd.bash.in: Correct translatable strings. * posix/TESTS: Add some more tests for character class matching. * posix/regex.c: Merge with GNU awk version. (regex_compile): Use ISO C/amend 1 functions for character class handling. * posix/regex.h: Merge with GNU awk version. * posix/getopt.c: Declare as master copies. * posix/getopt1.c: Likewise. * posix/getopt.h: Likewise. * sysdeps/unix/sysv/linux/sys/mount.h: Add definitions for option value to mount functions. Patch by a sun <asun@zoology.washington.edu>. * stdio-common/bug4.c (main): Use /tmp/bug4.test for concurrency with other tests. * sunrpc/svc_run.c (svc_exit): New, defined. (svc_run): Test for svc_stop variable. * sysdeps/m68k/s_cexp.c: Rewritten. * sysdeps/m68k/s_cexpf.c: Likewise. * sysdeps/m68k/s_cexpl.c: Likewise.
Diffstat (limited to 'sysdeps/m68k/fpu/e_pow.c')
-rw-r--r-- | sysdeps/m68k/fpu/e_pow.c | 32 |
1 files changed, 18 insertions, 14 deletions
diff --git a/sysdeps/m68k/fpu/e_pow.c b/sysdeps/m68k/fpu/e_pow.c index a39b63d342..b3d151fadc 100644 --- a/sysdeps/m68k/fpu/e_pow.c +++ b/sysdeps/m68k/fpu/e_pow.c @@ -36,29 +36,33 @@ s(__ieee754_pow) (float_type x, float_type y) { float_type z; float_type ax; + unsigned long x_cond, y_cond; - if (y == 0.0) + y_cond = __m81_test (y); + if (y_cond & __M81_COND_ZERO) return 1.0; - if (x != x || y != y) + + x_cond = __m81_test (x); + if ((x_cond | y_cond) & __M81_COND_NAN) return x + y; - if (m81(__isinf) (y)) + if (y_cond & __M81_COND_INF) { ax = s(fabs) (x); if (ax == 1) - return 0.0/0.0; + return y - y; if (ax > 1) - return y > 0 ? y : 0; + return y_cond & __M81_COND_NEG ? 0 : y; else - return y < 0 ? -y : 0; + return y_cond & __M81_COND_NEG ? -y : 0; } if (s(fabs) (y) == 1) - return y > 0 ? x : 1 / x; + return y_cond & __M81_COND_NEG ? 1 / x : x; if (y == 2) return x * x; - if (y == 0.5 && x >= 0) + if (y == 0.5 && !(x_cond & __M81_COND_NEG)) return m81(__ieee754_sqrt) (x); if (x == 10.0) @@ -73,17 +77,17 @@ s(__ieee754_pow) (float_type x, float_type y) } ax = s(fabs) (x); - if (m81(__isinf) (x) || x == 0 || ax == 1) + if (x_cond & (__M81_COND_INF | __M81_COND_ZERO) || ax == 1) { z = ax; - if (y < 0) + if (y_cond & __M81_COND_NEG) z = 1 / z; - if (m81(__signbit) (x)) + if (x_cond & __M81_COND_NEG) { if (y != m81(__rint) (y)) { if (x == -1) - z = 0.0/0.0; + z = (z - z) / (z - z); } else goto maybe_negate; @@ -91,7 +95,7 @@ s(__ieee754_pow) (float_type x, float_type y) return z; } - if (x < 0.0) + if (x_cond & __M81_COND_NEG) { if (y == m81(__rint) (y)) { @@ -112,7 +116,7 @@ s(__ieee754_pow) (float_type x, float_type y) } } else - z = 0.0/0.0; + z = (y - y) / (y - y); } else z = m81(__ieee754_exp) (y * m81(__ieee754_log) (x)); |