From ad9e32ea98a5500790fd1ebb8e8b1617aa6e175e Mon Sep 17 00:00:00 2001 From: Jiri Pittner Date: Fri, 8 Jul 2022 11:36:04 +0200 Subject: [PATCH] expi(A) = exp(i A) function --- matexp.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/matexp.h b/matexp.h index 100da1c..3e0bcc8 100644 --- a/matexp.h +++ b/matexp.h @@ -379,6 +379,15 @@ for(int i=0; i +NRMat > expi(const NRMat &x) +{ +NRMat r,i; +sincos(i,r,x); +return complexify(r,i); +} + //this simple implementation seems not to be numerically stable enough