Closed misos1 closed 5 years ago
I like the Math.fround approach. I'm going to post a PR here for comment for a couple of days before committing it and cutting a release. I think that since this changes the output of the system, this is at least a minor version bump. Opinions?
Also, in my opinion, Float32Array and Float64Array should always generate floats of that size, not something smaller -- so I've made that fix here as well.
I understand that handling half precision floats can be expensive as there is scarce native hardware support so it is hidden behind canonical. But I am guessing that it should not be so slow with single precision floats.
So why not do it in this way:
Would not be
Math.fround
useful here?