|
From: | Carnë Draug |
Subject: | [Octave-bug-tracker] [bug #47063] computation between single and double performed with single precision |
Date: | Fri, 05 Feb 2016 02:45:02 +0000 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Firefox/38.0 Iceweasel/38.6.0 |
URL: <http://savannah.gnu.org/bugs/?47063> Summary: computation between single and double performed with single precision Project: GNU Octave Submitted by: carandraug Submitted on: Fri 05 Feb 2016 02:45:01 GMT Category: None 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: An operation between a double and a single returns a single for Matlab compatibility. However, it seems that Matlab actually performs the computations with doubles. See https://stackoverflow.com/questions/35213845/subtracting-double-precision-from-single-precision-gives-me-0-not-what-i-want ## in octave octave> single (sin (10)) - sin (10) ans = 0 octave> single (double (single (sin (10))) - sin (10)) ans = -1.8719e-08 ---------- ## in matlab >> single (sin (10)) - sin (10) ans = -1.8719e-08 _______________________________________________________ Reply to this item at: <http://savannah.gnu.org/bugs/?47063> _______________________________________________ Message sent via/by Savannah http://savannah.gnu.org/
[Prev in Thread] | Current Thread | [Next in Thread] |