Mercurial > octave-nkf
comparison scripts/general/bitcmp.m @ 7332:74b372fffa72
[project @ 2007-12-21 19:00:12 by jwe]
author | jwe |
---|---|
date | Fri, 21 Dec 2007 19:00:12 +0000 |
parents | a1dbe9d80eee |
children | 66dfb0abd3d3 |
comparison
equal
deleted
inserted
replaced
7331:3ed85de5922c | 7332:74b372fffa72 |
---|---|
44 error("k must be a scalar integer") | 44 error("k must be a scalar integer") |
45 endif | 45 endif |
46 | 46 |
47 if (isa (a, "double")) | 47 if (isa (a, "double")) |
48 bmax = bitmax; | 48 bmax = bitmax; |
49 amax = ceil (log2 (bmax)); | 49 amax = round (log2 (bmax)); |
50 else | 50 else |
51 if (isa (a, "uint8")) | 51 if (isa (a, "uint8")) |
52 amax = 8; | 52 amax = 8; |
53 elseif (isa (a, "uint16")) | 53 elseif (isa (a, "uint16")) |
54 amax = 16; | 54 amax = 16; |