nandi/rustnimpublic Fork 0
12c0a01b02392b18af24b583ba4ff65ad040e86a
Commits
Clone
git clone https://git.rickub.com/nandi/rustnim.git
git clone ssh://git@rickub.com/nandi/rustnim.git

Host key fingerprint (ed25519): SHA256:iycHnxEyq0Q7uyVpB7JlznP0G7JrTPXLYRcAU5CSLhc — verify it before your first connect.

009-div-mod-negative.rs · 6 lines · 213 BRust Blame HistoryRaw
Add the differential test runner, and a lowering to measure with it 8ac32af nandithebull 20h ago1// Both languages truncate toward zero. `/` must become `div`, not `/`.
2fn main() {
3 println!("{} {}", -7i32 / 2, -7i32 % 2);
4 println!("{} {}", 7i32 / -2, 7i32 % -2);
5 println!("{}", 7.0f64 / 2.0f64);
6}