polish windows and erfinv

This commit is contained in:
Dun Liang 2021-11-04 20:43:54 +08:00
parent a1a82f6b2c
commit 5695a2e61f
3 changed files with 6 additions and 3 deletions

View File

@ -9,7 +9,7 @@
# file 'LICENSE.txt', which is part of this source code package. # file 'LICENSE.txt', which is part of this source code package.
# *************************************************************** # ***************************************************************
__version__ = '1.3.1.16' __version__ = '1.3.1.17'
from jittor_utils import lock from jittor_utils import lock
with lock.lock_scope(): with lock.lock_scope():
ori_int = int ori_int = int

View File

@ -935,6 +935,9 @@ with jit_utils.import_scope(import_flags):
jit_utils.try_import_jit_utils_core() jit_utils.try_import_jit_utils_core()
jittor_path = find_jittor_path() jittor_path = find_jittor_path()
if os.name == 'nt':
# prevent windows recompile
jittor_path = jittor_path.lower()
check_debug_flags() check_debug_flags()
sys.path.append(cache_path) sys.path.append(cache_path)

View File

@ -44,8 +44,8 @@ Date: February 1996
x = std::copysign(num, y) / dem; x = std::copysign(num, y) / dem;
} }
/* Two steps of Newton-Raphson correction */ /* Two steps of Newton-Raphson correction */
x = x - (std::erf(x) - y) / ((static_cast<T>(2.0)/static_cast<T>(std::sqrt(M_PI)))*std::exp(-x*x)); x = x - (std::erf(x) - y) / ((static_cast<T>(2.0)/static_cast<T>(std::sqrt(3.14159265358979323846)))*std::exp(-x*x));
x = x - (std::erf(x) - y) / ((static_cast<T>(2.0)/static_cast<T>(std::sqrt(M_PI)))*std::exp(-x*x)); x = x - (std::erf(x) - y) / ((static_cast<T>(2.0)/static_cast<T>(std::sqrt(3.14159265358979323846)))*std::exp(-x*x));
return x; return x;
} }