-
-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
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
Metadata
Metadata
Assignees
Labels
No labels