floats and range
Open
- Dominant language
- Zig
- Stars
- 83
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Description
```zig
const std = @import("std");
const it = @import("ziter.zig");
fn add(a: f32, b: f32) f32 { return a + b; }
test "f32, 0, 1, 0.1" {
const result = it.range_ex(f32, 0, 1, 0.1)
.call(it.fold, .{@as(f32, 0), add});
std.debug.print("result = {}\n", .{result});
}
test "f32, 0, 1, 0.3" {
const result = it.range_ex(f32, 0, 1, 0.3)
.call(it.fold, .{@as(f32, 0), add});
std.debug.print("result = {}\n", .{result});
}
```
`test "f32, 0, 1, 0.1"... result = 4.5e+00` //correct
`test "f32, 0, 1, 0.3"... result = 1.80000007e+00` //incorrect
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.