You are here

abs() - Is this limited to 16 bit???? | Cypress Semiconductor

abs() - Is this limited to 16 bit????

Summary: 1 Reply, Latest post by DPG on 29 Jun 2011 09:48 AM PDT
Verified Answers: 0
Last post
Log in to post new comments.
DPG
DPG's picture
User
4 posts

 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?

DPG
DPG's picture
User
4 posts

 Have sorted! Now I know abs() is 16-bit, but fabs() & labs() are the "grown-up" versions. Sorry - I'm new to C!

Log in to post new comments.