mirror of
https://github.com/holub/mame
synced 2025-04-23 17:00:53 +03:00
fix compile on MSVC2012 (nw)
This commit is contained in:
parent
e5e01fc725
commit
88f2f9d65d
@ -234,7 +234,7 @@ public:
|
||||
{
|
||||
nl_double a = (nVd - m_Vd) * m_VtInv;
|
||||
if (a<1e-12 - 1.0) a = 1e-12 - 1.0;
|
||||
m_Vd = m_Vd + log1p(a) * m_Vt;
|
||||
m_Vd = m_Vd + nl_math::e_log1p(a) * m_Vt;
|
||||
|
||||
const nl_double eVDVt = nl_math::exp(m_Vd * m_VtInv);
|
||||
m_Id = m_Is * (eVDVt - 1.0);
|
||||
|
@ -54,8 +54,8 @@ public:
|
||||
ATTR_HOT inline static double log(const double x) { return std::log(x); }
|
||||
ATTR_HOT inline static float log(const float x) { return std::log(x); }
|
||||
#if defined(_MSC_VER) && _MSC_VER < 1800
|
||||
ATTR_HOT inline static double log1p(const double x) { return nl_math::log(1.0 + x); }
|
||||
ATTR_HOT inline static float log1p(const float x) { return nl_math::log(1.0 + x); }
|
||||
ATTR_HOT inline static double e_log1p(const double x) { return nl_math::log(1.0 + x); }
|
||||
ATTR_HOT inline static float e_log1p(const float x) { return nl_math::log(1.0 + x); }
|
||||
#else
|
||||
ATTR_HOT inline static double e_log1p(const double x) { return log1p(x); }
|
||||
ATTR_HOT inline static float e_log1p(const float x) { return log1pf(x); }
|
||||
|
Loading…
Reference in New Issue
Block a user