Good call. There's a fabs() function in math.h and an integer abs()
function in stdlib.h. I think stdlib.h is automatically included, so you
end up using that.
Note that you can cimport the math.h functions from libc.math, so you don't
need to declare them yourself.
That being said, Cython should use fabs() from math.h when the builtin
abs() function is called on double values. It may be quite easy to add an
override in Builtin.py for that.
http://trac.cython.org/cython_trac/ticket/698
Stefan
Cython 0.14.1 has been merged into Sage, but Sage hasn't been released
in a while. (It's onto release candidate 4, so hopefully any day
now...)
If you want to provide a patch, take a look at the function specific
optimisation methods in Optimize.py.
Stefan