vectorgraphics / asymptote

2D & 3D TeX-Aware Vector Graphics Language
https://asymptote.sourceforge.io/
GNU General Public License v3.0
547 stars 90 forks source link

Output of 'real[] uniform(real a, real b, int n)' not restricted to [a,b] #309

Closed DrBurner closed 2 years ago

DrBurner commented 2 years ago

For special situations, the output of uniform() might be larger than the upper limit.

Example:

> real a=uniform(0,254,13)[13];
> a - 254
2.8421709430404e-14
> ceil(a)
255

Asymptote version 2.79 on Arch Linux