1
0
mirror of https://github.com/zenorogue/hyperrogue.git synced 2024-12-20 23:50:27 +00:00

inverse_exp more precise for very small vectors

This commit is contained in:
Zeno Rogue 2021-10-07 12:40:52 +02:00
parent 8bdf5aa404
commit ac54fe909d

View File

@ -1468,6 +1468,8 @@ constexpr flagtype pNORMAL = 0;
EX hyperpoint inverse_exp(const shiftpoint h, flagtype prec IS(pNORMAL)) { EX hyperpoint inverse_exp(const shiftpoint h, flagtype prec IS(pNORMAL)) {
#if CAP_SOLV #if CAP_SOLV
if(sn::in()) { 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) if(nih)
return sn::get_inverse_exp_nsym(h.h, prec); return sn::get_inverse_exp_nsym(h.h, prec);
else else