From ac54fe909df938234d16c1796940cf89e4b97651 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Thu, 7 Oct 2021 12:40:52 +0200 Subject: [PATCH] inverse_exp more precise for very small vectors --- hyperpoint.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/hyperpoint.cpp b/hyperpoint.cpp index ea82109c..b284a89f 100644 --- a/hyperpoint.cpp +++ b/hyperpoint.cpp @@ -1468,6 +1468,8 @@ constexpr flagtype pNORMAL = 0; EX hyperpoint inverse_exp(const shiftpoint h, flagtype prec IS(pNORMAL)) { #if CAP_SOLV if(sn::in()) { + /* this will be more precise for use in set_view in intra */ + if(sqhypot_d(3, h.h) < 2e-9) return h.h - C0; if(nih) return sn::get_inverse_exp_nsym(h.h, prec); else