LinSpaced last value might be greater than high
Submitted by Daniel A Paladim
Assigned to Nobody
Link to original bugzilla bug (#1004)
Version: 3.2
Description
Sometimes, the last value of vector generated through LinSpaced will be greater than high. I report this an issue, because evaluating a function defined in an interval [low,high] through the values generated by LinSpaced(n,low,high) may cause the function to launch an exception complaining that values are outside the domain.
One combination of values,
VectorXd v = VectorXd::LinSpaced(51,0.0,7.0);
if(v.tail(1)(0) > end) {
cout << "Bigger" << '\n';
}
Matlab and Numpy seem to copy high into the last position.
Blocking
Edited by Eigen Bugzilla