1. 03 Mar, 2017 1 commit
    • Paul Eggert's avatar
      logb now works correctly on large integers · 74f87fd1
      Paul Eggert authored
      * admin/merge-gnulib (GNULIB_MODULES): Add count-leading-zeros.
      * etc/NEWS: Document the change.
      * lib/count-leading-zeros.c, lib/count-leading-zeros.h:
      * m4/count-leading-zeros.m4: New files, copied from Gnulib.
      * lib/gnulib.mk, m4/gnulib-comp.m4: Regenerate.
      * src/floatfns.c: Include count-leading-zeros.h.
      (Flogb): Do not convert fixnum to float before taking the log,
      as the rounding error can cause the answer to be off by 1.
      * src/lisp.h (EMACS_UINT_WIDTH): New constant.
      * test/src/floatfns-tests.el (logb-extreme-fixnum): New test.