use math/float.zig everywhere
This commit is contained in:
@@ -120,7 +120,7 @@ fn exp64(z: Complex(f64)) Complex(f64) {
|
||||
}
|
||||
|
||||
test "complex.cexp32" {
|
||||
const tolerance_f32 = math.sqrt(math.epsilon(f32));
|
||||
const tolerance_f32 = math.sqrt(math.floatEps(f32));
|
||||
|
||||
{
|
||||
const a = Complex(f32).init(5, 3);
|
||||
@@ -140,7 +140,7 @@ test "complex.cexp32" {
|
||||
}
|
||||
|
||||
test "complex.cexp64" {
|
||||
const tolerance_f64 = math.sqrt(math.epsilon(f64));
|
||||
const tolerance_f64 = math.sqrt(math.floatEps(f64));
|
||||
|
||||
{
|
||||
const a = Complex(f64).init(5, 3);
|
||||
|
||||
@@ -79,7 +79,7 @@ fn sinh32(z: Complex(f32)) Complex(f32) {
|
||||
if (iy >= 0x7f800000) {
|
||||
return Complex(f32).init(x * x, x * (y - y));
|
||||
}
|
||||
return Complex(f32).init(x * math.cos(y), math.inf_f32 * math.sin(y));
|
||||
return Complex(f32).init(x * math.cos(y), math.inf(f32) * math.sin(y));
|
||||
}
|
||||
|
||||
return Complex(f32).init((x * x) * (y - y), (x + x) * (y - y));
|
||||
@@ -146,7 +146,7 @@ fn sinh64(z: Complex(f64)) Complex(f64) {
|
||||
if (iy >= 0x7ff00000) {
|
||||
return Complex(f64).init(x * x, x * (y - y));
|
||||
}
|
||||
return Complex(f64).init(x * math.cos(y), math.inf_f64 * math.sin(y));
|
||||
return Complex(f64).init(x * math.cos(y), math.inf(f64) * math.sin(y));
|
||||
}
|
||||
|
||||
return Complex(f64).init((x * x) * (y - y), (x + x) * (y - y));
|
||||
|
||||
Reference in New Issue
Block a user