octave-maintainers
[Top][All Lists]
Advanced

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

Re: Use of floats for FLTK toolkit


From: Michael D Godfrey
Subject: Re: Use of floats for FLTK toolkit
Date: Sat, 02 Apr 2011 16:29:02 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15) Gecko/20110307 Fedora/3.1.9-0.39.b3pre.fc14 Thunderbird/3.1.9

On 04/02/2011 12:13 PM, Rik wrote:
4/2/11

While trying to debug (https://savannah.gnu.org/bugs/index.php?32682) I
came across some undesirable behavior in the FLTK toolkit.  When plotting
functions with a high dynamic range (greater than the capacity of a
'single' or float) the axes are screwed up and no data is plotted.

To test I used the following code:
[x,y,z] = sombrero;
surf(x,y,m*z);

where the multiplier m was 1e37, 1e38, 1e39, 1e41.  The plots are attached
and show the sombrero evaporating away (realmax('single') is 3.4e38).  The
same behavior occurs for gnuplot, but around realmax('double') which is
approximately 1e308.

Does someone who is familiar with the graphics code know how easy it would
be to use doubles in place of floats for FLTK axes calculations?

At the very least, it might be a good idea to put in a warning in the
documentation about the limited dynamic range.

--Rik
This is definitely a bug in the fltk backend.  The GL functions all appear to
handle double, so the problem seems to be somewhere in the axis computation
that is FLTK-specific.

A simpler example which shows the problem is:
x = [1e38:1e38:1e40];
plot(x)
====================================
Someone a bit more familiar with this should open a bug report.

Michael



reply via email to

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