no sign() function ?

Pierre-Alain Dorange pdorange at pas-de-pub-merci.mac.com
Mon Dec 22 11:18:00 CET 2008


I don't find any sign(x) function in the math library (return the sign
of the value).
I've read that math module is a wrapper to C math lib and that C math
lib has not sign(), so...

I've implement my own sign function of course (it's easy) but a standard
one in math would be better and could be faster.

How do you implement this or is there any other module with a sign()
function ?

-- 
Pierre-Alain Dorange        <http://microwar.sourceforge.net/>

Ce message est sous licence Creative Commons "by-nc-sa-2.0"
        <http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>



More information about the Python-list mailing list