From kwin Thu Jul 19 10:16:58 2007 From: Lubos Lunak Date: Thu, 19 Jul 2007 10:16:58 +0000 To: kwin Subject: Re: float -> double Message-Id: <200707191216.58979.l.lunak () suse ! cz> X-MARC-Message: https://marc.info/?l=kwin&m=118484026626434 On Tuesday 17 of July 2007, Rivo Laks wrote: > Ühel kenal päeval (teisipäev 17 juuli 2007) kirjutas Lubos Lunak: > > Hello, > > > > I'd like to change all floats in the code to doubles. Floating point > > constants are double by default in C/C++ and I've run into ugly rounding > > errors because of mixing doubles and floats. Additionally, considering > > things like http://compilers.iecc.com/comparch/article/94-11-172, I think > > there's really not much reason to use floats - anybody disagrees? > > OpenGL uses floats internally, so I'm not sure if it's a good idea. > At least leave all OpenGL stuff (e.g. vertex coordinates, texcoords, etc) > to be floats. I don't think we need the added precision, but we shouldn't mix the two. Since constants are doubles, every computation with a constant is a double operation as well. Compiz seems to use floats, but also to strictly use float constants like 1.5f, which I don't find very nice :-/ . Ok, which one would you prefer :) ? -- Lubos Lunak KDE developer -------------------------------------------------------------- SUSE LINUX, s.r.o. e-mail: l.lunak@suse.cz , l.lunak@kde.org Lihovarska 1060/12 tel: +420 284 028 972 190 00 Prague 9 fax: +420 284 028 951 Czech Republic http//www.suse.cz _______________________________________________ Kwin mailing list Kwin@kde.org https://mail.kde.org/mailman/listinfo/kwin