Mercurial > octave
diff etc/NEWS.10.md @ 33199:297fd823a953
nextpow2.m: Overhaul function for improved accuracy and Matlab compatibility (bug #65441)
* nextpow2.m: Clarify documentation. Document return value of special input 0.
Add input validation to exclude complex inputs. New algorithm for computing
nextpow2 based on 2-output form of log2(). Use cast() to have output class
match input class for Matlab compatibility. Add BIST tests.
* NEWS.10.md: Announce changes to nextpow2 function.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 12 Mar 2024 14:27:13 -0700 |
parents | 82ae00b40c2c |
children | 9f97974976cd |
line wrap: on
line diff
--- a/etc/NEWS.10.md Tue Mar 12 15:05:37 2024 -0400 +++ b/etc/NEWS.10.md Tue Mar 12 14:27:13 2024 -0700 @@ -17,6 +17,11 @@ - `nchoosek` algorithm is now ~2x faster and provides greater precision. +- `nextpow2` algorithm is now more accurate for inputs very close to a power +of 2. The output class now matches the input class for Matlab compatibility. +The function no longer accepts complex inputs and will emit an error for these +inputs. + ### Graphical User Interface ### Graphics backend