octave-maintainers
[Top][All Lists]
Advanced

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

Use of floats for FLTK toolkit


From: Rik
Subject: Use of floats for FLTK toolkit
Date: Sat, 02 Apr 2011 12:13:51 -0700

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

Attachment: 1e37.png
Description: PNG image

Attachment: 1e38.png
Description: PNG image

Attachment: 1e39.png
Description: PNG image

Attachment: 1e41.png
Description: PNG image


reply via email to

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