summaryrefslogtreecommitdiff
path: root/generic/lib/integer/abs.inc
blob: fff6691274afd800dddc873ef0d86c9cfaa0d4df (plain)
1
2
3
_CLC_OVERLOAD _CLC_DEF UGENTYPE abs(GENTYPE x) {
  return __builtin_astype((GENTYPE)(x > (GENTYPE)(0) ? x : -x), UGENTYPE);
}