2 ms·
Just curious (and only marginally, if at all, on topic): - Why is that assert there? - Why aren't that "len = (1.0f / len)" and the "= len" statements in an e
by Someone 16y ago
Just curious (and only marginally, if at all, on topic):
- Why is that assert there?
- Why aren't that "len = (1.0f / len)" and the "= len" statements in an else clause? (are there CPUs where always doing the division and those 3 multiplications is faster? Will compilers optimize that, anyways? Are there IEEE subtleties that make x= 1.0f not a no-op?)
- Wouldn't it, on some platforms, be better to use double for intermediate results?