From 7662685d76bb86b8f3fcc6d5fd67e3ad7529bc00 Mon Sep 17 00:00:00 2001 From: jtlap Date: Sun, 12 Nov 2023 11:18:06 +0100 Subject: [PATCH] h1 correction --- include/kyosu/types/impl/detail/bessel_h.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/kyosu/types/impl/detail/bessel_h.hpp b/include/kyosu/types/impl/detail/bessel_h.hpp index 25fb4fe5..9976f41b 100644 --- a/include/kyosu/types/impl/detail/bessel_h.hpp +++ b/include/kyosu/types/impl/detail/bessel_h.hpp @@ -147,7 +147,7 @@ namespace kyosu::_ auto h0 = if_else(imzlt0, i*exp(miz), -i*exp(-miz))*rz; if(n == 0) return h0; auto h1 = if_else(imzlt0, (rz+i),(rz-i))*h0 ; - if(n == 1) return h1; + if(n == 1) return if_else(imzlt0,h1, -h1); auto h2 = h1; for(int i=1; i < n; ++i)