mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
all: use operator overloading on strings (p. 2) (#10183)
This commit is contained in:
@ -169,11 +169,11 @@ fn test_complex_mulinv() {
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
println(c2.str())
|
||||
println(result.str())
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.12, -0.16)
|
||||
result = c1.mulinv()
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.2, 0.4)
|
||||
result = c1.mulinv()
|
||||
@ -201,17 +201,17 @@ fn test_complex_pow() {
|
||||
mut c2 := cmplx.complex(-24.0, 70.0)
|
||||
mut result := c1.pow(2)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(117, 44)
|
||||
result = c1.pow(3)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-7, -24)
|
||||
result = c1.pow(4)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_root() {
|
||||
@ -220,17 +220,17 @@ fn test_complex_root() {
|
||||
mut c2 := cmplx.complex(2.607904, 1.342074)
|
||||
mut result := c1.root(2)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(1.264953, 1.150614)
|
||||
result = c1.root(3)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(1.068059, -0.595482)
|
||||
result = c1.root(4)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_exp() {
|
||||
@ -239,17 +239,17 @@ fn test_complex_exp() {
|
||||
mut c2 := cmplx.complex(111.889015, 97.505457)
|
||||
mut result := c1.exp()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.032543, -0.037679)
|
||||
result = c1.exp()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.153092, -0.334512)
|
||||
result = c1.exp()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_ln() {
|
||||
@ -258,17 +258,17 @@ fn test_complex_ln() {
|
||||
mut c2 := cmplx.complex(2.152033, 0.950547)
|
||||
mut result := c1.ln()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(1.609438, 2.214297)
|
||||
result = c1.ln()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(0.804719, -2.034444)
|
||||
result = c1.ln()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_arg() {
|
||||
@ -297,19 +297,19 @@ fn test_complex_log() {
|
||||
mut c2 := cmplx.complex(0.232873, -1.413175)
|
||||
mut result := c1.log(b1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
b1 = cmplx.complex(3, -1)
|
||||
c2 = cmplx.complex(0.152198, -0.409312)
|
||||
result = c1.log(b1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
b1 = cmplx.complex(0, 9)
|
||||
c2 = cmplx.complex(-0.298243, 1.197981)
|
||||
result = c1.log(b1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_cpow() {
|
||||
@ -319,19 +319,19 @@ fn test_complex_cpow() {
|
||||
mut c2 := cmplx.complex(11.022341, -0.861785)
|
||||
mut result := c1.cpow(r1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
r1 = cmplx.complex(-4, -2)
|
||||
c2 = cmplx.complex(0.118303, 0.063148)
|
||||
result = c1.cpow(r1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
r1 = cmplx.complex(8, -9)
|
||||
c2 = cmplx.complex(-0.000000, 0.000007)
|
||||
result = c1.cpow(r1)
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_sin() {
|
||||
@ -340,17 +340,17 @@ fn test_complex_sin() {
|
||||
mut c2 := cmplx.complex(-525.794515, 155.536550)
|
||||
mut result := c1.sin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-3.853738, -27.016813)
|
||||
result = c1.sin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-3.165779, -1.959601)
|
||||
result = c1.sin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_cos() {
|
||||
@ -359,17 +359,17 @@ fn test_complex_cos() {
|
||||
mut c2 := cmplx.complex(155.536809, 525.793641)
|
||||
mut result := c1.cos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-27.034946, 3.851153)
|
||||
result = c1.cos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(2.032723, -3.051898)
|
||||
result = c1.cos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_tan() {
|
||||
@ -378,17 +378,17 @@ fn test_complex_tan() {
|
||||
mut c2 := cmplx.complex(-0.000001, 1.000001)
|
||||
mut result := c1.tan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(0.000187, 0.999356)
|
||||
result = c1.tan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.033813, -1.014794)
|
||||
result = c1.tan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_cot() {
|
||||
@ -397,17 +397,17 @@ fn test_complex_cot() {
|
||||
mut c2 := cmplx.complex(-0.000001, -0.999999)
|
||||
mut result := c1.cot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(0.000188, -1.000644)
|
||||
result = c1.cot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.032798, 0.984329)
|
||||
result = c1.cot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_sec() {
|
||||
@ -416,17 +416,17 @@ fn test_complex_sec() {
|
||||
mut c2 := cmplx.complex(0.000517, -0.001749)
|
||||
mut result := c1.sec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.036253, -0.005164)
|
||||
result = c1.sec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(0.151176, 0.226974)
|
||||
result = c1.sec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_csc() {
|
||||
@ -435,17 +435,17 @@ fn test_complex_csc() {
|
||||
mut c2 := cmplx.complex(-0.001749, -0.000517)
|
||||
mut result := c1.csc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.005174, 0.036276)
|
||||
result = c1.csc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.228375, 0.141363)
|
||||
result = c1.csc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_asin() {
|
||||
@ -454,17 +454,17 @@ fn test_complex_asin() {
|
||||
mut c2 := cmplx.complex(0.617064, 2.846289)
|
||||
mut result := c1.asin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.633984, 2.305509)
|
||||
result = c1.asin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.427079, -1.528571)
|
||||
result = c1.asin()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_acos() {
|
||||
@ -473,17 +473,17 @@ fn test_complex_acos() {
|
||||
mut c2 := cmplx.complex(0.953732, -2.846289)
|
||||
mut result := c1.acos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(2.204780, -2.305509)
|
||||
result = c1.acos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(1.997875, 1.528571)
|
||||
result = c1.acos()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_atan() {
|
||||
@ -492,17 +492,17 @@ fn test_complex_atan() {
|
||||
mut c2 := cmplx.complex(1.502727, 0.094441)
|
||||
mut result := c1.atan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-1.448307, 0.158997)
|
||||
result = c1.atan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-1.338973, -0.402359)
|
||||
result = c1.atan()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_acot() {
|
||||
@ -511,17 +511,17 @@ fn test_complex_acot() {
|
||||
mut c2 := cmplx.complex(0.068069, -0.094441)
|
||||
mut result := c1.acot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.122489, -0.158997)
|
||||
result = c1.acot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.231824, 0.402359)
|
||||
result = c1.acot()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_asec() {
|
||||
@ -530,17 +530,17 @@ fn test_complex_asec() {
|
||||
mut c2 := cmplx.complex(1.503480, 0.094668)
|
||||
mut result := c1.asec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(1.689547, 0.160446)
|
||||
result = c1.asec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(1.757114, -0.396568)
|
||||
result = c1.asec()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_acsc() {
|
||||
@ -549,17 +549,17 @@ fn test_complex_acsc() {
|
||||
mut c2 := cmplx.complex(0.067317, -0.094668)
|
||||
mut result := c1.acsc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.118751, -0.160446)
|
||||
result = c1.acsc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.186318, 0.396568)
|
||||
result = c1.acsc()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_sinh() {
|
||||
@ -568,17 +568,17 @@ fn test_complex_sinh() {
|
||||
mut c2 := cmplx.complex(55.941968, 48.754942)
|
||||
mut result := c1.sinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(6.548120, -7.619232)
|
||||
result = c1.sinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(0.489056, -1.403119)
|
||||
result = c1.sinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_cosh() {
|
||||
@ -587,17 +587,17 @@ fn test_complex_cosh() {
|
||||
mut c2 := cmplx.complex(55.947047, 48.750515)
|
||||
mut result := c1.cosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-6.580663, 7.581553)
|
||||
result = c1.cosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.642148, 1.068607)
|
||||
result = c1.cosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_tanh() {
|
||||
@ -606,17 +606,17 @@ fn test_complex_tanh() {
|
||||
mut c2 := cmplx.complex(0.999988, 0.000090)
|
||||
mut result := c1.tanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-1.000710, 0.004908)
|
||||
result = c1.tanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-1.166736, 0.243458)
|
||||
result = c1.tanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_coth() {
|
||||
@ -625,17 +625,17 @@ fn test_complex_coth() {
|
||||
mut c2 := cmplx.complex(1.000012, -0.000090)
|
||||
mut result := c1.coth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.999267, -0.004901)
|
||||
result = c1.coth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.821330, -0.171384)
|
||||
result = c1.coth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_sech() {
|
||||
@ -644,17 +644,17 @@ fn test_complex_sech() {
|
||||
mut c2 := cmplx.complex(0.010160, -0.008853)
|
||||
mut result := c1.sech()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.065294, -0.075225)
|
||||
result = c1.sech()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.413149, -0.687527)
|
||||
result = c1.sech()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_csch() {
|
||||
@ -663,17 +663,17 @@ fn test_complex_csch() {
|
||||
mut c2 := cmplx.complex(0.010159, -0.008854)
|
||||
mut result := c1.csch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(0.064877, 0.075490)
|
||||
result = c1.csch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(0.221501, 0.635494)
|
||||
result = c1.csch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_asinh() {
|
||||
@ -682,17 +682,17 @@ fn test_complex_asinh() {
|
||||
mut c2 := cmplx.complex(2.844098, 0.947341)
|
||||
mut result := c1.asinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-2.299914, 0.917617)
|
||||
result = c1.asinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-1.469352, -1.063440)
|
||||
result = c1.asinh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_acosh() {
|
||||
@ -701,17 +701,17 @@ fn test_complex_acosh() {
|
||||
mut c2 := cmplx.complex(2.846289, 0.953732)
|
||||
mut result := c1.acosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(2.305509, 2.204780)
|
||||
result = c1.acosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(1.528571, -1.997875)
|
||||
result = c1.acosh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_atanh() {
|
||||
@ -720,17 +720,17 @@ fn test_complex_atanh() {
|
||||
mut c2 := cmplx.complex(0.067066, 1.476056)
|
||||
mut result := c1.atanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.117501, 1.409921)
|
||||
result = c1.atanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.173287, -1.178097)
|
||||
result = c1.atanh()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_acoth() {
|
||||
@ -739,17 +739,17 @@ fn test_complex_acoth() {
|
||||
mut c2 := cmplx.complex(0.067066, -0.094740)
|
||||
mut result := c1.acoth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.117501, -0.160875)
|
||||
result = c1.acoth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.173287, 0.392699)
|
||||
result = c1.acoth()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
// fn test_complex_asech() {
|
||||
@ -758,17 +758,17 @@ fn test_complex_acoth() {
|
||||
// mut c2 := cmplx.complex(0.094668,-1.503480)
|
||||
// mut result := c1.asech()
|
||||
// // Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
// assert result.str().eq(c2.str())
|
||||
// assert result.str() == c2.str()
|
||||
// c1 = cmplx.complex(-3,4)
|
||||
// c2 = cmplx.complex(0.160446,-1.689547)
|
||||
// result = c1.asech()
|
||||
// // Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
// assert result.str().eq(c2.str())
|
||||
// assert result.str() c2.str()
|
||||
// c1 = cmplx.complex(-1,-2)
|
||||
// c2 = cmplx.complex(0.396568,1.757114)
|
||||
// result = c1.asech()
|
||||
// // Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
// assert result.str().eq(c2.str())
|
||||
// assert result.str() == c2.str()
|
||||
// }
|
||||
|
||||
fn test_complex_acsch() {
|
||||
@ -777,17 +777,17 @@ fn test_complex_acsch() {
|
||||
mut c2 := cmplx.complex(0.067819, -0.094518)
|
||||
mut result := c1.acsch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-3, 4)
|
||||
c2 = cmplx.complex(-0.121246, -0.159507)
|
||||
result = c1.acsch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
c1 = cmplx.complex(-1, -2)
|
||||
c2 = cmplx.complex(-0.215612, 0.401586)
|
||||
result = c1.acsch()
|
||||
// Some issue with precision comparison in f64 using == operator hence serializing to string
|
||||
assert result.str().eq(c2.str())
|
||||
assert result.str() == c2.str()
|
||||
}
|
||||
|
||||
fn test_complex_re_im() {
|
||||
|
Reference in New Issue
Block a user