| Add the differential test runner, and a lowering to measure with it 8ac32af nandithebull 20h ago | 1 | // The exact expression from base16ct 1.0.0 that the other transpiler's |
| 2 | // float64 universal AST cannot represent. Milestone 1 in miniature. |
| 3 | fn decode_nibble(src: u8) -> i16 { |
| 4 | let byte = src as i16; |
| 5 | let mut ret: i16 = -1; |
| 6 | ret += (((0x2fi16 - byte) & (byte - 0x3a)) >> 8) & (byte - 47); |
| 7 | ret += (((0x60i16 - byte) & (byte - 0x67)) >> 8) & (byte - 86); |
| 8 | ret |
| 9 | } |
| 10 | |
| 11 | fn main() { |
| 12 | let mut i: u8 = 0; |
| 13 | while i < 128 { |
| 14 | print!("{} ", decode_nibble(i)); |
| 15 | i += 1; |
| 16 | } |
| 17 | println!(""); |
| 18 | } |