comparison scripts/general/bitset.m @ 20521:4bb41929286b

Deprecate bitmax. * NEWS: Announce deprecation and replacement functions. * scripts/deprecated/bitmax.m: New function. Add deprecation message to docstring. Add deprecation warning to m-file. * scripts/deprecated/module.mk: Add deprecated versions to build system. * libinterp/corefcn/bitfcns.cc: Remove build-in function. Remove function from docstrings. * libinterp/corefcn/data.cc: Remove function from docstrings. * scripts/general/bitcmp.m: Replace bitmax function calls with flintmax. Remove function from docstrings. * scripts/general/bitget.m: Replace bitmax function calls with flintmax. Remove function from docstrings. * scripts/general/bitset.m: Replace bitmax function calls with flintmax. Remove function from docstrings. * scripts/specfun/factor.m: Replace bitmax function calls with flintmax. Remove function from docstrings. * scripts/statistics/distributions/unidpdf.m: Remove function from docstrings. * scripts/general/num2str.m: Replaced function in comment. * doc/interpreter/doccheck/aspell-octave.en.pws: Remove functions from list. * doc/interpreter/numbers.txi: Remove function from manual.
author Kai T. Ohlhus <k.ohlhus@gmail.com>
date Wed, 09 Sep 2015 18:43:52 +0200
parents 7503499a252b
children
comparison
equal deleted inserted replaced
20520:f515bac7c7c1 20521:4bb41929286b
30 ## @group 30 ## @group
31 ## dec2bin (bitset (10, 1)) 31 ## dec2bin (bitset (10, 1))
32 ## @result{} 1011 32 ## @result{} 1011
33 ## @end group 33 ## @end group
34 ## @end example 34 ## @end example
35 ## @seealso{bitand, bitor, bitxor, bitget, bitcmp, bitshift, bitmax} 35 ## @seealso{bitand, bitor, bitxor, bitget, bitcmp, bitshift, intmax, flintmax}
36 ## @end deftypefn 36 ## @end deftypefn
37 37
38 function C = bitset (A, n, val) 38 function C = bitset (A, n, val)
39 39
40 if (nargin < 2 || nargin > 3) 40 if (nargin < 2 || nargin > 3)
52 endif 52 endif
53 53
54 cl = class (A); 54 cl = class (A);
55 55
56 if (isfloat (A) && isreal (A)) 56 if (isfloat (A) && isreal (A))
57 Bmax = bitmax (cl); 57 Bmax = flintmax (cl);
58 Amax = ceil (log2 (Bmax)); 58 Amax = ceil (log2 (Bmax));
59 elseif (isinteger (A)) 59 elseif (isinteger (A))
60 Bmax = intmax (cl); 60 Bmax = intmax (cl);
61 Amax = ceil (log2 (Bmax)); 61 Amax = ceil (log2 (Bmax));
62 else 62 else