[PATCH v3] stdlib: Implement C2Y uabs, ulabs, ullabs and uimaxabs

Paul Eggert eggert@cs.ucla.edu
Mon Mar 10 02:36:49 GMT 2025


On 2025-03-09 14:42, Lenard Mollenkopf wrote:
> +  return i < 0 ? -(unsigned int)i : i;

It's better to avoid casts, for reasons mentioned earlier in this 
thread. Like this:

    unsigned int u = i;
    return i < 0 ? -u : u;




More information about the Libc-alpha mailing list