Zig Version
0.17.0-dev.135+9df02121d
Steps to Reproduce and Observed Behavior
compiles successfully:
test{varfoo:f32=32;_=&foo;constbar:u32=@intFromFloat(@floor(foo));_=bar;}compile error:
test{varfoo:f32=32;_=&foo;constbar:u32=@trunc(@floor(foo));_=bar;}a.zig:5:36: error: unable to resolve comptime value
const bar: u32 = @trunc(@floor(foo));
^~~
a.zig:5:36: note: value casted to 'comptime_float' must be comptime-known
Expected Behavior
same behavior for both
### Zig Version
0.17.0-dev.135+9df02121d
### Steps to Reproduce and Observed Behavior
compiles successfully:
```zig
test {
var foo: f32 = 32;
_ = &foo;
const bar: u32 = @intFromFloat(@floor(foo));
_ = bar;
}
```
compile error:
```zig
test {
var foo: f32 = 32;
_ = &foo;
const bar: u32 = @trunc(@floor(foo));
_ = bar;
}
```
```
a.zig:5:36: error: unable to resolve comptime value
const bar: u32 = @trunc(@floor(foo));
^~~
a.zig:5:36: note: value casted to 'comptime_float' must be comptime-known
```
### Expected Behavior
same behavior for both