summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt8
-rw-r--r--test.cc112
-rw-r--r--zp/include/zp/bs255
-rw-r--r--zp/include/zp/mem.d/memcpy.ii7
-rw-r--r--zp/include/zp/mth74
-rw-r--r--zp/include/zp/mth.h146
-rw-r--r--zp/include/zp/prv/flt.h22
-rw-r--r--zp/source/any/mth/abs.cc2
-rw-r--r--zp/source/any/mth/dot.cc6
-rw-r--r--zp/source/any/mth/vadd.cc6
-rw-r--r--zp/source/any/mth/vsub.cc6
11 files changed, 356 insertions, 288 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index d437259..ec38efa 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -109,6 +109,14 @@
* Add more trigonometric functions;
* Temporarily remove fmt;
+* Fix missing include in test;
+* Disable metaprogramming classes in standards before C++11;
+* Use double long instead of long double;
+* Overload metaprogramming classes with qualified types;
+* Fix C++ memcpy;
+* Add metaprogramming classes for removing references and pointers;
+* Make test support C++17;
+
# 0.0.2
* Migrate to CMake;
diff --git a/test.cc b/test.cc
index 47940ef..d821382 100644
--- a/test.cc
+++ b/test.cc
@@ -1,14 +1,18 @@
#include <climits>
+#include <cstdint>
#include <cstdlib>
#include <exception>
#include <iostream>
#include <limits>
-#include <source_location>
#include <typeinfo>
#include <zp/mem>
#include <zp/mth>
#include <zp/str>
+#if !zp_std_cxx11
+#error At least C++11 is required for this test!
+#endif
+
static_assert(::zp::isptr<int>::val == false);
static_assert(::zp::isptr<int *>::val == true);
static_assert(::zp::isptr<int const *>::val == true);
@@ -30,20 +34,38 @@ static_assert(::zp::isptr<int const volatile * const volatile>::val == true);
static_assert(::zp::typequ<int,int>::val == true);
static_assert(::zp::typequ<int,long>::val == false);
-static_assert(::zp::typequ<::zp::sgn<int>::typ, int>::val == true);
-static_assert(::zp::typequ<::zp::sgn<int unsigned>::typ,int>::val == true);
-
-static_assert(::zp::typequ<::zp::usgn<int unsigned>::typ,int unsigned>::val == true);
-static_assert(::zp::typequ<::zp::usgn<int>::typ, int unsigned>::val == true);
+static_assert(::zp::typequ<::zp::remref<int>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::remref<int &>::typ,int>::val == true);
-static_assert(::zp::typequ<::zp::remqual<int volatile>::typ, int>::val == true);
-static_assert(::zp::typequ<::zp::remqual<int const volatile>::typ,int>::val == true);
+static_assert(::zp::typequ<::zp::remptr<int>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::remptr<int *>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::remptr<int * const>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::remptr<int * volatile>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::remptr<int * const volatile>::typ,int>::val == true);
static_assert(::zp::typequ<::zp::remqual<int>::typ, int>::val == true);
static_assert(::zp::typequ<::zp::remqual<int const>::typ, int>::val == true);
static_assert(::zp::typequ<::zp::remqual<int volatile>::typ, int>::val == true);
static_assert(::zp::typequ<::zp::remqual<int const volatile>::typ,int>::val == true);
-
+
+static_assert(::zp::typequ<::zp::sgn<int>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int const>::typ, int const>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int volatile>::typ, int volatile>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int const volatile>::typ, int const volatile>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int unsigned>::typ, int>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int unsigned const>::typ, int const>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int unsigned volatile>::typ, int volatile>::val == true);
+static_assert(::zp::typequ<::zp::sgn<int unsigned const volatile>::typ,int const volatile>::val == true);
+
+static_assert(::zp::typequ<::zp::usgn<int unsigned>::typ, int unsigned>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int unsigned const>::typ, int unsigned const>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int unsigned volatile>::typ, int unsigned volatile>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int unsigned const volatile>::typ,int unsigned const volatile>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int>::typ, int unsigned>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int const>::typ, int unsigned const>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int volatile>::typ, int unsigned volatile>::val == true);
+static_assert(::zp::typequ<::zp::usgn<int const volatile>::typ, int unsigned const volatile>::val == true);
+
static_assert(::zp::typequ<::zp::nulptrtyp,::std::nullptr_t>::val == true);
static_assert(::zp::typequ<::zp::i8m, ::std::uint_least8_t>::val == true);
@@ -61,12 +83,12 @@ static_assert(::zp::typequ<::zp::sz, ::std::size_t>::val == true);
static_assert(::zp::isusgn<char>::val == ::std::is_unsigned<char>::value);
static_assert(::zp::isusgn<char16_t>::val == ::std::is_unsigned<char16_t>::value);
static_assert(::zp::isusgn<char32_t>::val == ::std::is_unsigned<char32_t>::value);
-static_assert(::zp::isusgn<char8_t>::val == ::std::is_unsigned<char8_t>::value);
+static_assert(::zp::isusgn<::zp::c8>::val == ::std::is_unsigned<::zp::c8>::value);
static_assert(::zp::isusgn<double>::val == ::std::is_unsigned<double>::value);
static_assert(::zp::isusgn<float>::val == ::std::is_unsigned<float>::value);
static_assert(::zp::isusgn<int>::val == ::std::is_unsigned<int>::value);
static_assert(::zp::isusgn<long>::val == ::std::is_unsigned<long>::value);
-static_assert(::zp::isusgn<long double>::val == ::std::is_unsigned<long double>::value);
+static_assert(::zp::isusgn<double long>::val == ::std::is_unsigned<double long>::value);
static_assert(::zp::isusgn<long long>::val == ::std::is_unsigned<long long>::value);
static_assert(::zp::isusgn<short>::val == ::std::is_unsigned<short>::value);
static_assert(::zp::isusgn<char signed>::val == ::std::is_unsigned<char signed>::value);
@@ -82,7 +104,7 @@ static_assert(::zp::issgn<double>::val == ::std::is_signed<double>::
static_assert(::zp::issgn<float>::val == ::std::is_signed<float>::value);
static_assert(::zp::issgn<int>::val == ::std::is_signed<int>::value);
static_assert(::zp::issgn<long>::val == ::std::is_signed<long>::value);
-static_assert(::zp::issgn<long double>::val == ::std::is_signed<long double>::value);
+static_assert(::zp::issgn<double long>::val == ::std::is_signed<double long>::value);
static_assert(::zp::issgn<long long>::val == ::std::is_signed<long long>::value);
static_assert(::zp::issgn<short>::val == ::std::is_signed<short>::value);
static_assert(::zp::issgn<char signed>::val == ::std::is_signed<char signed>::value);
@@ -99,12 +121,12 @@ static_assert(::zp::minval<bool>::val == ::std::numeric_limits<boo
static_assert(::zp::minval<char>::val == ::std::numeric_limits<char>::lowest());
static_assert(::zp::minval<char16_t>::val == ::std::numeric_limits<char16_t>::lowest());
static_assert(::zp::minval<char32_t>::val == ::std::numeric_limits<char32_t>::lowest());
-static_assert(::zp::minval<char8_t>::val == ::std::numeric_limits<char8_t>::lowest());
+static_assert(::zp::minval<::zp::c8>::val == ::std::numeric_limits<::zp::c8>::lowest());
static_assert(::zp::minval<double>::val == ::std::numeric_limits<double>::lowest());
static_assert(::zp::minval<float>::val == ::std::numeric_limits<float>::lowest());
static_assert(::zp::minval<int>::val == ::std::numeric_limits<int>::lowest());
static_assert(::zp::minval<long>::val == ::std::numeric_limits<long>::lowest());
-static_assert(::zp::minval<long double>::val == ::std::numeric_limits<long double>::lowest());
+static_assert(::zp::minval<double long>::val == ::std::numeric_limits<double long>::lowest());
static_assert(::zp::minval<long long>::val == ::std::numeric_limits<long long>::lowest());
static_assert(::zp::minval<short>::val == ::std::numeric_limits<short>::lowest());
static_assert(::zp::minval<char signed>::val == ::std::numeric_limits<char signed>::lowest());
@@ -119,12 +141,12 @@ static_assert(::zp::maxval<bool>::val == ::std::numeric_limits<boo
static_assert(::zp::maxval<char>::val == ::std::numeric_limits<char>::max());
static_assert(::zp::maxval<char16_t>::val == ::std::numeric_limits<char16_t>::max());
static_assert(::zp::maxval<char32_t>::val == ::std::numeric_limits<char32_t>::max());
-static_assert(::zp::maxval<char8_t>::val == ::std::numeric_limits<char8_t>::max());
+static_assert(::zp::maxval<::zp::c8>::val == ::std::numeric_limits<::zp::c8>::max());
static_assert(::zp::maxval<double>::val == ::std::numeric_limits<double>::max());
static_assert(::zp::maxval<float>::val == ::std::numeric_limits<float>::max());
static_assert(::zp::maxval<int>::val == ::std::numeric_limits<int>::max());
static_assert(::zp::maxval<long>::val == ::std::numeric_limits<long>::max());
-static_assert(::zp::maxval<long double>::val == ::std::numeric_limits<long double>::max());
+static_assert(::zp::maxval<double long>::val == ::std::numeric_limits<double long>::max());
static_assert(::zp::maxval<long long>::val == ::std::numeric_limits<long long>::max());
static_assert(::zp::maxval<short>::val == ::std::numeric_limits<short>::max());
static_assert(::zp::maxval<char signed>::val == ::std::numeric_limits<char signed>::max());
@@ -135,40 +157,44 @@ static_assert(::zp::maxval<long unsigned>::val == ::std::numeric_limits<lon
static_assert(::zp::maxval<long long unsigned>::val == ::std::numeric_limits<long long unsigned>::max());
static_assert(::zp::maxval<wchar_t>::val == ::std::numeric_limits<wchar_t>::max());
-int main() {
- int unsigned num;
- int unsigned numerr = 0x0u;
+template<typename ltyp,typename rtyp> static auto cmp(int unsigned & num,int unsigned & numerr,long const ln,ltyp const & lvalref,rtyp const & rvalref) noexcept {
+ char const * const ltypnm = typeid (ltyp).name();
+ char const * const rtypnm = typeid (rtyp).name();
- auto const tst = [&num](char const * const cmp) noexcept {
- ::std::cout <<"\n\x1B[38;5;75mtesting\x1B[0m " <<cmp <<"\n\n";
+ auto const getval = [](auto const & valref) {
+ using typ = typename ::zp::remref<decltype (valref)>::typ;
- num = 0x0;
+ if constexpr (::zp::ischr<typ>::val) {return static_cast<::zp::i02m>(valref);}
+ else if constexpr (::zp::isptr<typ>::val) {return reinterpret_cast<void *>(valref);}
+ else {return valref;}
};
- auto const cmp = [&num,&numerr]<typename ltyp,typename rtyp>(ltyp const & lvalref,rtyp const & rvalref,::std::source_location const srcloc = ::std::source_location::current()) {
- char const * const ltypnm = typeid (ltyp).name();
- char const * const rtypnm = typeid (rtyp).name();
+ auto const lval = getval(lvalref);
+ auto const rval = getval(rvalref);
- auto const getval = []<typename typ>(typ const & valref) {
- if constexpr (::zp::ischr<typ>::val) {return static_cast<::zp::i02m>(valref);}
- else if constexpr (::zp::isptr<typ>::val) {return reinterpret_cast<void *>(valref);}
- else {return valref;}
- };
+ ::std::cout << " " << num++ << ". comparing " << ltypnm << " (" << lval << ") vs. " << rtypnm << " (" << rval << ")... ";
- auto const lval = getval(lvalref);
- auto const rval = getval(rvalref);
+ if (lval != rval) {
+ ::std::cout << "\x1B[38;5;161munequal\x1B[0m (at #" << ln << ")\n";
+ //throw ::std::exception {};
+ ++numerr;
- ::std::cout <<" " <<num++ <<". comparing " <<ltypnm <<" (" <<lval <<") vs. " <<rtypnm <<" (" <<rval <<")... ";
+ return;
+ }
- if (lval != rval) {
- ::std::cout <<"\x1B[38;5;161munequal\x1B[0m (at #" <<srcloc.line() <<")\n";
- //throw ::std::exception {};
- ++numerr;
-
- return;
- }
+ ::std::cout <<"\x1B[38;5;77mequal\x1B[0m\n";
+}
+
+#define cmp(lval,rval) (::cmp(num,numerr,__LINE__,(lval),(rval)))
+
+int main() {
+ int unsigned num;
+ int unsigned numerr = 0x0u;
+
+ auto const tst = [&num](char const * const cmp) noexcept {
+ ::std::cout <<"\n\x1B[38;5;75mtesting\x1B[0m " <<cmp <<"\n\n";
- ::std::cout <<"\x1B[38;5;77mequal\x1B[0m\n";
+ num = 0x0;
};
::std::cout <<"zp " <<::zp::ver <<"." <<::zp::extver <<", run-time test\n";
@@ -226,7 +252,7 @@ int main() {
cmp(zp_isnanf( zp_nanf), true);
cmp(zp_isnand( zp_nand), true);
- cmp(zp_isnanld(zp_nanld),true);
+ cmp(zp_isnandl(zp_nanld),true);
}();*/
[&] {
@@ -285,7 +311,7 @@ int main() {
::zp::sz const buf8len = ::zp_utf8enclen(src);
cmp(buf8len,0x4u);
- char8_t * buf8 = new char8_t[buf8len+0x1];
+ ::zp::c8 * buf8 = new ::zp::c8[buf8len+0x1];
::zp_utf8enc(buf8,src);
diff --git a/zp/include/zp/bs b/zp/include/zp/bs
index bb2a107..b445aca 100644
--- a/zp/include/zp/bs
+++ b/zp/include/zp/bs
@@ -13,8 +13,18 @@
#include <zp/bs.h>
+/*
+ ttval:
+
+ We need to be careful when using this. We
+ cannot use it for all types of global data
+ members: Only those that under no
+ circumstance have extern linkage may use it, as
+ mixed constexpr/static const across translation
+ units is not allowed.
+*/
#if zp_std_cxx11
-#define zp_prv_ttval(typ) constexpr static typ
+#define zp_prv_ttval(typ) constexpr typ
#else
#define zp_prv_ttval(typ) static typ const
#endif
@@ -94,7 +104,7 @@ namespace zp {
template<> struct minval<float> {constexpr static auto val = zp_minvalf;};
template<> struct minval<int> {constexpr static auto val = zp_minvali;};
template<> struct minval<long> {constexpr static auto val = zp_minvall;};
- template<> struct minval<long double> {constexpr static auto val = zp_minvalld;};
+ template<> struct minval<double long> {constexpr static auto val = zp_minvalld;};
template<> struct minval<short> {constexpr static auto val = zp_minvals;};
template<> struct minval<char signed> {constexpr static auto val = zp_minvalcs;};
template<> struct minval<char unsigned> {constexpr static auto val = zp_minvalcu;};
@@ -120,7 +130,7 @@ namespace zp {
template<> struct maxval<float> {constexpr static auto val = zp_maxvalf;};
template<> struct maxval<int> {constexpr static auto val = zp_maxvali;};
template<> struct maxval<long> {constexpr static auto val = zp_maxvall;};
- template<> struct maxval<long double> {constexpr static auto val = zp_maxvalld;};
+ template<> struct maxval<double long> {constexpr static auto val = zp_maxvalld;};
template<> struct maxval<short> {constexpr static auto val = zp_maxvals;};
template<> struct maxval<char signed> {constexpr static auto val = zp_maxvalcs;};
template<> struct maxval<char unsigned> {constexpr static auto val = zp_maxvalcu;};
@@ -137,162 +147,181 @@ namespace zp {
template<> struct maxval<long long> {constexpr static auto val = zp_maxvalll;};
template<> struct maxval<long long unsigned> {constexpr static auto val = zp_maxvalllu;};
#endif
-#endif
- template<typename ityp> struct sgn {typedef ityp typ;};
+ template<typename ityp> struct remqual {using typ = ityp;};
- template<> struct sgn<char unsigned> {typedef char signed typ;};
- template<> struct sgn<int unsigned> {typedef int typ;};
- template<> struct sgn<long unsigned> {typedef long typ;};
- template<> struct sgn<short unsigned> {typedef short typ;};
-#if zp_std_cxx11
- template<> struct sgn<long long unsigned> {typedef long long typ;};
-#endif
+ template<typename ityp> struct remqual<ityp const> {using typ = ityp;};
+ template<typename ityp> struct remqual<ityp volatile> {using typ = ityp;};
+ template<typename ityp> struct remqual<ityp const volatile> {using typ = ityp;};
- template<typename ityp> struct usgn {typedef ityp typ;};
+ template<typename ityp> struct remref {using typ = ityp;};
- template<> struct usgn<char signed> {typedef char unsigned typ;};
- template<> struct usgn<int> {typedef int unsigned typ;};
- template<> struct usgn<long> {typedef long unsigned typ;};
- template<> struct usgn<short> {typedef short unsigned typ;};
+ template<typename ityp> struct remref<ityp &> {using typ = ityp;};
+
+ template<typename ityp> struct remptr {using typ = ityp;};
+
+ template<typename ityp> struct remptr<ityp *> {using typ = ityp;};
+ template<typename ityp> struct remptr<ityp * const> {using typ = ityp;};
+ template<typename ityp> struct remptr<ityp * volatile> {using typ = ityp;};
+ template<typename ityp> struct remptr<ityp * const volatile> {using typ = ityp;};
+
+ template<typename ityp> struct sgn {using typ = ityp;};
+
+ template<> struct sgn<char unsigned> {using typ = char signed;};
+ template<> struct sgn<int unsigned> {using typ = int;};
+ template<> struct sgn<long unsigned> {using typ = long;};
+ template<> struct sgn<short unsigned> {using typ = short;};
#if zp_std_cxx11
- template<> struct usgn<long long> {typedef long long unsigned typ;};
+ template<> struct sgn<long long unsigned> {using typ = long long;};
#endif
- template<typename ityp> struct remqual {typedef ityp typ;};
+ template<typename ityp> struct sgn<ityp const> {using typ = typename sgn<ityp>::typ const;};
+ template<typename ityp> struct sgn<ityp volatile> {using typ = typename sgn<ityp>::typ volatile;};
+ template<typename ityp> struct sgn<ityp const volatile> {using typ = typename sgn<ityp>::typ const volatile;};
+
+ template<typename ityp> struct usgn {using typ = ityp;};
- template<typename ityp> struct remqual<ityp const> {typedef ityp typ;};
- template<typename ityp> struct remqual<ityp volatile> {typedef ityp typ;};
- template<typename ityp> struct remqual<ityp const volatile> {typedef ityp typ;};
+ template<> struct usgn<char signed> {using typ = char unsigned;};
+ template<> struct usgn<int> {using typ = int unsigned;};
+ template<> struct usgn<long> {using typ = long unsigned;};
+ template<> struct usgn<long long> {using typ = long long unsigned;};
+ template<> struct usgn<short> {using typ = short unsigned;};
- template<typename ltyp,typename rtyp> struct typequ {zp_prv_ttval(bool) val = false;};
+ template<typename ityp> struct usgn<ityp const> {using typ = typename usgn<ityp>::typ const;};
+ template<typename ityp> struct usgn<ityp volatile> {using typ = typename usgn<ityp>::typ volatile;};
+ template<typename ityp> struct usgn<ityp const volatile> {using typ = typename usgn<ityp>::typ const volatile;};
+
+ template<typename ltyp,typename rtyp> struct typequ {constexpr static bool val = false;};
- template<typename typ> struct typequ<typ,typ> {zp_prv_ttval(bool) val = true;};
-
- template<typename typ> struct isptr {zp_prv_ttval(bool) val = false;};
-
- template<typename typ> struct isptr<typ *> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const *> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ volatile *> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const volatile *> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ * const> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const * const> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ volatile * const> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const volatile * const> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ * volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const * volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ volatile * volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const volatile * volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ * const volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const * const volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ volatile * const volatile> {zp_prv_ttval(bool) val = true;};
- template<typename typ> struct isptr<typ const volatile * const volatile> {zp_prv_ttval(bool) val = true;};
-
- template<typename typ> struct isusgn {zp_prv_ttval(bool) val = false;};
-
- template<> struct isusgn<char unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isusgn<int unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isusgn<long unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isusgn<short unsigned> {zp_prv_ttval(bool) val = true;};
-#if __cpp_char8_t >= 201811
- template<> struct isusgn<char8_t> {zp_prv_ttval(bool) val = true;};
-#endif
-#if zp_std_cxx11
- template<> struct isusgn<char16_t> {zp_prv_ttval(bool) val = true;};
- template<> struct isusgn<char32_t> {zp_prv_ttval(bool) val = true;};
- template<> struct isusgn<long long unsigned> {zp_prv_ttval(bool) val = true;};
-#endif
-#if zp_uchr
- template<> struct isusgn<char> {zp_prv_ttval(bool) val = true;};
-#endif
-#if zp_uwchr
- template<> struct isusgn<wchar_t> {zp_prv_ttval(bool) val = true;};
-#endif
+ template<typename typ> struct typequ<typ,typ> {constexpr static bool val = true;};
+
+ template<typename typ> struct isptr {constexpr static bool val = false;};
- template<typename typ> struct issgn {zp_prv_ttval(bool) val = false;};
+ template<typename typ> struct isptr<typ *> {constexpr static bool val = true;};
+ template<typename typ> struct isptr<typ * const> {constexpr static bool val = true;};
+ template<typename typ> struct isptr<typ * volatile> {constexpr static bool val = true;};
+ template<typename typ> struct isptr<typ * const volatile> {constexpr static bool val = true;};
- template<> struct issgn<double> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<float> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<int> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<long> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<long double> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<short> {zp_prv_ttval(bool) val = true;};
- template<> struct issgn<char signed> {zp_prv_ttval(bool) val = true;};
+ template<typename typ> struct issgn {constexpr static bool val = false;};
+
+ template<> struct issgn<char signed> {constexpr static bool val = true;};
+ template<> struct issgn<double> {constexpr static bool val = true;};
+ template<> struct issgn<double long> {constexpr static bool val = true;};
+ template<> struct issgn<float> {constexpr static bool val = true;};
+ template<> struct issgn<int> {constexpr static bool val = true;};
+ template<> struct issgn<long> {constexpr static bool val = true;};
+ template<> struct issgn<short> {constexpr static bool val = true;};
#if __STDCPP_BFLOAT16_T__
- template<> struct issgn<decltype (0.0bf16)> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<decltype (0.0bf16)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT128_T__
- template<> struct issgn<decltype (0.0f128)> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<decltype (0.0f128)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT16_T__
- template<> struct issgn<decltype (0.0f16)> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<decltype (0.0f16)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT32_T__
- template<> struct issgn<decltype (0.0f32)> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<decltype (0.0f32)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT64_T__
- template<> struct issgn<decltype (0.0f64)> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<decltype (0.0f64)> {constexpr static bool val = true;};
#endif
#if zp_std_cxx11
- template<> struct issgn<long long> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<long long> {constexpr static bool val = true;};
#endif
#if !zp_uchr
- template<> struct issgn<char> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<char> {constexpr static bool val = true;};
#endif
#if !zp_uwchr
- template<> struct issgn<wchar_t> {zp_prv_ttval(bool) val = true;};
+ template<> struct issgn<wchar_t> {constexpr static bool val = true;};
+#endif
+
+ template<typename typ> struct issgn<typ const> {constexpr static bool val = issgn<typ>::val;};
+ template<typename typ> struct issgn<typ volatile> {constexpr static bool val = issgn<typ>::val;};
+ template<typename typ> struct issgn<typ const volatile> {constexpr static bool val = issgn<typ>::val;};
+
+ template<typename typ> struct isusgn {constexpr static bool val = false;};
+
+ template<> struct isusgn<char unsigned> {constexpr static bool val = true;};
+ template<> struct isusgn<char16_t> {constexpr static bool val = true;};
+ template<> struct isusgn<char32_t> {constexpr static bool val = true;};
+ template<> struct isusgn<int unsigned> {constexpr static bool val = true;};
+ template<> struct isusgn<long long unsigned> {constexpr static bool val = true;};
+ template<> struct isusgn<long unsigned> {constexpr static bool val = true;};
+ template<> struct isusgn<short unsigned> {constexpr static bool val = true;};
+#if __cpp_char8_t >= 201811
+ template<> struct isusgn<char8_t> {constexpr static bool val = true;};
+#endif
+#if zp_uchr
+ template<> struct isusgn<char> {constexpr static bool val = true;};
+#endif
+#if zp_uwchr
+ template<> struct isusgn<wchar_t> {constexpr static bool val = true;};
#endif
- template<typename typ> struct isflt {zp_prv_ttval(bool) val = false;};
+ template<typename typ> struct isusgn<typ const> {constexpr static bool val = isusgn<typ>::val;};
+ template<typename typ> struct isusgn<typ volatile> {constexpr static bool val = isusgn<typ>::val;};
+ template<typename typ> struct isusgn<typ const volatile> {constexpr static bool val = isusgn<typ>::val;};
- template<> struct isflt<double> {zp_prv_ttval(bool) val = true;};
- template<> struct isflt<float> {zp_prv_ttval(bool) val = true;};
- template<> struct isflt<long double> {zp_prv_ttval(bool) val = true;};
+ template<typename typ> struct isflt {constexpr static bool val = false;};
+
+ template<> struct isflt<double> {constexpr static bool val = true;};
+ template<> struct isflt<double long> {constexpr static bool val = true;};
+ template<> struct isflt<float> {constexpr static bool val = true;};
#if __STDCPP_BFLOAT16_T__
- template<> struct isflt<decltype (0.0bf16)> {zp_prv_ttval(bool) val = true;};
+ template<> struct isflt<decltype (0.0bf16)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT128_T__
- template<> struct isflt<decltype (0.0f128)> {zp_prv_ttval(bool) val = true;};
+ template<> struct isflt<decltype (0.0f128)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT16_T__
- template<> struct isflt<decltype (0.0f16)> {zp_prv_ttval(bool) val = true;};
+ template<> struct isflt<decltype (0.0f16)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT32_T__
- template<> struct isflt<decltype (0.0f32)> {zp_prv_ttval(bool) val = true;};
+ template<> struct isflt<decltype (0.0f32)> {constexpr static bool val = true;};
#endif
#if __STDCPP_FLOAT64_T__
- template<> struct isflt<decltype (0.0f64)> {zp_prv_ttval(bool) val = true;};
+ template<> struct isflt<decltype (0.0f64)> {constexpr static bool val = true;};
#endif
- template<typename typ> struct isint {zp_prv_ttval(bool) val = false;};
+ template<typename typ> struct isflt<typ const> {constexpr static bool val = isflt<typ>::val;};
+ template<typename typ> struct isflt<typ volatile> {constexpr static bool val = isflt<typ>::val;};
+ template<typename typ> struct isflt<typ const volatile> {constexpr static bool val = isflt<typ>::val;};
- template<> struct isint<int> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<long> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<short> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<char signed> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<char unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<int unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<long unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<short unsigned> {zp_prv_ttval(bool) val = true;};
-#if zp_std_cxx11
- template<> struct isint<long long> {zp_prv_ttval(bool) val = true;};
- template<> struct isint<long long unsigned> {zp_prv_ttval(bool) val = true;};
-#endif
+ template<typename typ> struct isint {constexpr static bool val = false;};
+
+ template<> struct isint<char signed> {constexpr static bool val = true;};
+ template<> struct isint<char unsigned> {constexpr static bool val = true;};
+ template<> struct isint<int> {constexpr static bool val = true;};
+ template<> struct isint<int unsigned> {constexpr static bool val = true;};
+ template<> struct isint<long> {constexpr static bool val = true;};
+ template<> struct isint<long long> {constexpr static bool val = true;};
+ template<> struct isint<long long unsigned> {constexpr static bool val = true;};
+ template<> struct isint<long unsigned> {constexpr static bool val = true;};
+ template<> struct isint<short> {constexpr static bool val = true;};
+ template<> struct isint<short unsigned> {constexpr static bool val = true;};
+
+ template<typename typ> struct isint<typ const> {constexpr static bool val = isint<typ>::val;};
+ template<typename typ> struct isint<typ volatile> {constexpr static bool val = isint<typ>::val;};
+ template<typename typ> struct isint<typ const volatile> {constexpr static bool val = isint<typ>::val;};
- template<typename typ> struct isari {zp_prv_ttval(bool) val = ::zp::isflt<typ>::val || ::zp::isint<typ>::val;};
+ template<typename typ> struct isari {constexpr static bool val = ::zp::isflt<typ>::val || ::zp::isint<typ>::val;};
- template<typename typ> struct ischr {zp_prv_ttval(bool) val = false;};
+ template<typename typ> struct ischr {constexpr static bool val = false;};
- template<> struct ischr<char> {zp_prv_ttval(bool) val = true;};
- template<> struct ischr<char unsigned> {zp_prv_ttval(bool) val = true;};
- template<> struct ischr<wchar_t> {zp_prv_ttval(bool) val = true;};
+ template<> struct ischr<char> {constexpr static bool val = true;};
+ template<> struct ischr<char unsigned> {constexpr static bool val = true;};
+ template<> struct ischr<char16_t> {constexpr static bool val = true;};
+ template<> struct ischr<char32_t> {constexpr static bool val = true;};
+ template<> struct ischr<wchar_t> {constexpr static bool val = true;};
#if __cpp_char8_t >= 201811
- template<> struct ischr<char8_t> {zp_prv_ttval(bool) val = true;};
-#endif
-#if zp_std_cxx11
- template<> struct ischr<char16_t> {zp_prv_ttval(bool) val = true;};
- template<> struct ischr<char32_t> {zp_prv_ttval(bool) val = true;};
+ template<> struct ischr<char8_t> {constexpr static bool val = true;};
#endif
+
+ template<typename typ> struct ischr<typ const> {constexpr static bool val = ischr<typ>::val;};
+ template<typename typ> struct ischr<typ volatile> {constexpr static bool val = ischr<typ>::val;};
+ template<typename typ> struct ischr<typ const volatile> {constexpr static bool val = ischr<typ>::val;};
+#endif // c++11
zp_prv_ttval(::zp::i04m) ver = zp_ver;
zp_prv_ttval(::zp::i04m) extver = zp_extver;
@@ -310,7 +339,7 @@ namespace zp {
zp_iln zp_nret zp_nthrw inline void trp() {::zp_trp();}
zp_iln zp_nret zp_nthrw inline void urch() {zp_urch();}
-#if zp_std_cxx11
+#if zp_std_cxx11 // We cannot use template parameter packs before C++11, so this function becomes quite non-trivial to implement.
template<typename... typs> zp_iln inline auto syscl(::zp::sysclid id,typs const &... args) noexcept -> ::zp::sysclres {return ::zp_syscl(id,args...);}
#endif
}
diff --git a/zp/include/zp/mem.d/memcpy.ii b/zp/include/zp/mem.d/memcpy.ii
index d9e06bb..6ec99bc 100644
--- a/zp/include/zp/mem.d/memcpy.ii
+++ b/zp/include/zp/mem.d/memcpy.ii
@@ -7,5 +7,10 @@
template<typename dsttyp,typename srctyp> zp_nthrw inline ::zp::cpyres<dsttyp,srctyp> zp::memcpy(dsttyp * dst,srctyp const * src,::zp::sz const num) {
::zp_cpyres const cpyres = ::zp_memcpy(dst,src,num);
- return ::zp::cpyres<dsttyp,srctyp> (static_cast<dsttyp *>(cpyres.dst),static_cast<srctyp *>(cpyres.src));
+ ::zp::cpyres<dsttyp,srctyp> res = {
+ static_cast<dsttyp *>(cpyres.dst),
+ static_cast<srctyp *>(cpyres.src),
+ };
+
+ return res;
}
diff --git a/zp/include/zp/mth b/zp/include/zp/mth
index 8355528..1da0342 100644
--- a/zp/include/zp/mth
+++ b/zp/include/zp/mth
@@ -16,13 +16,13 @@ namespace zp {
template<> struct inf<double> {constexpr static auto val = zp_inff;};
template<> struct inf<float> {constexpr static auto val = zp_infd;};
- template<> struct inf<long double> {constexpr static auto val = zp_infld;};
+ template<> struct inf<double long> {constexpr static auto val = zp_infld;};
template<typename typ> struct nan {constexpr static auto val = typ {0x0};};
template<> struct nan<double> {constexpr static auto val = zp_nanf;};
template<> struct nan<float> {constexpr static auto val = zp_nand;};
- template<> struct nan<long double> {constexpr static auto val = zp_nanld;};
+ template<> struct nan<double long> {constexpr static auto val = zp_nanld;};
#endif
template<typename typ> struct divmodres {
@@ -48,66 +48,66 @@ namespace zp {
zp_iln zp_nthrw zp_useq zp_useres inline float abs(float val) {return ::zp_absf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double abs(double val) {return ::zp_absd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double abs(long double val) {return ::zp_absld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long abs(double long val) {return ::zp_absdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float acos(float val) {return ::zp_acosf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double acos(double val) {return ::zp_acosd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double acos(long double val) {return ::zp_acosld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long acos(double long val) {return ::zp_acosdl(val);}
/* arccotangent */
zp_iln zp_nthrw zp_useq zp_useres inline float zp_acot(float val) {return ::zp_acotf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double zp_acot(double val) {return ::zp_acotd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double zp_acot(long double val) {return ::zp_acotld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long zp_acot(double long val) {return ::zp_acotdl(val);}
/* arccosecant */
zp_iln zp_nthrw zp_useq zp_useres inline float zp_acsc(float val) {return ::zp_acscf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double zp_acsc(double val) {return ::zp_acscd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double zp_acsc(long double val) {return ::zp_acscld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long zp_acsc(double long val) {return ::zp_acscdl(val);}
/* arcsecant */
zp_iln zp_nthrw zp_useq zp_useres inline float asec(float val) {return ::zp_asecf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double asec(double val) {return ::zp_asecd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double asec(long double val) {return ::zp_asecld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long asec(double long val) {return ::zp_asecdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float asin(float val) {return ::zp_asinf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double asin(double val) {return ::zp_asind( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double asin(long double val) {return ::zp_asinld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long asin(double long val) {return ::zp_asindl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float atan(float val) {return ::zp_atanf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double atan(double val) {return ::zp_atand( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double atan(long double val) {return ::zp_atanld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long atan(double long val) {return ::zp_atandl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float atan2(float y,float x) {return ::zp_atan2f( y,x);}
zp_iln zp_nthrw zp_useq zp_useres inline double atan2(double y,double x) {return ::zp_atan2d( y,x);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double atan2(long double y,long double x) {return ::zp_atan2ld(y,x);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long atan2(double long y,double long x) {return ::zp_atan2dl(y,x);}
zp_iln zp_nthrw zp_useq zp_useres inline float cbrt(float val) {return ::zp_cbrtf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double cbrt(double val) {return ::zp_cbrtd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double cbrt(long double val) {return ::zp_cbrtld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long cbrt(double long val) {return ::zp_cbrtdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float cos(float ang) {return ::zp_cosf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double cos(double ang) {return ::zp_cosd( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double cos(long double ang) {return ::zp_cosld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long cos(double long ang) {return ::zp_cosdl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float cot(float ang) {return ::zp_cotf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double cot(double ang) {return ::zp_cotd( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double cot(long double ang) {return ::zp_cotld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long cot(double long ang) {return ::zp_cotdl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float csc(float ang) {return ::zp_cscf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double csc(double ang) {return ::zp_cscd( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double csc(long double ang) {return ::zp_cscld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long csc(double long ang) {return ::zp_cscdl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float dist2(float x,float y) {return ::zp_dist2f( x,y);}
zp_iln zp_nthrw zp_useq zp_useres inline double dist2(double x,double y) {return ::zp_dist2d( x,y);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double dist2(long double x,long double y) {return ::zp_dist2ld(x,y);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dist2(double long x,double long y) {return ::zp_dist2dl(x,y);}
zp_iln zp_nthrw zp_useq zp_useres inline float dist3(float x,float y,float z) {return ::zp_dist3f( x,y,z);}
zp_iln zp_nthrw zp_useq zp_useres inline double dist3(double x,double y,double z) {return ::zp_dist3d( x,y,z);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double dist3(long double x,long double y,long double z) {return ::zp_dist3ld(x,y,z);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dist3(double long x,double long y,double long z) {return ::zp_dist3dl(x,y,z);}
zp_iln zp_nthrw zp_useq zp_useres inline float dist4(float x,float y,float z,float w) {return ::zp_dist4f( x,y,z,w);}
zp_iln zp_nthrw zp_useq zp_useres inline double dist4(double x,double y,double z,double w) {return ::zp_dist4d( x,y,z,w);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double dist4(long double x,long double y,long double z,long double w) {return ::zp_dist4ld(x,y,z,w);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dist4(double long x,double long y,double long z,double long w) {return ::zp_dist4dl(x,y,z,w);}
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::divmodres<char signed> divmod(char signed num,char signed den);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::divmodres<short> divmod(short num,short den);
@@ -119,83 +119,83 @@ namespace zp {
zp_iln zp_nthrw zp_useq zp_useres inline float dot2(::zp::vec2<float> lvec,::zp::vec2<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline double dot2(::zp::vec2<double> lvec,::zp::vec2<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline long double dot2(::zp::vec2<long double> lvec,::zp::vec2<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dot2(::zp::vec2<double long> lvec,::zp::vec2<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline float dot3(::zp::vec3<float> lvec,::zp::vec3<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline double dot3(::zp::vec3<double> lvec,::zp::vec3<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline long double dot3(::zp::vec3<long double> lvec,::zp::vec3<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dot3(::zp::vec3<double long> lvec,::zp::vec3<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline float dot4(::zp::vec4<float> lvec,::zp::vec4<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline double dot4(::zp::vec4<double> lvec,::zp::vec4<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline long double dot4(::zp::vec4<long double> lvec,::zp::vec4<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline double long dot4(::zp::vec4<double long> lvec,::zp::vec4<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline float exp(float val,float n) {return ::zp_expf( val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline double exp(double val,double n) {return ::zp_expd( val,n);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double exp(long double val,long double n) {return ::zp_expld(val,n);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long exp(double long val,double long n) {return ::zp_expdl(val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline float lb(float val) {return ::zp_lbf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double lb(double val) {return ::zp_lbd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double lb(long double val) {return ::zp_lbld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long lb(double long val) {return ::zp_lbdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float lg(float val) {return ::zp_lgf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double lg(double val) {return ::zp_lgd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double lg(long double val) {return ::zp_lgld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long lg(double long val) {return ::zp_lgdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float ln(float val) {return ::zp_lnf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double ln(double val) {return ::zp_lnd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double ln(long double val) {return ::zp_lnld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long ln(double long val) {return ::zp_lndl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline float log(float val,float n) {return ::zp_logf( val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline double log(double val,double n) {return ::zp_logd( val,n);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double log(long double val,long double n) {return ::zp_logld(val,n);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long log(double long val,double long n) {return ::zp_logdl(val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline float nrt(float val,float n) {return ::zp_nrtf( val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline double nrt(double val,double n) {return ::zp_nrtd( val,n);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double nrt(long double val,long double n) {return ::zp_nrtld(val,n);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long nrt(double long val,double long n) {return ::zp_nrtdl(val,n);}
zp_iln zp_nthrw zp_useq zp_useres inline float sec(float ang) {return ::zp_secf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double sec(double ang) {return ::zp_secd( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double sec(long double ang) {return ::zp_secld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long sec(double long ang) {return ::zp_secdl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float sin(float ang) {return ::zp_sinf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double sin(double ang) {return ::zp_sind( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double sin(long double ang) {return ::zp_sinld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long sin(double long ang) {return ::zp_sindl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float sqrt(float val) {return ::zp_sqrtf( val);;}
zp_iln zp_nthrw zp_useq zp_useres inline double sqrt(double val) {return ::zp_sqrtd( val);;}
- zp_iln zp_nthrw zp_useq zp_useres inline long double sqrt(long double val) {return ::zp_sqrtld(val);;}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long sqrt(double long val) {return ::zp_sqrtdl(val);;}
zp_iln zp_nthrw zp_useq zp_useres inline float tan(float ang) {return ::zp_tanf( ang);}
zp_iln zp_nthrw zp_useq zp_useres inline double tan(double ang) {return ::zp_tand( ang);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double tan(long double ang) {return ::zp_tanld(ang);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long tan(double long ang) {return ::zp_tandl(ang);}
zp_iln zp_nthrw zp_useq zp_useres inline float tsrt(float val) {return ::zp_tsrtf( val);}
zp_iln zp_nthrw zp_useq zp_useres inline double tsrt(double val) {return ::zp_tsrtd( val);}
- zp_iln zp_nthrw zp_useq zp_useres inline long double tsrt(long double val) {return ::zp_tsrtld(val);}
+ zp_iln zp_nthrw zp_useq zp_useres inline double long tsrt(double long val) {return ::zp_tsrtdl(val);}
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<float> vadd2f( ::zp::vec2<float> lvec,::zp::vec2<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<double> vadd2d( ::zp::vec2<double> lvec,::zp::vec2<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<long double> vadd2ld(::zp::vec2<long double> lvec,::zp::vec2<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<double long> vadd2dl(::zp::vec2<double long> lvec,::zp::vec2<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<float> vadd3f( ::zp::vec3<float> lvec,::zp::vec3<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<double> vadd3d( ::zp::vec3<double> lvec,::zp::vec3<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<long double> vadd3ld(::zp::vec3<long double> lvec,::zp::vec3<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<double long> vadd3dl(::zp::vec3<double long> lvec,::zp::vec3<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<float> vadd4f( ::zp::vec4<float> lvec,::zp::vec4<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<double> vadd4d( ::zp::vec4<double> lvec,::zp::vec4<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<long double> vadd4ld(::zp::vec4<long double> lvec,::zp::vec4<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<double long> vadd4dl(::zp::vec4<double long> lvec,::zp::vec4<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<float> vsub2f( ::zp::vec2<float> lvec,::zp::vec2<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<double> vsub2d( ::zp::vec2<double> lvec,::zp::vec2<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<long double> vsub2ld(::zp::vec2<long double> lvec,::zp::vec2<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec2<double long> vsub2dl(::zp::vec2<double long> lvec,::zp::vec2<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<float> vsub3f( ::zp::vec3<float> lvec,::zp::vec3<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<double> vsub3d( ::zp::vec3<double> lvec,::zp::vec3<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<long double> vsub3ld(::zp::vec3<long double> lvec,::zp::vec3<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec3<double long> vsub3dl(::zp::vec3<double long> lvec,::zp::vec3<double long> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<float> vsub4f( ::zp::vec4<float> lvec,::zp::vec4<float> rvec);
zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<double> vsub4d( ::zp::vec4<double> lvec,::zp::vec4<double> rvec);
- zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<long double> vsub4ld(::zp::vec4<long double> lvec,::zp::vec4<long double> rvec);
+ zp_iln zp_nthrw zp_useq zp_useres inline ::zp::vec4<double long> vsub4dl(::zp::vec4<double long> lvec,::zp::vec4<double long> rvec);
}
#endif
diff --git a/zp/include/zp/mth.h b/zp/include/zp/mth.h
index be63253..9b380fe 100644
--- a/zp/include/zp/mth.h
+++ b/zp/include/zp/mth.h
@@ -74,9 +74,9 @@ struct zp_vec2f {
float x;
float y;
};
-struct zp_vec2ld {
- long double x;
- long double y;
+struct zp_vec2dl {
+ double long x;
+ double long y;
};
struct zp_vec3d {
@@ -89,10 +89,10 @@ struct zp_vec3f {
float y;
float z;
};
-struct zp_vec3ld {
- long double x;
- long double y;
- long double z;
+struct zp_vec3dl {
+ double long x;
+ double long y;
+ double long z;
};
struct zp_vec4d {
@@ -107,92 +107,92 @@ struct zp_vec4f {
float z;
float w;
};
-struct zp_vec4ld {
- long double x;
- long double y;
- long double z;
- long double w;
+struct zp_vec4dl {
+ double long x;
+ double long y;
+ double long z;
+ double long w;
};
/* is not-a-number */
#define zp_isnand( val) ((bool)((val) != (val)))
+#define zp_isnandl(val) ((bool)((val) != (val)))
#define zp_isnanf( val) ((bool)((val) != (val)))
-#define zp_isnanld(val) ((bool)((val) != (val)))
/* absolute */
-zp_nthrw zp_useq zp_useres float zp_absf( float val);
zp_nthrw zp_useq zp_useres double zp_absd( double val);
-zp_nthrw zp_useq zp_useres long double zp_absld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_absdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_absf( float val);
/* arccosine */
-zp_nthrw zp_useq zp_useres float zp_acosf( float val);
zp_nthrw zp_useq zp_useres double zp_acosd( double val);
-zp_nthrw zp_useq zp_useres long double zp_acosld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_acosdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_acosf( float val);
/* arccotangent */
-zp_nthrw zp_useq zp_useres float zp_acotf( float val);
zp_nthrw zp_useq zp_useres double zp_acotd( double val);
-zp_nthrw zp_useq zp_useres long double zp_acotld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_acotdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_acotf( float val);
/* arccosecant */
-zp_nthrw zp_useq zp_useres float zp_acscf( float val);
zp_nthrw zp_useq zp_useres double zp_acscd( double val);
-zp_nthrw zp_useq zp_useres long double zp_acscld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_acscdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_acscf( float val);
/* arcsecant */
-zp_nthrw zp_useq zp_useres float zp_asecf( float val);
zp_nthrw zp_useq zp_useres double zp_asecd( double val);
-zp_nthrw zp_useq zp_useres long double zp_asecld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_asecdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_asecf( float val);
/* arcsine */
-zp_nthrw zp_useq zp_useres float zp_asinf( float val);
zp_nthrw zp_useq zp_useres double zp_asind( double val);
-zp_nthrw zp_useq zp_useres long double zp_asinld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_asindl(double long val);
+zp_nthrw zp_useq zp_useres float zp_asinf( float val);
/* arctangens */
-zp_nthrw zp_useq zp_useres float zp_atanf( float val);
zp_nthrw zp_useq zp_useres double zp_atand( double val);
-zp_nthrw zp_useq zp_useres long double zp_atanld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_atandl(double long val);
+zp_nthrw zp_useq zp_useres float zp_atanf( float val);
/* arctangens 2 */
-zp_nthrw zp_useq zp_useres float zp_atan2f( float y,float x);
zp_nthrw zp_useq zp_useres double zp_atan2d( double y,double x);
-zp_nthrw zp_useq zp_useres long double zp_atan2ld(long double y,long double x);
+zp_nthrw zp_useq zp_useres double long zp_atan2dl(double long y,double long x);
+zp_nthrw zp_useq zp_useres float zp_atan2f( float y,float x);
/* cube root */
-zp_nthrw zp_useq zp_useres float zp_cbrtf( float val);
zp_nthrw zp_useq zp_useres double zp_cbrtd( double val);
-zp_nthrw zp_useq zp_useres long double zp_cbrtld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_cbrtdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_cbrtf( float val);
/* cosine */
-zp_nthrw zp_useq zp_useres float zp_cosf( float ang);
zp_nthrw zp_useq zp_useres double zp_cosd( double ang);
-zp_nthrw zp_useq zp_useres long double zp_cosld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_cosdl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_cosf( float ang);
/* cotangent */
-zp_nthrw zp_useq zp_useres float zp_cotf( float ang);
zp_nthrw zp_useq zp_useres double zp_cotd( double ang);
-zp_nthrw zp_useq zp_useres long double zp_cotld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_cotdl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_cotf( float ang);
/* cosecant */
-zp_nthrw zp_useq zp_useres float zp_cscf( float ang);
zp_nthrw zp_useq zp_useres double zp_cscd( double ang);
-zp_nthrw zp_useq zp_useres long double zp_cscld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_cscdl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_cscf( float ang);
/* two-space distance */
-zp_nthrw zp_useq zp_useres float zp_dist2f( float x,float y);
zp_nthrw zp_useq zp_useres double zp_dist2d( double x,double y);
-zp_nthrw zp_useq zp_useres long double zp_dist2ld(long double x,long double y);
+zp_nthrw zp_useq zp_useres double long zp_dist2dl(double long x,double long y);
+zp_nthrw zp_useq zp_useres float zp_dist2f( float x,float y);
/* three-space distance */
-zp_nthrw zp_useq zp_useres float zp_dist3f( float x,float y,float z);
zp_nthrw zp_useq zp_useres double zp_dist3d( double x,double y,double z);
-zp_nthrw zp_useq zp_useres long double zp_dist3ld(long double x,long double y,long double z);
+zp_nthrw zp_useq zp_useres double long zp_dist3dl(double long x,double long y,double long z);
+zp_nthrw zp_useq zp_useres float zp_dist3f( float x,float y,float z);
/* four-space distance */
-zp_nthrw zp_useq zp_useres float zp_dist4f( float x,float y,float z,float w);
zp_nthrw zp_useq zp_useres double zp_dist4d( double x,double y,double z,double w);
-zp_nthrw zp_useq zp_useres long double zp_dist4ld(long double x,long double y,long double z,long double w);
+zp_nthrw zp_useq zp_useres double long zp_dist4dl(double long x,double long y,double long z,double long w);
+zp_nthrw zp_useq zp_useres float zp_dist4f( float x,float y,float z,float w);
/* division-modulo */
zp_nthrw zp_useq zp_useres struct divmodressc zp_divmodsc(char signed num,char signed den);
@@ -206,102 +206,102 @@ zp_nthrw zp_useq zp_useres struct divmodresll zp_divmodll(long long num,long l
/* two-space dot product */
zp_nthrw zp_useq zp_useres float zp_dot2f( zp_vec2f lvec,zp_vec2f rvec);
zp_nthrw zp_useq zp_useres double zp_dot2d( zp_vec2d lvec,zp_vec2d rvec);
-zp_nthrw zp_useq zp_useres long double zp_dot2ld(zp_vec2ld lvec,zp_vec2ld rvec);
+zp_nthrw zp_useq zp_useres double long zp_dot2dl(zp_vec2dl lvec,zp_vec2dl rvec);
/* three-space dot product */
zp_nthrw zp_useq zp_useres float zp_dot3f( zp_vec3f lvec,zp_vec3f rvec);
zp_nthrw zp_useq zp_useres double zp_dot3d( zp_vec3d lvec,zp_vec3d rvec);
-zp_nthrw zp_useq zp_useres long double zp_dot3ld(zp_vec3ld lvec,zp_vec3ld rvec);
+zp_nthrw zp_useq zp_useres double long zp_dot3dl(zp_vec3dl lvec,zp_vec3dl rvec);
/* four-space dot product */
zp_nthrw zp_useq zp_useres float zp_dot4f( zp_vec4f lvec,zp_vec4f rvec);
zp_nthrw zp_useq zp_useres double zp_dot4d( zp_vec4d lvec,zp_vec4d rvec);
-zp_nthrw zp_useq zp_useres long double zp_dot4ld(zp_vec4ld lvec,zp_vec4ld rvec);
+zp_nthrw zp_useq zp_useres double long zp_dot4dl(zp_vec4dl lvec,zp_vec4dl rvec);
/* exponentation */
zp_nthrw zp_useq zp_useres float zp_expd( float val,float n);
zp_nthrw zp_useq zp_useres double zp_expf( double val,double n);
-zp_nthrw zp_useq zp_useres long double zp_expld(long double val,long double n);
+zp_nthrw zp_useq zp_useres double long zp_expdl(double long val,double long n);
/* binary logarithm */
-zp_nthrw zp_useq zp_useres float zp_lbf( float val);
zp_nthrw zp_useq zp_useres double zp_lbd( double val);
-zp_nthrw zp_useq zp_useres long double zp_lbld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_lbdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_lbf( float val);
/* common logarithm */
-zp_nthrw zp_useq zp_useres float zp_lgf( float val);
zp_nthrw zp_useq zp_useres double zp_lgd( double val);
-zp_nthrw zp_useq zp_useres long double zp_lgld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_lgdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_lgf( float val);
/* natual logarithm */
-zp_nthrw zp_useq zp_useres float zp_lnf( float val);
zp_nthrw zp_useq zp_useres double zp_lnd( double val);
-zp_nthrw zp_useq zp_useres long double zp_lnld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_lndl(double long val);
+zp_nthrw zp_useq zp_useres float zp_lnf( float val);
/* logarithm */
-zp_nthrw zp_useq zp_useres float zp_logf( float val,float n);
zp_nthrw zp_useq zp_useres double zp_logd( double val,double n);
-zp_nthrw zp_useq zp_useres long double zp_logld(long double val,long double n);
+zp_nthrw zp_useq zp_useres double long zp_logdl(double long val,double long n);
+zp_nthrw zp_useq zp_useres float zp_logf( float val,float n);
/* nth root */
-zp_nthrw zp_useq zp_useres float zp_nrtf( float val,float n);
zp_nthrw zp_useq zp_useres double zp_nrtd( double val,double n);
-zp_nthrw zp_useq zp_useres long double zp_nrtld(long double val,long double n);
+zp_nthrw zp_useq zp_useres double long zp_nrtdl(double long val,double long n);
+zp_nthrw zp_useq zp_useres float zp_nrtf( float val,float n);
/* secant */
-zp_nthrw zp_useq zp_useres float zp_secf( float ang);
zp_nthrw zp_useq zp_useres double zp_secd( double ang);
-zp_nthrw zp_useq zp_useres long double zp_secld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_secdl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_secf( float ang);
/* sine */
-zp_nthrw zp_useq zp_useres float zp_sinf( float ang);
zp_nthrw zp_useq zp_useres double zp_sind( double ang);
-zp_nthrw zp_useq zp_useres long double zp_sinld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_sindl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_sinf( float ang);
/* square root */
-zp_nthrw zp_useq zp_useres float zp_sqrtf( float val);
zp_nthrw zp_useq zp_useres double zp_sqrtd( double val);
-zp_nthrw zp_useq zp_useres long double zp_sqrtld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_sqrtdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_sqrtf( float val);
/* tangens */
-zp_nthrw zp_useq zp_useres float zp_tanf( float ang);
zp_nthrw zp_useq zp_useres double zp_tand( double ang);
-zp_nthrw zp_useq zp_useres long double zp_tanld(long double ang);
+zp_nthrw zp_useq zp_useres double long zp_tandl(double long ang);
+zp_nthrw zp_useq zp_useres float zp_tanf( float ang);
/* "tesseract" (fourth) root */
-zp_nthrw zp_useq zp_useres float zp_tsrtf( float val);
zp_nthrw zp_useq zp_useres double zp_tsrtd( double val);
-zp_nthrw zp_useq zp_useres long double zp_tsrtld(long double val);
+zp_nthrw zp_useq zp_useres double long zp_tsrtdl(double long val);
+zp_nthrw zp_useq zp_useres float zp_tsrtf( float val);
/* two-space vector addition */
zp_nthrw zp_useq zp_useres zp_vec2f zp_vadd2f( zp_vec2f lvec,zp_vec2f rvec);
zp_nthrw zp_useq zp_useres zp_vec2d zp_vadd2d( zp_vec2d lvec,zp_vec2d rvec);
-zp_nthrw zp_useq zp_useres zp_vec2ld zp_vadd2ld(zp_vec2ld lvec,zp_vec2ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec2dl zp_vadd2dl(zp_vec2dl lvec,zp_vec2dl rvec);
/* three-space vector addition */
zp_nthrw zp_useq zp_useres zp_vec3f zp_vadd3f( zp_vec3f lvec,zp_vec3f rvec);
zp_nthrw zp_useq zp_useres zp_vec3d zp_vadd3d( zp_vec3d lvec,zp_vec3d rvec);
-zp_nthrw zp_useq zp_useres zp_vec3ld zp_vadd3ld(zp_vec3ld lvec,zp_vec3ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec3dl zp_vadd3dl(zp_vec3dl lvec,zp_vec3dl rvec);
/* four-space vector addition */
zp_nthrw zp_useq zp_useres zp_vec4f zp_v4addf( zp_vec4f lvec,zp_vec4f rvec);
zp_nthrw zp_useq zp_useres zp_vec4d zp_v4addd( zp_vec4d lvec,zp_vec4d rvec);
-zp_nthrw zp_useq zp_useres zp_vec4ld zp_v4addld(zp_vec4ld lvec,zp_vec4ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec4dl zp_v4adddl(zp_vec4dl lvec,zp_vec4dl rvec);
/* two-space vector subtraction */
zp_nthrw zp_useq zp_useres zp_vec2f zp_vsub2f( zp_vec2f lvec,zp_vec2f rvec);
zp_nthrw zp_useq zp_useres zp_vec2d zp_vsub2d( zp_vec2d lvec,zp_vec2d rvec);
-zp_nthrw zp_useq zp_useres zp_vec2ld zp_vsub2ld(zp_vec2ld lvec,zp_vec2ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec2dl zp_vsub2dl(zp_vec2dl lvec,zp_vec2dl rvec);
/* three-space vector subtraction */
zp_nthrw zp_useq zp_useres zp_vec3f zp_vsub3f( zp_vec3f lvec,zp_vec3f rvec);
zp_nthrw zp_useq zp_useres zp_vec3d zp_vsub3d( zp_vec3d lvec,zp_vec3d rvec);
-zp_nthrw zp_useq zp_useres zp_vec3ld zp_vsub3ld(zp_vec3ld lvec,zp_vec3ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec3dl zp_vsub3dl(zp_vec3dl lvec,zp_vec3dl rvec);
/* four-space vector subtraction */
zp_nthrw zp_useq zp_useres zp_vec4f zp_v4subf( zp_vec4f lvec,zp_vec4f rvec);
zp_nthrw zp_useq zp_useres zp_vec4d zp_v4subd( zp_vec4d lvec,zp_vec4d rvec);
-zp_nthrw zp_useq zp_useres zp_vec4ld zp_v4subld(zp_vec4ld lvec,zp_vec4ld rvec);
+zp_nthrw zp_useq zp_useres zp_vec4dl zp_v4subdl(zp_vec4dl lvec,zp_vec4dl rvec);
zp_prv_cdeclend
diff --git a/zp/include/zp/prv/flt.h b/zp/include/zp/prv/flt.h
index 7f397ff..91a2db9 100644
--- a/zp/include/zp/prv/flt.h
+++ b/zp/include/zp/prv/flt.h
@@ -49,34 +49,34 @@
__MINGW32__ \
|| __MINGW64__
-#define zp_minvalld ((long double)-1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
-#define zp_maxvalld ((long double)+1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
+#define zp_minvalld ((double long)-1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
+#define zp_maxvalld ((double long)+1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
#else
-#define zp_minvalld ((long double)-1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
-#define zp_maxvalld ((long double)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
+#define zp_minvalld ((double long)-1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
+#define zp_maxvalld ((double long)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
#endif
#else
-#define zp_minvalld ((long double)-1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
-#define zp_maxvalld ((long double)+1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
+#define zp_minvalld ((double long)-1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
+#define zp_maxvalld ((double long)+1.18973149535723176502126385303097020516906332229462420044032373389173700552297072261641029033652888285354569780749557731442744315367028843419812557385374367867359320070697326320191591828296152436552951064679108661431179063216977883889613478656060039914875343321145491116008867984515486651285234014977303760000912547939396622315138362241783854274391783813871780588948754057516822634765923557697480511372564902088485522249479139937758502601177354918009979622602685950855888360815984690023564513234659447638493985927645628457966177293040780660922910271504608538808795932778162298682754783076808004015069494230341172895777710033571401055977524212405734700738625166011082837911962300846927720096515350020847447079244384854591288672300061908512647211195136146752763351956292759795725027800298079590419313960302147099703527646744553092202267965628099149823208332964124103850923918473478612192169721054348428704835340811304257300221642134891734717423480071488075100206439051723424765600472176809648610799494341570347632064355862420744350442438056613601760883747816538902780957697597728686007148702828795556714140463261583262360276289631617397848425448686060994827086796804807870251185893083854658422304090880599629459458620190376604844679092600222541053077590106576067134720012584640695703025713896098375799892695455305236856075868317922311363951946885088077187210470520395758748001314313144425494391994017575316933939236688185618912993172910425292123683515992232205099800167710278403536014082929639811512287776813570604578934353545169653956125404884644716978689321167108722908808277835051822885764606221873970285165508372099234948333443522898475123275372663606621390228126470623407535207172405866507951821730346378263135339370677490195019784169044182473806316282858685774143258116536404021840272491339332094921949842244273042701987304453662035026238695780468200360144729199712309553005720614186697485284685618651483271597448120312194675168637934309618961510733006555242148519520176285859509105183947250286387163249416761380499631979144187025430270675849519200883791516940158174004671147787720145964446117520405945350476472180797576111172084627363927960033967047003761337450955318415007379641260504792325166135484129188421134082301547330475406707281876350361733290800595189632520707167390454777712968226520622565143991937680440029238090311243791261477625596469422198137514696707944687035800439250765945161837981185939204954403611491531078225107269148697980924094677214272701240437718740921675661363493890045123235166814608932240069799317601780533819184998193300841098599393876029260139091141452600372028487213241195542428210183120421610446740462163533690058366460659115629876474552506814500393294140413149540067760295100596225302282300363147382468105964844244132486457313743759509641616804802412935187620466813563687753281467553879887177183651289394719533506188500326760735438867336800207438784965701457609034985757124304510203873049485425670247933932280911052604153852899484920399109194612991249163328991799809438033787952209313146694614970593966415237594928589096048991612194498998638483702248667224914892467841020618336462741696957630763248023558797524525373703543388296086275342774001633343405508353704850737454481975472222897528108302089868263302028525992308416805453968791141829762998896457648276528750456285492426516521775079951625966922911497778896235667095662713848201819134832168799586365263762097828507009933729439678463987902491451422274252700636394232799848397673998715441855420156224415492665301451550468548925862027608576183712976335876121538256512963353814166394951655600026415918655485005705261143195291991880795452239464962763563017858089669222640623538289853586759599064700838568712381032959192649484625076899225841930548076362021508902214922052806984201835084058693849381549890944546197789302911357651677540623227829831403347327660395223160342282471752818181884430488092132193355086987339586127607367086665237555567580317149010847732009642431878007000879734603290627894355374356444885190719161645514115576193939969076741515640282654366402676009508752394550734155613586793306603174472092444651353236664764973540085196704077110364053815007348689179836404957060618953500508984091382686953509006678332447257871219660441528492484004185093281190896363417573989716659600075948780061916409485433875852065711654107226099628815012314437794400874930194474433078438899570184271000480830501217712356062289507626904285680004771889315808935851559386317665294808903126774702966254511086154895839508779675546413794489596052797520987481383976257859210575628440175934932416214833956535018919681138909184379573470326940634289008780584694035245347939808067427323629788710086717580253156130235606487870925986528841635097252953709111431720488774740553905400942537542411931794417513706468964386151771884986701034153254238591108962471088538580868883777725864856414593426212108664758848926003176234596076950884914966244415660441955208681198977024e4932l)
#endif
#elif \
zp_arc_arm
-#define zp_minvalld ((long double)-1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
-#define zp_maxvalld ((long double)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
+#define zp_minvalld ((double long)-1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
+#define zp_maxvalld ((double long)+1.79769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368e+308)
#elif \
zp_arc_arm64
-#define zp_minvalld ((long double)-1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l)
-#define zp_maxvalld ((long double)+1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l)
+#define zp_minvalld ((double long)-1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l)
+#define zp_maxvalld ((double long)+1.189731495357231765085759326628007016196469052641694045529698884212163579755312392324974012848462073525902033564749126859755265433573804462672698751945261490853461958725021262845865799405404493574681566096686172574953791792292256220777095858112702436475442537092608935138247345677279593806773692330094615746119725784172889892521939920757654204864565673356452247278152288867700638935595456496699511441752909606878513250948311396886100526833092128683974752192266386791880873694343077348155564101669971138512786874753496996549221727686770196551512812712488289469952298031867469924683981576664562667786719061499639630341657098305425237220876664630087808767256182803220212219924852375903049520911395910918921205273496768588119030111593018789368039232011671404175845108854706965215605777113516257404818817695075025715299705916714352103671782759119316034498392169720631800164034124698918142227577300459309880454715179606299895507583075851195185857971173167676966057998899352631885417716295302014668802384075846036226606480142977595407135050379808649130157164024060311786908796372510335873512774795275748595417572920936651398752709055215663939505589207804914540432978557623565645991208599669097180808881920063722771431218489011922209679053545963628417326002439732802939524313786668514027381434321036636571171670423586472759561231970793967839279147282720195377060602122638457883204809341717526809639253539447730280863675704796054050525162959099932535265586464682793821550087166946662209865086040990507131145474267411042839542322762994938759613112743837192839682676257555388372814490845395747128162065871588219108887240116651361962050800029176299938826082417547516732269930473133261258921845516815235455354310458114528303607394526100730578774092094736822286015459361126642549541799645333882549670764145955017051330800061253865140180153211929361456500343514792890205532021760061882232615736553377294980974059590520187961459799386741513028505934410453603480192383349321115171811051004108592830991811382552909064873029533418691087118107895004426881765865961841419267486232005929789956207494587649901662172318722999484512325826087031561936383689740686505279775296789331613683822798597040651600524129025149894873153196942095056670847466927644812596506700129443579512479230621373978088731257089799622902183824105412930483065603459863120371744282301377070153823878609951218937542956964157950988060608985782910656238116142203574104757451828170804875257446204128348513829082731722364189380493588338947664370623279820755831646205417488393062838201789547219543194450902113699925965376908192792152122212824578879336506875288617303469517112245451315447164280392523574962804175375927948971096983905242318797695347043690474223813266505639761164438844266531364626851219633994434154098562127395936184421821444273431534507860161614287022720984061569660333372788241037131538077377480152670583257920535569973318188112685673318997967497786786001251403873023920127717626858627038170562807276699687356274072773403132694104831615879354395811585825112837841563222761623334459188131537882355732483030085976890382969734476214593428191212717141333047577867552218517431064848760373196290310124466145087078377140528533048684204278799596652514009368964527494988719996088230065668196236298805733689960371306226158464997243490564472254071897564144128539839986096045563264771285585066304177995720101744844387158329767375560416207800878830072072413908657855667239546369357775781344288195989176313356856417845434232814886744226746707066979755577121788798468777700116472954103621810567107869855646414713502627836321256957407217461738363552424248762436478085351810995749293238174081331905048144612700905541425702220302537611494824228765324577933778519818778697340282580912780674979058938062556856001076057705982166686824756037569615760497619819482052758118532729333127733603742149847001463931981340719681330844408263017545241644293372483217234561694263937855759294448662979095419227451801588425977869694026601427919655168415895923043115191751872713346095752634608254475988154162254952597853199039645883742199236387610395830948074365988397707849632252080920941206268114832425403540515474312327876180802357701527842702008781378306569508588571830140611098042683009530862797403015355464377406249853964481000402231771665700893607521804084523668568649103258862666293372472441435563520595461701042390500795615834505944837326652542467444364861499184275097485253621979537504128523848241127715641240965261646703516395599407360083455079665191393229410544185167999099787655424462558900874388405649169453726739312260234815543297842308646072190147948072928456725835039546121182133640777769925841807579051735838823112759622714067509669913645288281894558925612972425252452248453502562347348900936766966136332741088135837550717443838484760651019872222926016920811114616937143207743488504602012776364256746872315205952601072228970686460932435222754496341763535189105548847634608972381760403137363968e+4932l)
#endif
@@ -94,7 +94,7 @@ typedef double zp_prv_f04;
zp_arc_arm64 /* x86 jealous :( */
#define zp_fixflt08 (0x1)
-typedef long double zp_prv_f08;
+typedef double long zp_prv_f08;
#elif \
__FLOAT128__ \
diff --git a/zp/source/any/mth/abs.cc b/zp/source/any/mth/abs.cc
index aecae23..b60d2b5 100644
--- a/zp/source/any/mth/abs.cc
+++ b/zp/source/any/mth/abs.cc
@@ -9,5 +9,5 @@
extern "C" {
zp_nthrw float zp_absf( float const val) {return ::zp::abs(val);}
zp_nthrw double zp_absd( double const val) {return ::zp::abs(val);}
- zp_nthrw long double zp_absld(long double const val) {return ::zp::abs(val);}
+ zp_nthrw double long zp_absdl(double long const val) {return ::zp::abs(val);}
}
diff --git a/zp/source/any/mth/dot.cc b/zp/source/any/mth/dot.cc
index 6140bce..a68bc41 100644
--- a/zp/source/any/mth/dot.cc
+++ b/zp/source/any/mth/dot.cc
@@ -9,13 +9,13 @@
extern "C" {
zp_nthrw auto zp_dot2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> float {return ::zp::dot(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,});}
zp_nthrw auto zp_dot2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> double {return ::zp::dot(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,});}
- zp_nthrw auto zp_dot2ld(::zp_vec2ld const lvec,::zp_vec2ld const rvec) -> long double {return ::zp::dot(::zp::vec2<long double> {lvec.x,lvec.y,},::zp::vec2<long double> {rvec.x,rvec.y,});}
+ zp_nthrw auto zp_dot2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> double long {return ::zp::dot(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,});}
zp_nthrw auto zp_dot3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> float {return ::zp::dot(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,});}
zp_nthrw auto zp_dot3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> double {return ::zp::dot(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,});}
- zp_nthrw auto zp_dot3ld(::zp_vec3ld const lvec,::zp_vec3ld const rvec) -> long double {return ::zp::dot(::zp::vec3<long double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<long double> {rvec.x,rvec.y,rvec.z,});}
+ zp_nthrw auto zp_dot3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> double long {return ::zp::dot(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,});}
zp_nthrw auto zp_dot4f( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> float {return ::zp::dot(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,});}
zp_nthrw auto zp_dot4d( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> double {return ::zp::dot(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,});}
- zp_nthrw auto zp_dot4ld(::zp_vec4ld const lvec,::zp_vec4ld const rvec) -> long double {return ::zp::dot(::zp::vec4<long double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<long double> {rvec.x,rvec.y,rvec.z,rvec.w,});}
+ zp_nthrw auto zp_dot4dl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> double long {return ::zp::dot(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,});}
}
diff --git a/zp/source/any/mth/vadd.cc b/zp/source/any/mth/vadd.cc
index 86b9a90..afc2005 100644
--- a/zp/source/any/mth/vadd.cc
+++ b/zp/source/any/mth/vadd.cc
@@ -9,13 +9,13 @@
extern "C" {
zp_nthrw auto zp_vadd2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vadd(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();}
zp_nthrw auto zp_vadd2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vadd(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();}
- zp_nthrw auto zp_vadd2ld(::zp_vec2ld const lvec,::zp_vec2ld const rvec) -> ::zp_vec2ld {return ::zp::vadd(::zp::vec2<long double> {lvec.x,lvec.y,},::zp::vec2<long double> {rvec.x,rvec.y,}).cvec();}
+ zp_nthrw auto zp_vadd2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vadd(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();}
zp_nthrw auto zp_vadd3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vadd(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();}
zp_nthrw auto zp_vadd3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vadd(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();}
- zp_nthrw auto zp_vadd3ld(::zp_vec3ld const lvec,::zp_vec3ld const rvec) -> ::zp_vec3ld {return ::zp::vadd(::zp::vec3<long double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<long double> {rvec.x,rvec.y,rvec.z,}).cvec();}
+ zp_nthrw auto zp_vadd3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vadd(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();}
zp_nthrw auto zp_v4addf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vadd(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
zp_nthrw auto zp_v4addd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vadd(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
- zp_nthrw auto zp_v4addld(::zp_vec4ld const lvec,::zp_vec4ld const rvec) -> ::zp_vec4ld {return ::zp::vadd(::zp::vec4<long double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<long double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
+ zp_nthrw auto zp_v4adddl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vadd(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
}
diff --git a/zp/source/any/mth/vsub.cc b/zp/source/any/mth/vsub.cc
index 704218e..2c5c8e2 100644
--- a/zp/source/any/mth/vsub.cc
+++ b/zp/source/any/mth/vsub.cc
@@ -9,13 +9,13 @@
extern "C" {
zp_nthrw auto zp_vsub2f( ::zp_vec2f const lvec,::zp_vec2f const rvec) -> ::zp_vec2f {return ::zp::vsub(::zp::vec2<float> {lvec.x,lvec.y,},::zp::vec2<float> {rvec.x,rvec.y,}).cvec();}
zp_nthrw auto zp_vsub2d( ::zp_vec2d const lvec,::zp_vec2d const rvec) -> ::zp_vec2d {return ::zp::vsub(::zp::vec2<double> {lvec.x,lvec.y,},::zp::vec2<double> {rvec.x,rvec.y,}).cvec();}
- zp_nthrw auto zp_vsub2ld(::zp_vec2ld const lvec,::zp_vec2ld const rvec) -> ::zp_vec2ld {return ::zp::vsub(::zp::vec2<long double> {lvec.x,lvec.y,},::zp::vec2<long double> {rvec.x,rvec.y,}).cvec();}
+ zp_nthrw auto zp_vsub2dl(::zp_vec2dl const lvec,::zp_vec2dl const rvec) -> ::zp_vec2dl {return ::zp::vsub(::zp::vec2<double long> {lvec.x,lvec.y,},::zp::vec2<double long> {rvec.x,rvec.y,}).cvec();}
zp_nthrw auto zp_vsub3f( ::zp_vec3f const lvec,::zp_vec3f const rvec) -> ::zp_vec3f {return ::zp::vsub(::zp::vec3<float> {lvec.x,lvec.y,lvec.z,},::zp::vec3<float> {rvec.x,rvec.y,rvec.z,}).cvec();}
zp_nthrw auto zp_vsub3d( ::zp_vec3d const lvec,::zp_vec3d const rvec) -> ::zp_vec3d {return ::zp::vsub(::zp::vec3<double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double> {rvec.x,rvec.y,rvec.z,}).cvec();}
- zp_nthrw auto zp_vsub3ld(::zp_vec3ld const lvec,::zp_vec3ld const rvec) -> ::zp_vec3ld {return ::zp::vsub(::zp::vec3<long double> {lvec.x,lvec.y,lvec.z,},::zp::vec3<long double> {rvec.x,rvec.y,rvec.z,}).cvec();}
+ zp_nthrw auto zp_vsub3dl(::zp_vec3dl const lvec,::zp_vec3dl const rvec) -> ::zp_vec3dl {return ::zp::vsub(::zp::vec3<double long> {lvec.x,lvec.y,lvec.z,},::zp::vec3<double long> {rvec.x,rvec.y,rvec.z,}).cvec();}
zp_nthrw auto zp_v4subf( ::zp_vec4f const lvec,::zp_vec4f const rvec) -> ::zp_vec4f {return ::zp::vsub(::zp::vec4<float> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<float> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
zp_nthrw auto zp_v4subd( ::zp_vec4d const lvec,::zp_vec4d const rvec) -> ::zp_vec4d {return ::zp::vsub(::zp::vec4<double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
- zp_nthrw auto zp_v4subld(::zp_vec4ld const lvec,::zp_vec4ld const rvec) -> ::zp_vec4ld {return ::zp::vsub(::zp::vec4<long double> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<long double> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
+ zp_nthrw auto zp_v4subdl(::zp_vec4dl const lvec,::zp_vec4dl const rvec) -> ::zp_vec4dl {return ::zp::vsub(::zp::vec4<double long> {lvec.x,lvec.y,lvec.z,lvec.w,},::zp::vec4<double long> {rvec.x,rvec.y,rvec.z,rvec.w,}).cvec();}
}