compiler-rt: math functions reorg
* unify the logic for exporting math functions from compiler-rt,
with the appropriate suffixes and prefixes.
- add all missing f128 and f80 exports. Functions with missing
implementations call other functions and have TODO comments.
- also add f16 functions
* move math functions from freestanding libc to compiler-rt (#7265)
* enable all the f128 and f80 code in the stage2 compiler and behavior
tests (#11161).
* update std lib to use builtins rather than `std.math`.
This commit is contained in:
@@ -265,7 +265,7 @@ pub fn expectApproxEqRel(expected: anytype, actual: @TypeOf(expected), tolerance
|
||||
test "expectApproxEqRel" {
|
||||
inline for ([_]type{ f16, f32, f64, f128 }) |T| {
|
||||
const eps_value = comptime math.epsilon(T);
|
||||
const sqrt_eps_value = comptime math.sqrt(eps_value);
|
||||
const sqrt_eps_value = comptime @sqrt(eps_value);
|
||||
|
||||
const pos_x: T = 12.0;
|
||||
const pos_y: T = pos_x + 2 * eps_value;
|
||||
|
||||
Reference in New Issue
Block a user