nandi/rustnimpublic Fork 0
5fdd5be9905d7aab2a8941bef4846c2ffb79c765
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.

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