help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to calculate logic shift of large numbers?


From: Pascal Bourguignon
Subject: Re: How to calculate logic shift of large numbers?
Date: Fri, 20 Jan 2006 22:10:30 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (gnu/linux)

Zhang Wei <id.brep@gmail.com> writes:

> The following statement seems don't work due to the 29bit limit of
> emacs integers:
>
> (lsh #x112233445566778899aabbcccdd 4)

(defun cl-eval (text)
  (unless (inferior-lisp-proc)
     (inferior-lisp  "/usr/bin/clisp -ansi -I"))
  (comint-send-string (inferior-lisp-proc) (format "%s\n" text)))

(cl-eval " (ash #x112233445566778899aabbcccdd 4) ")

There is no large number in emacs lisp.
You could shift several small numbers, forwarding bits shifted out.



-- 
__Pascal Bourguignon__                     http://www.informatimago.com/

NOTE: The most fundamental particles in this product are held
together by a "gluing" force about which little is currently known
and whose adhesive power can therefore not be permanently
guaranteed.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]