diff options
Diffstat (limited to 'lisp/calc/calc-bin.el')
-rw-r--r-- | lisp/calc/calc-bin.el | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lisp/calc/calc-bin.el b/lisp/calc/calc-bin.el index e9083b84c61..aa10d55e52c 100644 --- a/lisp/calc/calc-bin.el +++ b/lisp/calc/calc-bin.el @@ -126,8 +126,8 @@ (defun calc-word-size (n) (interactive "P") (calc-wrapper - (or n (setq n (read-string (format "Binary word size: (default %d) " - calc-word-size)))) + (or n (setq n (read-string (format-prompt "Binary word size" + calc-word-size)))) (setq n (if (stringp n) (if (equal n "") calc-word-size @@ -403,7 +403,7 @@ (setq a (math-clip a w))) (let ((two-to-sizem1 (math-power-of-2 (1- w))) (sh (calcFunc-lsh a n w))) - (cond ((Math-natnum-lessp a two-to-sizem1) + (cond ((zerop (logand a two-to-sizem1)) sh) ((Math-lessp n (- 1 w)) (math-add (math-mul two-to-sizem1 2) -1)) |