diff --git a/src/Sema.zig b/src/Sema.zig index 9dd7b1598e..963f7f5489 100644 --- a/src/Sema.zig +++ b/src/Sema.zig @@ -37530,7 +37530,7 @@ fn float128IntPartToBigInt( float: f128, ) !std.math.big.int.Managed { const is_negative = std.math.signbit(float); - const floored = @floor(@fabs(float)); + const floored = @floor(@abs(float)); var rational = try std.math.big.Rational.init(arena); defer rational.q.deinit(); diff --git a/src/arch/x86_64/encoder.zig b/src/arch/x86_64/encoder.zig index bc4c59dc86..0923a43a77 100644 --- a/src/arch/x86_64/encoder.zig +++ b/src/arch/x86_64/encoder.zig @@ -105,7 +105,7 @@ pub const Instruction = struct { try writer.print("{s} ptr [rip", .{@tagName(rip.ptr_size)}); if (rip.disp != 0) try writer.print(" {c} 0x{x}", .{ @as(u8, if (rip.disp < 0) '-' else '+'), - std.math.absCast(rip.disp), + @abs(rip.disp), }); try writer.writeByte(']'); }, @@ -140,7 +140,7 @@ pub const Instruction = struct { try writer.print(" {c} ", .{@as(u8, if (sib.disp < 0) '-' else '+')}) else if (sib.disp < 0) try writer.writeByte('-'); - try writer.print("0x{x}", .{std.math.absCast(sib.disp)}); + try writer.print("0x{x}", .{@abs(sib.disp)}); any = true; } diff --git a/src/value.zig b/src/value.zig index 217430a830..85b49f3e15 100644 --- a/src/value.zig +++ b/src/value.zig @@ -1989,7 +1989,7 @@ pub const Value = struct { return 1; } - const w_value = @fabs(scalar); + const w_value = @abs(scalar); return @divFloor(@as(std.math.big.Limb, @intFromFloat(std.math.log2(w_value))), @typeInfo(std.math.big.Limb).Int.bits) + 1; } @@ -3741,11 +3741,11 @@ pub const Value = struct { .ComptimeFloat, .Float => { const target = mod.getTarget(); const storage: InternPool.Key.Float.Storage = switch (ty.floatBits(target)) { - 16 => .{ .f16 = @fabs(val.toFloat(f16, mod)) }, - 32 => .{ .f32 = @fabs(val.toFloat(f32, mod)) }, - 64 => .{ .f64 = @fabs(val.toFloat(f64, mod)) }, - 80 => .{ .f80 = @fabs(val.toFloat(f80, mod)) }, - 128 => .{ .f128 = @fabs(val.toFloat(f128, mod)) }, + 16 => .{ .f16 = @abs(val.toFloat(f16, mod)) }, + 32 => .{ .f32 = @abs(val.toFloat(f32, mod)) }, + 64 => .{ .f64 = @abs(val.toFloat(f64, mod)) }, + 80 => .{ .f80 = @abs(val.toFloat(f80, mod)) }, + 128 => .{ .f128 = @abs(val.toFloat(f128, mod)) }, else => unreachable, }; return (try mod.intern(.{ .float = .{