• Kirill Smelkov's avatar
    xmath: Addon math routines · b1893d27
    Kirill Smelkov authored
    So far only one of them: CeilPow2 to return min(y) >= x: y = 2^i - i.e.
    next power of two >= x. This is handy to have in reallocation routines
    to allocate buffers from 2^i classes.
    
    Two implementations:
    
    - fast for go19
    - slower fallback for go18
    b1893d27
math_test.go 1.35 KB