mirror of https://github.com/Jittor/Jittor
polish windows and erfinv
This commit is contained in:
parent
a1a82f6b2c
commit
5695a2e61f
|
@ -9,7 +9,7 @@
|
|||
# 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
|
||||
with lock.lock_scope():
|
||||
ori_int = int
|
||||
|
|
|
@ -935,6 +935,9 @@ with jit_utils.import_scope(import_flags):
|
|||
jit_utils.try_import_jit_utils_core()
|
||||
|
||||
jittor_path = find_jittor_path()
|
||||
if os.name == 'nt':
|
||||
# prevent windows recompile
|
||||
jittor_path = jittor_path.lower()
|
||||
check_debug_flags()
|
||||
|
||||
sys.path.append(cache_path)
|
||||
|
|
|
@ -44,8 +44,8 @@ Date: February 1996
|
|||
x = std::copysign(num, y) / dem;
|
||||
}
|
||||
/* 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(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(3.14159265358979323846)))*std::exp(-x*x));
|
||||
|
||||
return x;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue