-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Erik Hofman schrieb:
> Olaf Flebbe wrote:
>> Hi,
>>
>> The comment for fast_log is IMHO incorrect.
>>
>> /**
>> * This function is about 3 times faster than the system log() function
>> * and has an error of about 0.01%
>> */
>>
>> The relative error can be larger than 7% it is almost nowhere about
>> 0.01% when used in the range [ 0.5 - 1[. Try yourself:
>>
> This was information that I picked up when searching for those 
> functions. Even 7% can be satisfactory in some circumstances, but one 
> needs to know the error.
> 
> I'm getting more and more convinced to just remove these functions and 
> use the standard C ones instead.

These functions can be great - when you know in advance (1) the number
range, (2) the required error range and that you are (3) in a very tight
loop that is (4) performance critical. So I'd leave them in.

But, as premature optimization is the root of all evil, the source code
should be freed of any use of those functions where the comments don't
indicate that the 4 points above are met.

CU,
Christian

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.0 (MingW32)

iD8DBQFEmSeClhWtxOxWNFcRAmw4AJ9trwQ/OZNN9xkmoSGQRtRrz+/4WgCfWg6H
fZ8xGQQdRtgyDvGMRNLsFII=
=kFwa
-----END PGP SIGNATURE-----


_______________________________________________
Flightgear-devel mailing list
Flightgear-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/flightgear-devel

Reply via email to