Bugfix for computing Bernstein basis on each element

The comparison of <=1.0 was leading to bugs when the computed knot was only very close to 1 (i.e. ~0.99999999999). Fixed by changing to <=0.5, since we can choose any value in the open interval (0,1), and this way we avoid the need for tolerances.