Albert Kottke | 12 May 17:49

Possible bug in axis labelling

For 7 plots, two of the plots have -1.38778e-17 instead of 0. Though the
zero value isn't always -1.38778e-17.  You can find a screenshot of
incorrect and correct axis here:
http://accipter.org/pub/qwt-scale-problem.png

I have tried my program in both linux and windows environments, and it
appears to only happen on windows (qt-4.4.0 with mingw).

Let me know if you need me to supply the code.

Albert

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
Uwe Rathmann | 12 May 19:59
Picon

Re: Possible bug in axis labelling

On Monday 12 May 2008 17:49, Albert Kottke wrote:

> I have tried my program in both linux and windows environments, and it
> appears to only happen on windows (qt-4.4.0 with mingw).

Which Qwt version ?

Since Qwt 5.1 QwtScaleEngine uses DBL_EPSILON ( cfloat ) for its calculations. 
If you are using 5.1 please check, what happens when you replace DBL_EPSILON 
by 1.0e-6 in qwt_scale_engine.cpp.

> Let me know if you need me to supply the code.

Please debug QwtLinearScaleEngine::divideScale instead and check what is going 
wrong with the 0.0 value. What are the parameter values, when it is called ?

Uwe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
Albert Kottke | 12 May 20:24

Re: Possible bug in axis labelling

On Mon, May 12, 2008 at 07:59:49PM +0200, Uwe Rathmann wrote:
> On Monday 12 May 2008 17:49, Albert Kottke wrote:
> 
> > I have tried my program in both linux and windows environments, and it
> > appears to only happen on windows (qt-4.4.0 with mingw).
> 
> Which Qwt version ?

5.1 from the subversion repository

> 
> Since Qwt 5.1 QwtScaleEngine uses DBL_EPSILON ( cfloat ) for its calculations. 
> If you are using 5.1 please check, what happens when you replace DBL_EPSILON 
> by 1.0e-6 in qwt_scale_engine.cpp.

This fixes the issue.  The DBL_EPSILON value is reported to be
2.22045e-16.

> 
> > Let me know if you need me to supply the code.
> 
> Please debug QwtLinearScaleEngine::divideScale instead and check what is going 
> wrong with the 0.0 value. What are the parameter values, when it is called ?

x1: -0.2 x2: 0.2 maxMajSteps: 8 maxMinSteps: 5 stepSize: 0.05

> 
> Uwe
> 
> -------------------------------------------------------------------------
(Continue reading)

Uwe Rathmann | 16 May 06:53
Picon

Re: Possible bug in axis labelling

On Monday 12 May 2008 20:24, Albert Kottke wrote:

> This fixes the issue.  The DBL_EPSILON value is reported to be
> 2.22045e-16.

Thanks, I will try to find a fix next week.

I'm planning to publish a 5.1.1 bugfix release next week. If there are any 
known bugs, please report them now.

Uwe

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft 
Defy all challenges. Microsoft(R) Visual Studio 2008. 
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

Gmane