On Friday 16 June 2006 10:18, Erik Hofman wrote: > Melchior FRANZ wrote: > > * Erik Hofman -- Friday 16 June 2006 09:51: > >> I think it's best to use the default functions supplied by the system > >> libraries (in this case lrintf() ? ) > > > > lrintf is c99 according to the man page, and so it roundf(). > > (int)rintf() then? > > Hmm, I doubt this will be faster than the ASM code. > You know, just put the code in fastmath.[ch]xx and deal with it later. Well, I doubt that fastmath is useful these days anyway.
I would never use these functions for serious computations, since I doubt that they will pass any IEEE test. Compilers do a pretty good job, selecting the right asm code for that stuff. Also I would trust libm and compilers much more in terms of accuracy, behavour in corner situations and even speed. For those few computations the fastmath functions are used now, I believe that you will not even notice a change in framerates if you compute the required results twice with the most expensive function you can find compared to the fastmath stuff. Also these fastmath implementations are not aliasing safe in any way. You can expect an optimizing compiler to completely missoptimize most of the fastmath functions. I would vote for removing that fastmath stuff completely and using standard ones. Greetings Mathias -- Mathias Fröhlich, email: [EMAIL PROTECTED] _______________________________________________ Flightgear-devel mailing list Flightgear-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/flightgear-devel