-
-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Closed
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior
Milestone
Description
Zig Version
0.11.0-dev.1863+a63134a4a
Steps to Reproduce and Observed Behavior
Run this code on debug mode.
const print = @import("std").debug.print;
pub fn main() void {
const original: u256 = 99999999999999999999000000000000000000000;
const divisor: u256 = 10000000000000000000000000000000000000000;
print("Division operation: {} (correct)\n", .{original / divisor});
var num = original;
num /= divisor;
print("Division asignment: {}\n", .{num});
}It outputs:
Division operation: 9 (correct)
Division asignment: 10
Expected Behavior
I expected both operations to behave the same way just like in any release mode.
Metadata
Metadata
Assignees
Labels
bugObserved behavior contradicts documented or intended behaviorObserved behavior contradicts documented or intended behavior