Home / Questions / What is the difference between functions abs() and fabs()?
Explanatory Question

What is the difference between functions abs() and fabs()?

👁 1,486 Views
📘 Detailed Answer
🕒 Easy to Read
Read the answer carefully and go through the related questions on the right side to improve your understanding of this topic.

Answer with Explanation

These 2 functions basically perform the same action, which is to get the absolute value of the given value. Abs() is used for integer values, while fabs() is used for floating type numbers. Also, the prototype for abs() is under , while fabs() is under .