MCPcopy Create free account
hub / github.com/coreutils/coreutils / simple_round_from_zero

Function simple_round_from_zero

src/numfmt.c:397–401  ·  view source on GitHub ↗

EXTREMELY limited 'round away from zero'. Assumes values that fit in intmax_t. */

Source from the content-addressed store, hash-verified

395/* EXTREMELY limited 'round away from zero'.
396 Assumes values that fit in intmax_t. */
397static inline intmax_t
398simple_round_from_zero (long double val)
399{
400 return val < 0 ? simple_round_floor (val) : simple_round_ceiling (val);
401}
402
403/* EXTREMELY limited 'round away to zero'.
404 Assumes values that fit in intmax_t. */

Callers 1

simple_roundFunction · 0.85

Calls 2

simple_round_floorFunction · 0.85
simple_round_ceilingFunction · 0.85

Tested by

no test coverage detected