On 2010-03-06 11:42:51 +0100, Jerome Vizcaino wrote:
> After many tests and research I've come to the conclusion that the
> float variants of
> sin/cos (and maybe others) are anormaly slow Debian amd64.

Note that on amd64, sin and cos may be slow, but at least they are
mostly correct (in rounding to nearest only). In 32-bit mode (-m32),
the hardware fsin/fcos instructions (and implementation) are used,
but they are buggy on large arguments, just like sincos in 64-bit
mode (which uses the hardware instruction fsincos), and not as
accurate as the MathLib version on small arguments (even though
MathLib has a bug in its error analysis for sin).

If you don't mind about correctness, you can still use the -ffast-math
GCC option (you don't use it in your Makefile). Depending on the
application, this can be OK, but don't complain if you get incorrect,
inaccurate or unexpected results in some cases.

This was for sin/cos. I don't know how sinf/cosf are implemented
in 32-bit and 64-bit modes, but make sure they don't have the same
problem. If they do, this bug is invalid.

Regards,

-- 
Vincent Lefèvre <vinc...@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / Arénaire project (LIP, ENS-Lyon)



--
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/20100317104738.gb29...@prunille.vinc17.org

Reply via email to