diff scripts/strings/dec2bin.m @ 29197:1a3cb2e1644a

dec2bin.m: Add docstring note about fractional input incompatibility (bug #59719). * dec2bin.m: Add Known Matlab Incompatibility note about fractional input handling. * dec2hex.m: Use "into" instead of "in to" in docstring.
author Nicholas R. Jankowski <jankowskin@asme.org>
date Fri, 18 Dec 2020 15:23:00 -0500
parents d8318c12d903
children 7854d5752dd2
line wrap: on
line diff
--- a/scripts/strings/dec2bin.m	Thu Dec 17 17:57:50 2020 -0800
+++ b/scripts/strings/dec2bin.m	Fri Dec 18 15:23:00 2020 -0500
@@ -49,9 +49,17 @@
 ## @end group
 ## @end example
 ##
-## Programming Notes: The largest negative value that can be converted in to
+## Programming Notes: The largest negative value that can be converted into
 ## two's complement is @code{- (flintmax () / 2)}.
 ##
+## Known @sc{matlab} Incompatibility: @sc{matlab}'s @code{dec2bin} allows
+## non-integer values for @var{d}, truncating the value using the equivalent
+## of @code{fix (@var{d})} for positive values, but, as of R2020b and in
+## conflict with published documentation, appears to use
+## @code{round (@var{d})} for negative values.  To be consistent with
+## @code{dec2hex} and @code{dec2base}, Octave produces an error for non-integer
+## valued inputs for @var{d}.  Users wanting compatible code for non-integer
+## valued inputs should make use of @code{fix} or @code{round} as appropriate.
 ## @seealso{bin2dec, dec2base, dec2hex}
 ## @end deftypefn