Closed fhirschberger closed 4 years ago
Finding the maximum value of an array with maxval(), e.g.,
adept::Vector v{-2, -1}; std::cout << "v : " << v << "\n"; std::cout << "maxval(v) : " << adept::maxval(v) << "\n";
returns
v : {-2, -1} maxval(v) : 2.22507e-308
instead of -1. In reduce.h in line 217
T first_value() { return std::numeric_limits<T>::min(); }
returns a value > 0 for double, whereas lowest() returns -1.79769e+308. Also consider the output for inf
double
lowest()
v : {inf, inf} minval(v) : 1.79769e+308
Thanks for reporting this bug - the latest commit should fix it.
Finding the maximum value of an array with maxval(), e.g.,
returns
instead of -1. In reduce.h in line 217
returns a value > 0 for
double
, whereaslowest()
returns -1.79769e+308. Also consider the output for inf