rustc -C opt-level=3): 2049 (203973 B .text / 53737 insns)22/9 Hz): 248869 B / 5979051 B (ratio 248869/5979051, saved 5730182/5979051, 11695 ″ dittos)| Rank & Crown | Function Name & Domain | Best Use & Snap-Circuit Role | Pin Signature & 64-Vec Hash | Hardware _rdtsc (p/q) | Details & Quick Peek |
|---|---|---|---|---|---|
| #1625 SOLE CROWN #1 | atan2_deg_i16 domain: smart-tree | id: 000d21222537Aye: aye::Hue+Gemini(0+1)::x86_64 @ 432Hz | Lossless Wire & Structural Compression Zero-allocation integer bit-packing, variable-length encoding, and stream framing for sovereign wire protocols. Specialized Multi-Pin Stage `(i32,i32)->i16` — wire matching input pins via `snap_dag` or `snap_pipeline`. | (i32,i32)->i1664-vec BLAKE3: 83e97c6a1e9fC64 RAM: 371/32768 (742 B src) | 2998323/200000 cyc/op 2856197/400000 ns/op | 400000000/2856197 ops/us 186 B .text (58 insns) | Trit + (1) | Inspect Details & ASM →Quick Peek Rust (742 B)pub const fn atan2_deg_i16(y: i32, x: i32) -> i16 {
if x == 0 && y == 0 {
return 0;
}
let ay = y.abs();
let ax = x.abs();
let (mn, mx) = if ay < ax { (ay, ax) } else { (ax, ay) };
let mx64 = if mx > 1 { mx as i64 } else { 1 };
let r_q10 = ((mn as i64) << 10) / mx64; // 0..=1024
// Padé angle in [0..=45] degrees
let raw_deg = (r_q10 * (5734 - r_q10)) / (1024 * 104);
let deg_oct = if raw_deg < 0 {
0
} else if raw_deg > 45 {
45
} else {
raw_deg as i16
};
let deg_quad = if ay > ax { 90 - deg_oct } else { deg_oct };
let deg_half = if x < 0 { 180 - deg_quad } else { deg_quad };
if y < 0 {
-deg_half
} else {
deg_half
}
} |