[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
display of scalar numeric values onscreen
From: |
Rik |
Subject: |
display of scalar numeric values onscreen |
Date: |
Fri, 20 Sep 2019 13:52:35 -0700 |
All,
I'm collecting opinions about the display of scalar values in Octave. For
some values, the display is "x = XXXXX". But for others, including the
default format, there is a variable number of spaces between the '='
character and the start of the number. Sample session below
octave:12> format
octave:13> x = pi
x = 3.1416
octave:14> x = 2
x = 2
octave:15> x = 0
x = 0
octave:16> x = NaN
x = NaN
octave:17> format long
octave:18> x = pi
x = 3.141592653589793
octave:19> format long e
octave:20> x = pi
x = 3.141592653589793e+00
octave:21> format long g
octave:22> x = pi
x = 3.141592653589793
octave:23> format rat
octave:24> x = pi
x = 355/113
Since there are separate function in pr-output.cc for scalar versus matrix
formats, we have complete control over this. My thought is that leading
spaces don't make sense and should be trimmed to just one space after the
'=' character. But, if an extra space is desirable to make the number
stand out from the "x =" portion then that would also be fine. In any
case, I think we should standardize on a value rather than having it vary
confusingly.
--Rik
- display of scalar numeric values onscreen,
Rik <=