Go Down

Topic: abs() reference shold be updated (Read 2636 times) previous topic - next topic


In the description of the abs() function there is no mention that this can create unpredicted results on float.
I have proven this by writing a small sketch  where it works fine, but when using abs() in my bigger project it fails when processing the exact same number (-0.0027).

Please update the description for the abs() function and tell us to use fabs instead.

This code works:
Code: [Select]

float tmp = -0.0027


thats pretty much standard C "features" but I agree it should be updated

Though I dont know who has powers over the reference pages, and if its anything like the playground pages its simpler to answer questions than learn that stupid arse wiki markup that no one uses outside of wikipedia


Please note that - http://www.nongnu.org/avr-libc/user-manual/modules.html -
gives you a much broader set of functions than the standard arduino wiki pages that can be used on Arduino.
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

Go Up