mirror of
https://github.com/ziglang/zig.git
synced 2024-11-30 09:02:32 +00:00
16 lines
270 B
Zig
16 lines
270 B
Zig
const std = @import("std");
|
|
const big = @as(f64, 1 << 40);
|
|
|
|
export fn foo_strict(x: f64) f64 {
|
|
return x + big - big;
|
|
}
|
|
|
|
export fn foo_optimized(x: f64) f64 {
|
|
@setFloatMode(.optimized);
|
|
return x + big - big;
|
|
}
|
|
|
|
// obj
|
|
// optimize=ReleaseFast
|
|
// disable_cache
|