Zig Version
0.17.0-dev.256+04481c76c
Steps to Reproduce and Observed Behavior
The following program tests the softfloat implementation of a disvison of f32 against its hardware equivalent.
const std = @import("std");
const divdf3_impl = @import("lib/compiler_rt/divdf3.zig");
fn test_divdf3(a: f64, b: f64) !void {
const result = divdf3_impl.__divdf3(a, b);
const expected = a / b;
if (result != expected) {
return error.TestFailed;
}
}
pub fn main() !void {
try test_divdf3(0x1p-1022, 0x1p52);
try test_divdf3(-0x1p-1022, 0x1p52);
try test_divdf3(0x1p-1022, -0x1p52);
std.debug.print("All tests passed!\n", .{});
}
Expected Behavior
That the softfloat implementation of disvison of f32 has the same result as hardware implmentations.
The atan2 implementation of libc can't pass the libc test suite otherwise.
### Zig Version
0.17.0-dev.256+04481c76c
### Steps to Reproduce and Observed Behavior
The following program tests the softfloat implementation of a disvison of f32 against its hardware equivalent.
```
const std = @import("std");
const divdf3_impl = @import("lib/compiler_rt/divdf3.zig");
fn test_divdf3(a: f64, b: f64) !void {
const result = divdf3_impl.__divdf3(a, b);
const expected = a / b;
if (result != expected) {
return error.TestFailed;
}
}
pub fn main() !void {
try test_divdf3(0x1p-1022, 0x1p52);
try test_divdf3(-0x1p-1022, 0x1p52);
try test_divdf3(0x1p-1022, -0x1p52);
std.debug.print("All tests passed!\n", .{});
}
```
### Expected Behavior
That the softfloat implementation of disvison of f32 has the same result as hardware implmentations.
The atan2 implementation of libc can't pass the libc test suite otherwise.