diff options
| author | Andrew Kelley <superjoe30@gmail.com> | 2018-10-26 14:59:58 -0400 |
|---|---|---|
| committer | Andrew Kelley <superjoe30@gmail.com> | 2018-10-26 15:01:51 -0400 |
| commit | 2b395d4ede2d8ef356c54e1c7c09da88c634be11 (patch) | |
| tree | ddb9806afc26bc55554e20066b29d076bec71f79 /std/math/isfinite.zig | |
| parent | 40b7652a6da135aed68a0067f2de60b8b276713c (diff) | |
| download | zig-2b395d4ede2d8ef356c54e1c7c09da88c634be11.tar.gz zig-2b395d4ede2d8ef356c54e1c7c09da88c634be11.zip | |
remove @minValue,@maxValue; add std.math.minInt,maxInt
closes #1466
closes #1476
Diffstat (limited to 'std/math/isfinite.zig')
| -rw-r--r-- | std/math/isfinite.zig | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/std/math/isfinite.zig b/std/math/isfinite.zig index 3a5d4f01bb..bdfdff8f9f 100644 --- a/std/math/isfinite.zig +++ b/std/math/isfinite.zig @@ -1,6 +1,7 @@ const std = @import("../index.zig"); const math = std.math; const assert = std.debug.assert; +const maxInt = std.math.maxInt; pub fn isFinite(x: var) bool { const T = @typeOf(x); @@ -15,7 +16,7 @@ pub fn isFinite(x: var) bool { }, f64 => { const bits = @bitCast(u64, x); - return bits & (@maxValue(u64) >> 1) < (0x7FF << 52); + return bits & (maxInt(u64) >> 1) < (0x7FF << 52); }, else => { @compileError("isFinite not implemented for " ++ @typeName(T)); |
