+ 1
What is the difference between abs() and fabs() functions?
What is the difference between abs() and fabs() functions in C programming language.
1 ответ
+ 4
Prototype: int abs(int n);
Computes the absolute value of an integer number `n`.
Prototype: double fabs(double n);
Computes the absolute value of a floating point number `n`.
fabs has defined in <math.h>
abs has defined in <stdlib.h>
____
https://en.cppreference.com/w/c/numeric/math/abs
https://en.cppreference.com/w/c/numeric/math/fabs