summaryrefslogtreecommitdiffstatshomepage
path: root/src/lib/netlist/nl_setup.cpp
diff options
context:
space:
mode:
author couriersud <couriersud@gmx.org>2019-11-03 15:08:41 +0100
committer couriersud <couriersud@gmx.org>2019-11-03 15:25:01 +0100
commit34ccb11c536056deeb8ec3b2c36aeb064f70f844 (patch)
tree6ab710fb000703517636b78d1024809994d5e224 /src/lib/netlist/nl_setup.cpp
parent36c17abc7993de82454ac45d7193ae6e6f2f9455 (diff)
netlist: Completed __float128 support. [Couriersud]
Both compiling the core and the shaders with __float128 now work. The support was added to be ready to deal with academic edge cases. Performance drops to 10% of double - thus disabled by default.
Diffstat (limited to 'src/lib/netlist/nl_setup.cpp')
-rw-r--r--src/lib/netlist/nl_setup.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/netlist/nl_setup.cpp b/src/lib/netlist/nl_setup.cpp
index 5c8936a9bca..efc503069e9 100644
--- a/src/lib/netlist/nl_setup.cpp
+++ b/src/lib/netlist/nl_setup.cpp
@@ -121,8 +121,8 @@ namespace netlist
void nlparse_t::register_param_x(const pstring &param, const nl_fptype value)
{
- if (std::abs(value - std::floor(value)) > nlconst::magic(1e-30)
- || std::abs(value) > nlconst::magic(1e9))
+ if (plib::abs(value - plib::floor(value)) > nlconst::magic(1e-30)
+ || plib::abs(value) > nlconst::magic(1e9))
register_param(param, plib::pfmt("{1:.9}").e(value));
else
register_param(param, plib::pfmt("{1}")(static_cast<long>(value)));
@@ -1126,7 +1126,7 @@ void setup_t::prepare_to_run()
//FIXME: check for errors ...
bool err(false);
auto v = plib::pstonum_ne<nl_fptype>(p->second, err);
- if (err || std::abs(v - std::floor(v)) > nlconst::magic(1e-6) )
+ if (err || plib::abs(v - plib::floor(v)) > nlconst::magic(1e-6) )
log().fatal(MF_HND_VAL_NOT_SUPPORTED(p->second));
// FIXME comparison with zero
d.second->set_hint_deactivate(v == nlconst::zero());