+ 14
Qus10:-What is the difference between abs() and fabs() functions?
#basicquestions,
9 Answers
+ 11
👍
+ 10
fabs is for floating point values.
+ 3
abs is absolute value
+ 3
abs is absolute value if number is negative it makes it positive and used for integer number
fabs like it i think used for float numbers
+ 3
Hi
if you have a float number, you have to use fabs()
if you have an integer number, you have to use abs()
exemple with fabs() :
fabs(239.14) return 239.14
fabs(-239.14) return 239.14
exemple with abs() :
abs(239) return 239
abs(-239) return 239
+ 2
Cuál es ahí?
+ 2
Both are used to get the absolute value. Abc is used to get the integer value and fabs os used to get the floating type data..
+ 2
مرحبابكى
+ 1
مرحبابكى