octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #56884] mean can overflow


From: Marco Caliari
Subject: [Octave-bug-tracker] [bug #56884] mean can overflow
Date: Tue, 17 Sep 2019 04:27:34 -0400 (EDT)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0

Follow-up Comment #15, bug #56884 (project octave):

@Michael: you are right, pairwise_mean is the best code, on average. I think
it should replace the actual m-file mean. And probably also the harmonic mean
(that is, mean(x,'h') should become 1./pairwise_mean(1./x)). The example il


octave:43> v=1./[1.7e308,1.5e308]
v =

   5.882352941176472e-309   6.666666666666668e-309

octave:44> mean(v,'h')
ans =    0.000000000000000e+00
octave:45> 1./pairwise_mean(1./v)
ans =   6.250000000000003e-309



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56884>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]