[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #43782] single precision is insufficient for p
From: |
anonymous |
Subject: |
[Octave-bug-tracker] [bug #43782] single precision is insufficient for plotting |
Date: |
Mon, 08 Dec 2014 20:58:49 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:34.0) Gecko/20100101 Firefox/34.0 |
URL:
<http://savannah.gnu.org/bugs/?43782>
Summary: single precision is insufficient for plotting
Project: GNU Octave
Submitted by: None
Submitted on: Mon 08 Dec 2014 08:58:47 PM UTC
Category: Plotting with OpenGL
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Inaccurate Result
Status: None
Assigned to: None
Originator Name: Chad Aeschliman
Originator Email: address@hidden
Open/Closed: Open
Discussion Lock: Any
Release: 3.8.2
Operating System: GNU/Linux
_______________________________________________________
Details:
The new plotting system apparently uses single precision for plotting
(https://www.gnu.org/software/octave/doc/interpreter/Introduction-to-Plotting.html).
This is not sufficient for scientific applications. The website claims that
it is a factor when plotting large values (10^38) but really it becomes a
precision problem at much smaller values. For example, The following two
figures should look the same, just the x axis is shifted in the second:
x = (0:0.01:2*pi);
y = sin(x);
figure(1);
plot(x, y);
figure(2);
plot(x+1e7,y);
The resulting plots are attached as images. In this example, the second plot
shows significant quanitzation effects. The effect gets worse as the size of
the shift increases.
Having a large bias on the x axis is not unlikely in scientific applications.
In my particular use case, I was plotting a data signal with a sampling rate
of 1 sample/s against unix timestamps (which has an offset of about 1.4e9
currently). The plot was useless. I had to revert to using gnuplot and its
slower and clunkier interface to generate useful plots
Even if FLTK doesn't support double precision, it's possible to work around
this by shifting and scaling the data before drawing it (and then "undoing"
this shifting and scaling when labeling the axes).
_______________________________________________________
File Attachments:
-------------------------------------------------------
Date: Mon 08 Dec 2014 08:58:47 PM UTC Name: fig1.png Size: 22kB By: None
<http://savannah.gnu.org/bugs/download.php?file_id=32622>
-------------------------------------------------------
Date: Mon 08 Dec 2014 08:58:47 PM UTC Name: fig2.png Size: 12kB By: None
<http://savannah.gnu.org/bugs/download.php?file_id=32623>
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?43782>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #43782] single precision is insufficient for plotting,
anonymous <=