Mercurial > emacs
comparison lisp/calc/calc-bin.el @ 106068:c3e7e20da11d
(math-symclip, calcFunc-symclip, calc-symclip): Remove.
author | Jay Belanger <jay.p.belanger@gmail.com> |
---|---|
date | Mon, 16 Nov 2009 23:29:20 +0000 |
parents | 9ddf1eafde9a |
children | 0e720bab47c6 |
comparison
equal
deleted
inserted
replaced
106067:f5ddc2cbc74b | 106068:c3e7e20da11d |
---|---|
848 (concat | 848 (concat |
849 (number-to-string calc-number-radix) | 849 (number-to-string calc-number-radix) |
850 "##" | 850 "##" |
851 num))) | 851 num))) |
852 | 852 |
853 (defun math-symclip (a) | |
854 "Reduce A to between -2^(w-1) and 2^(w-1)-1." | |
855 (if (not (Math-num-integerp a)) | |
856 (math-reject-arg a 'integerp) | |
857 (if (and (Math-lessp a math-half-2-word-size) | |
858 (let | |
859 ((comparison (math-compare (Math-integer-neg a) math-half-2-word-size))) | |
860 (or (= comparison 0) | |
861 (= comparison -1)))) | |
862 a | |
863 (let ((smalla (math-clip a))) | |
864 (if (Math-lessp smalla math-half-2-word-size) | |
865 smalla | |
866 (math-sub smalla math-2-word-size)))))) | |
867 | |
868 (defalias 'calcFunc-symclip 'math-symclip) | |
869 | |
870 (defun calc-symclip (n) | |
871 "Reduce N to between -2^(w-1) and 2^(w-1)-1." | |
872 (interactive "P") | |
873 (calc-slow-wrapper | |
874 (calc-enter-result 1 "sclp" | |
875 (append '(calcFunc-symclip) | |
876 (calc-top-list-n 1) | |
877 (and n (list (prefix-numeric-value n))))))) | |
878 | |
879 | |
880 (provide 'calc-bin) | 853 (provide 'calc-bin) |
881 | 854 |
882 ;; arch-tag: f6dba7bc-53b2-41ae-919c-c266ab0ca8b3 | 855 ;; arch-tag: f6dba7bc-53b2-41ae-919c-c266ab0ca8b3 |
883 ;;; calc-bin.el ends here | 856 ;;; calc-bin.el ends here |