Mercurial > octave
changeset 27439:251056aeba5d
Align negative numbers correctly with g format (bug #56940).
* pr-output.cc (make_real_matrix_format, make_complex_format,
make_complex_matrix_format, make_range_format): Increase width of format by 1
to allow for '-' sign.
author | Rik <rik@octave.org> |
---|---|
date | Mon, 23 Sep 2019 13:51:17 -0700 |
parents | 349504d42040 |
children | d5fc84964eb9 |
files | libinterp/corefcn/pr-output.cc |
diffstat | 1 files changed, 4 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/pr-output.cc Mon Sep 23 07:49:08 2019 -0700 +++ b/libinterp/corefcn/pr-output.cc Mon Sep 23 13:51:17 2019 -0700 @@ -582,7 +582,7 @@ || fw > pr_output_traits<T>::max_field_width)))) { if (print_g) - fmt = float_format (prec+5, prec); + fmt = float_format (prec+6, prec); else { int ex = 4; @@ -757,7 +757,7 @@ { if (print_g) { - int width = prec + 5; + int width = prec + 6; r_fmt = float_format (width, prec); i_fmt = float_format (width, prec); } @@ -982,7 +982,7 @@ { if (print_g) { - int width = prec + 5; + int width = prec + 6; r_fmt = float_format (width, prec); i_fmt = float_format (width, prec); } @@ -1188,7 +1188,7 @@ || fw > pr_output_traits<T>::max_field_width)))) { if (print_g) - fmt = float_format (prec+5, prec); + fmt = float_format (prec+6, prec); else { int ex = 4;