omega-bridge
Omega-first language interoperability: checked conversion backends and native language bindings
Brought by drakestapleton
omega-bridge / evidence / deepinfer / cxx / floor_prefix.c17
| 1 | #include <stdint.h> |
| 2 | int64_t floor_prefix(int64_t n, int64_t ratio) { |
| 3 | return n / ratio * (n + 1) - ratio * (n / ratio) * (n / ratio + 1) / 2; |
| 4 | } |