I am using the ADC in 20-bit mode (PSoC3), but the abs() works fine up to the 16-bit limit, then goes awry - so I have to use multiply by -1 instead, which works fine (although slightly more clumsy). Are there any work-arounds, and are there other 16-bit limited operations we should be aware of?
Have sorted! Now I know abs() is 16-bit, but fabs() & labs() are the "grown-up" versions. Sorry - I'm new to C!