From kde-commits Thu Jul 31 23:02:23 2003 From: Matthias Kretz Date: Thu, 31 Jul 2003 23:02:23 +0000 To: kde-commits Subject: Re: ARTS_1_1_BRANCH: arts/soundserver X-MARC-Message: https://marc.info/?l=kde-commits&m=105969262428554 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--Boundary-02=_//ZK/mTwwivCx4f" --Boundary-02=_//ZK/mTwwivCx4f Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hmm, interesting. float a =3D 1.2; float b =3D fabs( a ); is not equivalent to float a =3D -1.2; float b =3D fabsf( a ); right? The second one should be more efficient (I'm thinking of loops where= =20 fabs( float ) is called like 4*44100 times per second), no? How about: float myfabsf( a ) { long x =3D 0x7FFFFFFF & *((long*)&a); return *((float*)&x); } On Friday August 1 2003 00:38, George Staikos wrote: > CVS commit by staikos: > > no fabsf() in non-C99 environments > > This should be forward ported. > > CCMAIL: 61796-done@bugs.kde.org > > > M +1 -1 artsd.cc 1.43.2.3 > > > --- arts/soundserver/artsd.cc #1.43.2.2:1.43.2.3 > @@ -292,5 +292,5 @@ int main(int argc, char **argv) > AudioManager audioManager; > > - if (fabsf(cfgVolume) > 1e-10) > + if (fabs(cfgVolume) > 1e-10) > server.outVolume().scaleFactor(cfgVolume); =2D-=20 C'ya Matthias ________________________________________________________ Matthias Kretz (Germany) <>< http://Vir.homeip.net/ MatthiasKretz@gmx.net, kretz@kde.org, Matthias.Kretz@urz.uni-heidelberg.de --Boundary-02=_//ZK/mTwwivCx4f Content-Type: application/pgp-signature Content-Description: signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.2 (GNU/Linux) iD8DBQA/KZ//yg4WnCj6OIoRAgydAJoDtc4SwlQlMG35A6rTM8bagHVKvwCg4Z0w cuNBvhhRGjSs+TGTwcswKbY= =GDSf -----END PGP SIGNATURE----- --Boundary-02=_//ZK/mTwwivCx4f--