changeset 33605:9e9725f13742 bytecode-interpreter

maint: Merge default to bytecode-interpreter.
author Nicholas R. Jankowski <jankowski.nicholas@gmail.com>
date Sat, 18 May 2024 22:26:52 -0400
parents ea261407cb9f (current diff) 631cc5fdf697 (diff)
children 5fba13104493
files etc/NEWS.9.md
diffstat 2 files changed, 5 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS.9.md	Sat May 18 17:42:42 2024 -0400
+++ b/etc/NEWS.9.md	Sat May 18 22:26:52 2024 -0400
@@ -6,7 +6,7 @@
 ### Improvements and fixes
 
 - `hist.m`: Add input validation for `Y` restricting it to 2-D array
-  (bug #65478).  Avoid error when `Y` value range is very small (bug #65714).
+  (bug #65478).
 - `cross.m`: Add input validation for `dim` restricting it to a numeric
   integer valued scalar (bug #65544, bug #65527).
 - `getframe.m`: Respect pixel ratio (high DPI) of screen with figure
--- a/scripts/plot/draw/hist.m	Sat May 18 17:42:42 2024 -0400
+++ b/scripts/plot/draw/hist.m	Sat May 18 22:26:52 2024 -0400
@@ -127,9 +127,8 @@
   if (nargin == 1 || ischar (varargin{iarg}))
     n = 10;
     ## Use integer range values and perform division last to preserve
-    ## accuracy.  If max - min is less than 20*eps, treat as if min = max to
-    ## avoid bug #65714 error.
-    if (min_val != max_val && diff ([min_val, max_val]) > 20 * eps)
+    ## accuracy.
+    if (min_val != max_val)
       x = 1:2:2*n;
       x = ((max_val - min_val) * x + 2*n*min_val) / (2*n);
     else
@@ -154,9 +153,8 @@
         error ("hist: number of bins NBINS must be positive");
       endif
       ## Use integer range values and perform division last to preserve
-      ## accuracy.  If max - min is less than 20*eps, treat as if min = max
-      ## to avoid bug #65714 error.
-      if (min_val != max_val && diff ([min_val, max_val]) > 20 * eps)
+      ## accuracy.
+      if (min_val != max_val)
         x = 1:2:2*n;
         x = ((max_val - min_val) * x + 2*n*min_val) / (2*n);
       else
@@ -431,19 +429,6 @@
 %! [nb, xb] = hist (b, 30);
 %! assert ({na, xa}, {nb, xb});
 
-%!test <*65714> # Avoid error if diff(y) is very small.
-%! a = [1, 1+eps, 1+ 15*eps];
-%! hf = figure ("visible", "off");
-%! unwind_protect
-%!   hax = axes ("parent", hf);
-%!   hist (hax, a);
-%!   hp = get (hax, "children");
-%!   assert (max (get (hp, "ydata")(:)), 3);
-%! unwind_protect_cleanup
-%!   close (hf);
-%! end_unwind_protect
-
-
 ## Test input validation
 %!error <Invalid call> hist ()
 %!error <Y must be real-valued> hist (2+i)