As per octave-help, Maynard has pointed out a difference in precision between the original vector and the output of max(). Observe: ======================== octave:1> x = rand(20,1) x =
octave:4> format long octave:5> x x = <snip> 0.9766756054092811
<snip>
octave:6> max(x) ans = 0.976675605409281 octave:7> format none octave:8> x x =
<snip> 0.976675605409281 <snip>
octave:9> max(x) ans = 0.976675605409281
octave:10> format short e octave:11> x x = <snip> 9.7668e-001 <snip>
octave:12> max(x) ans = 9.7668e-001 octave:13> format short eng octave:14> x x =
<snip>
976.6756e-03 <snip>
octave:15> max(x) ans = 976.6756e-03 octave:16> format short octave:17> x x =
<snip> 0.976676 <snip>
octave:18> max(x)
ans = 0.97668 ========================
So it seems just during "short" and "long" formats that the output is rounded to one less digit in the output on max(). Is this a bug?
The spec of "short" and "long" say 5 and 15 significant digits,
respectively. So it's the originals that display an extra digit. The
output of max() is conforming to spec.
3.4.2, on win 7, by the way. I have verified the same occurs in 3.2.4 but didn't do extensive testing.