[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-x C-e on numbers
From: |
Stefan Reichör |
Subject: |
Re: C-x C-e on numbers |
Date: |
Fri, 05 Dec 2014 08:04:13 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) |
address@hidden (Alfred M. Szmidt) writes:
> Currently, when evaluating a number, emacs will print the decimal,
> octal, hexadecimal, and charachter of said number.
>
> 42 C-x C-e ==> 42 (#o52, #x2a, ?*)
>
> It would be useful, if the output would also include the binary
> representation of the number. Or at least somehow enable such
> behaviour. I.e.,
>
> 42 C-x C-e ==> 42 (#b101010, #o52, #x2a, ?*)
M-x quick-calc <RET> 42 <RET> ==> Result: 42 => 42 (16#2A, 8#52, 2#101010,
"*")
> It would also be useful to change the printed representation of a
> number, so that the above would become,
>
> #o52 C-x C-e ==> #x2a (#b101010, 42, #o52, ?*)
>
> But this would probobly require some more work.
M-x quick-calc <RET> 8#52 <RET> ==> Result: 42 => 42 (16#2A, 8#52, 2#101010,
"*")
calc handles this and a lot more...
Stefan.