Re: bit shift
- From: Don Porter <dgp@xxxxxxxx>
- Date: Tue, 07 Feb 2012 09:57:01 -0500
Wai Au wrote:
On Feb 2, 3:17 pm, Wai Au <always...@xxxxxxxxx> wrote:in 8.4, expr 38016 << 16 returns -1803550720. In 8.5, the same
expression returns 2491416576. Is there a way to get the negative
value in 8.5?
ok, i got it. scan [expr 38016 << 16] %i returns the signed value.
Beware. Neither that, nor your original command is portable to
64-bit systems.
--
| Don Porter Applied and Computational Mathematics Division |
| donald.porter@xxxxxxxx Information Technology Laboratory |
| http://math.nist.gov/~DPorter/ NIST |
|______________________________________________________________________|
.
- Follow-Ups:
- Re: bit shift
- From: Don Porter
- Re: bit shift
- Prev by Date: Re: Strange behaviour of text widget
- Next by Date: Re: bit shift
- Previous by thread: Strange behaviour of text widget
- Next by thread: Re: bit shift
- Index(es):