changeset 30996:4298af839d20

quadgk.m: Change stopping criterion to "<=" from just "<". * NEWS.8.md: Announce change in Matlab Compatibility section. * quadgk.m: Change stopping criterion to use "<=".
author Rik <rik@octave.org>
date Wed, 11 May 2022 12:14:08 -0700
parents 1fcfe9443917
children 5330efaf9476
files etc/NEWS.8.md scripts/general/quadgk.m
diffstat 2 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/etc/NEWS.8.md	Wed May 11 11:54:57 2022 -0700
+++ b/etc/NEWS.8.md	Wed May 11 12:14:08 2022 -0700
@@ -36,6 +36,10 @@
 - `format` now accepts the option "default", which is equivalent to
   calling `format` without any options to reset the default state.
 
+
+- `quadgk` now stops iterating when `error <= tolerance` while the previous
+  condition was `error < tolerance`.
+
 ### Alphabetical list of new functions added in Octave 8
 
 
--- a/scripts/general/quadgk.m	Wed May 11 11:54:57 2022 -0700
+++ b/scripts/general/quadgk.m	Wed May 11 12:14:08 2022 -0700
@@ -359,7 +359,7 @@
     tol = max (abstol, reltol .* abs (q0));
 
     ## If the global error estimate is met then exit
-    if (err0 < tol)
+    if (err0 <= tol)
       q = q0;
       err = err0;
       break;