]> git.eshelyaron.com Git - emacs.git/commit
Calc: simplify integer log2 and power of 2
authorMattias Engdegård <mattiase@acm.org>
Mon, 7 Dec 2020 09:15:59 +0000 (10:15 +0100)
committerMattias Engdegård <mattiase@acm.org>
Mon, 7 Dec 2020 12:18:00 +0000 (13:18 +0100)
commitd6d871a1a266421f1c47df57bde5b0da54dfe352
tree5224be7713ad8aef248c884f5dc842672320abd9
parent5d04ee50853adbcb45c5f7bc980ee06a7eb23e5e
Calc: simplify integer log2 and power of 2

We have bignums and fast primitives now; no caches are needed.

* lisp/calc/calc-bin.el (math-power-of-2-cache)
(math-big-power-of-2-cache): Remove.
(math-power-of-2, math-integer-log2): Simplify.
(calcFunc-ash): Don't call math-power-of-2 with negative argument.
lisp/calc/calc-bin.el