Mercurial > octave
diff src/bitfcns.cc @ 6108:143b556ce725
[project @ 2006-10-27 01:45:54 by jwe]
author | jwe |
---|---|
date | Fri, 27 Oct 2006 01:45:56 +0000 |
parents | 22e23bee74c8 |
children | a37c427ae9d1 |
line wrap: on
line diff
--- a/src/bitfcns.cc Thu Oct 26 22:00:12 2006 +0000 +++ b/src/bitfcns.cc Fri Oct 27 01:45:56 2006 +0000 @@ -291,6 +291,10 @@ static int64_t bitshift (double a, int n, int64_t mask) { + // In the name of bug-for-bug compatibility. + if (a < 0) + return -bitshift (-a, n, mask); + if (n > 0) return (static_cast<int64_t> (a) << n) & mask; else if (n < 0)