0

I'm using the abs() function in a probability calculation using float and int variables however I'm getting error messages. What I'm trying to do is get a decimal answer using abs() but it appears to only accept integer variables? How do I get the abs() to give me a a 3 decimal place answer.

5
Contributors
9
Replies
12
Views
12 Years
Discussion Span
Last Post by Acidburn
0

don't supose you could explain that a little more, I got the feeling that fabs and abs do different things pther than double and floats?

0

Given the prototypes, I thought it was quite obvious. (You didn't follow the links and read the descriptions either, did you?)

  • abs is for int (not double)
  • fabs is for floating point (double or float)
0

Given the prototypes, I thought it was quite obvious. (You didn't follow the links and read the descriptions either, did you?)

  • abs is for int (not double)
  • fabs is for floating point (double or float)

i followed the links ..............never mind

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.