From f9580d29f643cbbb1c6ec55c2baa285d1c845d80 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Wed, 25 Mar 2020 13:44:51 +0100 Subject: [PATCH] fixed a bug in inverse_exp in Solv (caused wobbling) --- nonisotropic.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/nonisotropic.cpp b/nonisotropic.cpp index bb9a4925..689aecd3 100644 --- a/nonisotropic.cpp +++ b/nonisotropic.cpp @@ -558,8 +558,8 @@ EX namespace sn { ld ix = h[0] >= 0. ? sn::x_to_ix(h[0]) : sn::x_to_ix(-h[0]); ld iy = h[1] >= 0. ? sn::x_to_ix(h[1]) : sn::x_to_ix(-h[1]); - ld iz = tanh(h[2]); - + ld iz = sn::z_to_iz(h[2]); + if(h[2] < 0.) { iz = -iz; swap(ix, iy); } hyperpoint res = s.get(ix, iy, iz, lazy); @@ -579,7 +579,7 @@ EX namespace sn { ld ix = h[0] >= 0. ? sn::x_to_ix(h[0]) : sn::x_to_ix(-h[0]); ld iy = h[1] >= 0. ? sn::x_to_ix(h[1]) : sn::x_to_ix(-h[1]); - ld iz = (tanh(h[2]/4)+1)/2; + ld iz = sn::z_to_iz(h[2]); hyperpoint res = s.get(ix, iy, iz, lazy);