diff --git a/lib/compiler_rt/log2.zig b/lib/compiler_rt/log2.zig index 53f35c9a80..aa294b33fd 100644 --- a/lib/compiler_rt/log2.zig +++ b/lib/compiler_rt/log2.zig @@ -147,7 +147,8 @@ pub fn __log2x(a: f80) callconv(.C) f80 { } pub fn log2q(a: f128) callconv(.C) f128 { - return math.log2(a); + // TODO: more correct implementation + return log2(@floatCast(f64, a)); } pub fn log2l(x: c_longdouble) callconv(.C) c_longdouble {