+ 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.

15th May 2021, 6:57 AM
Mani_K_A
1 Resposta
+ 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
15th May 2021, 7:14 AM
minirkk
minirkk - avatar