DIV64_U64_ROUND_CLOSEST(9)
π DIV64_U64_ROUND_CLOSEST(9) π
okay so bestie, welcome to the Kernel API Manual page for DIV64_U64_ROUND_CLOSEST β manual name folded in near the top, as promised, not copied as a header line. This is the unsigned 64bit divide-with-nearest-integer entry, and it's giving main character energy in math64.h. π
β¨
β¨ SYNOPSIS β¨
DIV64_U64_ROUND_CLOSEST (dividend , divisor );
πΈ ARGUMENTS πΈ
dividendβ the unsigned 64bit dividend, aka the number getting divided. π«Άdivisorβ the unsigned 64bit divisor, aka the number doing the dividing. π
π¦ DESCRIPTION π¦
The actual move: divide the unsigned 64bit dividend by the unsigned 64bit divisor, then round to the closest integer. That's the whole vibe. Not extra, not mysterious β rounded to nearest integer, periodt. β¨
π RETURN π
It returns dividend / divisor rounded to the nearest integer. Slay. ππ₯
π SEE ALSO π
Kernel file ./include/linux/math64.h β and the whole friend group:
div_u64_rem(9)div_s64_rem(9)div64_u64_rem(9)div64_s64_rem(9)div64_u64(9)div64_s64(9)div_u64(9)div_s64(9)mul_u64_add_u64_div_u64(9)mul_u64_u64_div_u64(9)mul_u64_u64_div_u64_roundup(9)DIV64_U64_ROUND_UP(9)DIV_U64_ROUND_UP(9)DIV_U64_ROUND_CLOSEST(9)DIV_S64_ROUND_CLOSEST(9)roundup_u64(9)
that's the whole page, bestie π«Ά source/version: ./include/linux, date stamp: October 2026. byeee π
β¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms