comparison scripts/general/bitget.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
26 ## @group 26 ## @group
27 ## bitget (100, 8:-1:1) 27 ## bitget (100, 8:-1:1)
28 ## @result{} 0 1 1 0 0 1 0 0 28 ## @result{} 0 1 1 0 0 1 0 0
29 ## @end group 29 ## @end group
30 ## @end example 30 ## @end example
31 ## @seealso{bitand, bitor, bitxor, bitset, bitcmp, bitshift, bitmax} 31 ## @seealso{bitand, bitor, bitxor, bitset, bitcmp, bitshift, intmax, flintmax}
32 ## @end deftypefn 32 ## @end deftypefn
33 33
34 ## Liberally based of the version by Kai Habel from octave-forge 34 ## Liberally based of the version by Kai Habel from octave-forge
35 35
36 function C = bitget (A, n) 36 function C = bitget (A, n)
38 if (nargin != 2) 38 if (nargin != 2)
39 print_usage (); 39 print_usage ();
40 endif 40 endif
41 41
42 if (isa (A, "double")) 42 if (isa (A, "double"))
43 Amax = ceil (log2 (bitmax)); 43 Amax = ceil (log2 (flintmax));
44 _conv = @double; 44 _conv = @double;
45 elseif (isa (A, "single")) 45 elseif (isa (A, "single"))
46 Amax = ceil (log2 (bitmax ("single"))); 46 Amax = ceil (log2 (flintmax ("single")));
47 _conv = @single; 47 _conv = @single;
48 else 48 else
49 if (isa (A, "uint8")) 49 if (isa (A, "uint8"))
50 Amax = 8; 50 Amax = 8;
51 _conv = @uint8; 51 _conv = @uint8;