diff options
Diffstat (limited to 'generic/lib/integer/abs_diff.inc')
-rw-r--r-- | generic/lib/integer/abs_diff.inc | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/generic/lib/integer/abs_diff.inc b/generic/lib/integer/abs_diff.inc new file mode 100644 index 0000000..93efdba --- /dev/null +++ b/generic/lib/integer/abs_diff.inc @@ -0,0 +1,3 @@ +_CLC_OVERLOAD _CLC_DEF UGENTYPE abs_diff(GENTYPE x) { + return __builtin_astype((GENTYPE)(x > y ? x-y : y-x), UGENTYPE); +} |