[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Open Bugs in 3.2
From:       Graeme Ambler <Graeme.Ambler () bristol ! ac ! uk>
Date:       2004-01-12 16:41:44
Message-ID: 200401121641.46194.Graeme.Ambler () bristol ! ac ! uk
[Download RAW message or body]

On Monday 12 January 2004 14:51, Waldo Bastian wrote:
> On Mon January 12 2004 00:32, Joachim Eibl wrote:
> > This little program contains a little surprise because you assign a
> > double constant to a long double variable.
> >
> > Check this on your machine.
> >   long double a=49.84;       // double constant
> >   printf("%2.30llf\n",a);        // 49.840000000000003410605131648481
> >   long double a1=49.84L;   // long double constant
> >   printf("%2.30llf\n",a1);      // 49.840000000000000000138777878078
> >
> > This just illustrates how tricky it can be.
>
> This was indeed the problem.
> "'49.48" got converted using QString::toDouble() which has double precision
> and not long double.

Nice to know that my making a fool of myself resulted in a bug fix!  I should 
obviously try to make mistakes more often...

Graeme.
 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic