+ 1
fabs and abs
What is the difference between fabs and abs function in cmath header file? I just know abs is a bit faster.
1 Respuesta
+ 3
f in fabs stands for float
The difference is that math.fabs(number) will always return a floating point number even if the argument is integer, whereas abs() will return a floating point or an integer depending upon the argument.
src: geeksforgeeks
https://www.sololearn.com/discuss/798701/?ref=app
https://www.sololearn.com/discuss/1676033/?ref=app
https://www.sololearn.com/discuss/273530/?ref=app