Mercurial > octave
changeset 31661:5fb15fb04e09
maint: Merge stable to default
author | Nicholas R. Jankowski <jankowski.nicholas@gmail.com> |
---|---|
date | Sat, 10 Dec 2022 09:14:55 -0500 |
parents | 4e6c415695d3 (current diff) ccbf38427774 (diff) |
children | a36035adefeb |
files | |
diffstat | 2 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-flt-fmt.cc Fri Dec 09 12:22:22 2022 -0500 +++ b/libinterp/corefcn/pr-flt-fmt.cc Sat Dec 10 09:14:55 2022 -0500 @@ -60,7 +60,9 @@ Note that regardless of the value set for @code{output_precision}, the number of digits of precision displayed is limited to 16 for double -precision values and 7 for single precision values. +precision values and 7 for single precision values. Also, calls to the +@code{format} function that change numeric display can also change the set +value for @code{output_precision}. When called from inside a function with the @qcode{"local"} option, the variable is changed locally for the function and any subroutines it calls.
--- a/libinterp/corefcn/pr-output.cc Fri Dec 09 12:22:22 2022 -0500 +++ b/libinterp/corefcn/pr-output.cc Sat Dec 10 09:14:55 2022 -0500 @@ -3819,10 +3819,12 @@ Reset or specify the format of the output produced by @code{disp} and Octave's normal echoing mechanism. -This command only affects the display of numbers, but not how they are stored +This command only affects the display of numbers, not how they are stored or computed. To change the internal representation from the default double use one of the conversion functions such as @code{single}, @code{uint8}, -@code{int64}, etc. +@code{int64}, etc. Any @code{format} options that change the number of +displayed significant digits will also be reflected by the +@code{output_precision} function. By default, Octave displays 5 significant digits in a human readable form (option @samp{short}, option @samp{lowercase}, and option @samp{loose} format