Closed MaciejPatro closed 2 years ago
Sorry for the delay. Would you be able to fix the precision warning?
../include/range/v3/view/linear_distribute.hpp:78:51: error: implicit conversion from 'long' to 'double' may lose precision [-Werror,-Wimplicit-int-float-conversion]
from_ = T(to_ - (delta_ * (n_ - 1)));
~ ~~~^~~
And as a heads up, I have rebased this PR. You'll need to fetch it fresh.
linear_distribute
has an unexpected behavior for integral values when number of values to be calculated is greater than distance betweenfrom
andto
. My expectation was similar tonumpy
behavior where calculated values are "evenly" distributed with integral precision.Expectation:
Current implementation:
Improved implementation: