aboutsummaryrefslogtreecommitdiff
path: root/std/math/nan.zig
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2017-06-19 14:36:33 -0400
committerAndrew Kelley <superjoe30@gmail.com>2017-06-19 14:36:33 -0400
commitc9fc8bd802f5ed52c4cc78b93f18fc5dc9b6bb7f (patch)
tree8ddb992d7c1b4ede1b6a99e32fad16c1a476e0c1 /std/math/nan.zig
parent799c69910172a7248ab9db366e6e3a6556e7d626 (diff)
downloadzig-c9fc8bd802f5ed52c4cc78b93f18fc5dc9b6bb7f.tar.gz
zig-c9fc8bd802f5ed52c4cc78b93f18fc5dc9b6bb7f.zip
workaround for llvm bug
See #393 for details
Diffstat (limited to 'std/math/nan.zig')
-rw-r--r--std/math/nan.zig4
1 files changed, 3 insertions, 1 deletions
diff --git a/std/math/nan.zig b/std/math/nan.zig
index bd079026a5..7dc175a61b 100644
--- a/std/math/nan.zig
+++ b/std/math/nan.zig
@@ -1,6 +1,8 @@
const math = @import("index.zig");
-pub fn nan(comptime T: type) -> T {
+pub const nan = nan_workaround;
+
+pub fn nan_workaround(comptime T: type) -> T {
switch (T) {
f32 => @bitCast(f32, math.nan_u32),
f64 => @bitCast(f64, math.nan_u64),