@@ -139,7 +139,6 @@ bimg = randn(n,2)/2
139139 A = zeros (eltya,1 ,1 )
140140 A[1 ,1 ] = α
141141 @test diagm (α) == A # Test behavior of `diagm` when passed a scalar
142- @test expm (α) == exp (α) # `expm` should behave like `exp` with scalar argument
143142 end
144143
145144 @testset " Factorize" begin
416415 eA1 = convert (Matrix{elty}, [147.866622446369 127.781085523181 127.781085523182 ;
417416 183.765138646367 183.765138646366 163.679601723179 ;
418417 71.797032399996 91.8825693231832 111.968106246371 ]' )
419- @test expm (A1) ≈ eA1
418+ @test exp (A1) ≈ eA1
420419
421420 A2 = convert (Matrix{elty},
422421 [29.87942128909879 0.7815750847907159 - 2.289519314033932 ;
@@ -426,21 +425,21 @@ end
426425 [ 5496313853692458.0 - 18231880972009236.0 - 30475770808580460.0 ;
427426 - 18231880972009252.0 60605228702221920.0 101291842930249760.0 ;
428427 - 30475770808580480.0 101291842930249728.0 169294411240851968.0 ])
429- @test expm (A2) ≈ eA2
428+ @test exp (A2) ≈ eA2
430429
431430 A3 = convert (Matrix{elty}, [- 131 19 18 ;- 390 56 54 ;- 387 57 52 ])
432431 eA3 = convert (Matrix{elty}, [- 1.50964415879218 - 5.6325707998812 - 4.934938326092 ;
433432 0.367879439109187 1.47151775849686 1.10363831732856 ;
434433 0.135335281175235 0.406005843524598 0.541341126763207 ]' )
435- @test expm (A3) ≈ eA3
434+ @test exp (A3) ≈ eA3
436435
437436 A4 = convert (Matrix{elty}, [0.25 0.25 ; 0 0 ])
438437 eA4 = convert (Matrix{elty}, [1.2840254166877416 0.2840254166877415 ; 0 1 ])
439- @test expm (A4) ≈ eA4
438+ @test exp (A4) ≈ eA4
440439
441440 A5 = convert (Matrix{elty}, [0 0.02 ; 0 0 ])
442441 eA5 = convert (Matrix{elty}, [1 0.02 ; 0 1 ])
443- @test expm (A5) ≈ eA5
442+ @test exp (A5) ≈ eA5
444443
445444 # Hessenberg
446445 @test hessfact (A1)[:H ] ≈ convert (Matrix{elty},
@@ -454,20 +453,20 @@ end
454453 1 / 3 1 / 4 1 / 5 1 / 6 ;
455454 1 / 4 1 / 5 1 / 6 1 / 7 ;
456455 1 / 5 1 / 6 1 / 7 1 / 8 ])
457- @test expm (logm (A4)) ≈ A4
456+ @test exp (logm (A4)) ≈ A4
458457
459458 A5 = convert (Matrix{elty}, [1 1 0 1 ; 0 1 1 0 ; 0 0 1 1 ; 1 0 0 1 ])
460- @test expm (logm (A5)) ≈ A5
459+ @test exp (logm (A5)) ≈ A5
461460
462461 A6 = convert (Matrix{elty}, [- 5 2 0 0 ; 1 / 2 - 7 3 0 ; 0 1 / 3 - 9 4 ; 0 0 1 / 4 - 11 ])
463- @test expm (logm (A6)) ≈ A6
462+ @test exp (logm (A6)) ≈ A6
464463
465464 A7 = convert (Matrix{elty}, [1 0 0 1e-8 ; 0 1 0 0 ; 0 0 1 0 ; 0 0 0 1 ])
466- @test expm (logm (A7)) ≈ A7
465+ @test exp (logm (A7)) ≈ A7
467466 end
468467
469468 A8 = 100 * [- 1 + 1im 0 0 1e-8 ; 0 1 0 0 ; 0 0 1 0 ; 0 0 0 1 ]
470- @test expm (logm (A8)) ≈ A8
469+ @test exp (logm (A8)) ≈ A8
471470end
472471
473472@testset " issue 5116" begin
@@ -476,19 +475,19 @@ end
476475 0.006540706968939 - 0.999786072879326 0.0 0.0
477476 0.0 0.0 1.0 0.0
478477 0.013081413937878 - 3.999572145758650 0.0 1.0 ]
479- @test expm (A9) ≈ eA9
478+ @test exp (A9) ≈ eA9
480479
481480 A10 = [ 0. 0. 0. 0. ; 0. 0. - im 0. ; 0. im 0. 0. ; 0. 0. 0. 0. ]
482481 eA10 = [ 1.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im
483482 0.0 + 0.0im 1.543080634815244 + 0.0im 0.0 - 1.175201193643801im 0.0 + 0.0im
484483 0.0 + 0.0im 0.0 + 1.175201193643801im 1.543080634815243 + 0.0im 0.0 + 0.0im
485484 0.0 + 0.0im 0.0 + 0.0im 0.0 + 0.0im 1.0 + 0.0im ]
486- @test expm (A10) ≈ eA10
485+ @test exp (A10) ≈ eA10
487486end
488487
489488@testset " Additional matrix logarithm tests" for elty in (Float64, Complex{Float64})
490489 A11 = convert (Matrix{elty}, [3 2 ; - 5 - 3 ])
491- @test expm (logm (A11)) ≈ A11
490+ @test exp (logm (A11)) ≈ A11
492491
493492 A12 = convert (Matrix{elty}, [1 - 1 ; 1 - 1 ])
494493 @test typeof (logm (A12)) == Array{Complex{Float64}, 2 }
498497 0.2310490602 1.295566591 0.2651438179 ;
499498 0.2310490602 0.1969543025 1.363756107 ])
500499 @test logm (A1) ≈ logmA1
501- @test expm (logm (A1)) ≈ A1
500+ @test exp (logm (A1)) ≈ A1
502501
503502 A4 = convert (Matrix{elty}, [1 / 2 1 / 3 1 / 4 1 / 5 + eps ();
504503 1 / 3 1 / 4 1 / 5 1 / 6 ;
509508 0.4462766564 2.994142974 - 7.351095988 3.318413247 ;
510509 0.2414170219 0.5865285289 3.318413247 - 5.444632124 ])
511510 @test logm (A4) ≈ logmA4
512- @test expm (logm (A4)) ≈ A4
511+ @test exp (logm (A4)) ≈ A4
513512end
514513
515514@testset " issue #7181" begin
615614
616615@testset " test ops on Numbers for $elty " for elty in [Float32,Float64,Complex64,Complex128]
617616 a = rand (elty)
618- @test expm (a) == exp (a)
617+ @test exp (a) == exp (a)
619618 @test isposdef (one (elty))
620619 @test sqrtm (a) == sqrt (a)
621620 @test logm (a) ≈ log (a)
0 commit comments