From a36d7b613185c28c508bcc7b0e8b580a0ffd5e28 Mon Sep 17 00:00:00 2001 From: Ben Noordhuis Date: Sat, 30 Jun 2018 01:44:54 +0200 Subject: add std.math f16 inf support refs #1122 --- std/math/inf.zig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'std/math/inf.zig') diff --git a/std/math/inf.zig b/std/math/inf.zig index bde90b2be1..62f5ef7c0d 100644 --- a/std/math/inf.zig +++ b/std/math/inf.zig @@ -1,9 +1,9 @@ const std = @import("../index.zig"); const math = std.math; -const assert = std.debug.assert; pub fn inf(comptime T: type) T { return switch (T) { + f16 => @bitCast(f16, math.inf_u16), f32 => @bitCast(f32, math.inf_u32), f64 => @bitCast(f64, math.inf_u64), else => @compileError("inf not implemented for " ++ @typeName(T)), -- cgit v1.2.3