Fix failing test

This commit is contained in:
Iaroslav Postovalov 2021-02-08 18:42:42 +07:00
parent d7c28bfd0c
commit 956ac6b74f
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -1,14 +1,14 @@
package kscience.kmath.complex package kscience.kmath.complex
import kscience.kmath.operations.invoke
import kotlin.math.sqrt import kotlin.math.sqrt
import kotlin.test.Test import kotlin.test.Test
import kotlin.test.assertEquals import kotlin.test.assertEquals
import kotlin.test.assertTrue import kotlin.test.assertTrue
import kscience.kmath.operations.invoke
internal class ComplexTest { internal class ComplexTest {
@Test @Test
fun conjugate() = ComplexField { assertEquals(i * -42, (i * 42).conjugate) } fun conjugate() = ComplexField { assertEquals(i * 42, (i * -42).conjugate) }
@Test @Test
fun reciprocal() = ComplexField { assertTrue((Complex(0.5, -0.0) - 2.toComplex().reciprocal).r < 1e-10) } fun reciprocal() = ComplexField { assertTrue((Complex(0.5, -0.0) - 2.toComplex().reciprocal).r < 1e-10) }