[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: |
Thu, 12 Sep 2019 05:07:24 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:69.0) Gecko/20100101 Firefox/69.0 |
URL:
<https://savannah.gnu.org/bugs/?56884>
Summary: mean can overflow
Project: GNU Octave
Submitted by: caliari
Submitted on: Thu 12 Sep 2019 09:07:22 AM UTC
Category: Octave Function
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
The function mean can overflow
> mean([1.7e308,1.5e308])
ans = Inf
even if the result is clearly 1.6e308. It appear to me that the simplest
solution is to replace
y = sum (x, dim) / n;
with
y = sum (x / n, dim);
around line 153 of mean.m. By the way, matlab overflows too.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?56884>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
- [Octave-bug-tracker] [bug #56884] mean can overflow,
Marco Caliari <=
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Godfrey, 2019/09/12
- [Octave-bug-tracker] [bug #56884] mean can overflow, Marco Caliari, 2019/09/12
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Godfrey, 2019/09/12
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Godfrey, 2019/09/12
- [Octave-bug-tracker] [bug #56884] mean can overflow, Armin Müller, 2019/09/12
- [Octave-bug-tracker] [bug #56884] mean can overflow, Ceral Paquet, 2019/09/14
- [Octave-bug-tracker] [bug #56884] mean can overflow, Marco Caliari, 2019/09/16
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Godfrey, 2019/09/16
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Leitner, 2019/09/16
- [Octave-bug-tracker] [bug #56884] mean can overflow, Michael Leitner, 2019/09/16