[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-patch-tracker] [patch #9453] assert() should report tolerance ex
From: |
Dan Sebald |
Subject: |
[Octave-patch-tracker] [patch #9453] assert() should report tolerance exceedance |
Date: |
Wed, 13 Sep 2017 12:29:32 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:54.0) Gecko/20100101 Firefox/54.0 |
URL:
<http://savannah.gnu.org/patch/?9453>
Summary: assert() should report tolerance exceedance
Project: GNU Octave
Submitted by: sebald
Submitted on: Wed 13 Sep 2017 04:29:30 PM UTC
Category: Core : other
Priority: 5 - Normal
Status: None
Privacy: Public
Assigned to: None
Originator Email:
Open/Closed: Open
Discussion Lock: Any
_______________________________________________________
Details:
When an assert() test fails, the amount by which the tolerance is exceeded is
not reported. Thus there can be error messages like:
error: ASSERT errors for: assert (3,3.1,0.1)
Location | Observed | Expected | Reason
() 3 3.1 Abs err 0.1 exceeds tol 0.1
which can confuse users who don't realize there is floating point arithmetic
at play.
This patch adds a little extra info at the end to give a hint that this is a
floating point math issue. E.g.,
octave:1> assert(3, 3.1, 0.1)
error: ASSERT errors for: assert (3,3.1,0.1)
Location | Observed | Expected | Reason
() 3 3.1 Abs err 0.1 exceeds tol 0.1 by 8e-17
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Wed 13 Sep 2017 04:29:31 PM UTC Name:
octave-assert_print_tolerance_overrun-djs2017sep12.patch Size: 3KiB By:
sebald
<http://savannah.gnu.org/patch/download.php?file_id=41795>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/patch/?9453>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-patch-tracker] [patch #9453] assert() should report tolerance exceedance,
Dan Sebald <=