3 ms·
Floats are weird and unpredictable like that. You can save yourself an RNG call if you simply add two floats. ;-) More seriously, the result here really is x +
by jordigh 10y ago
Floats are weird and unpredictable like that. You can save yourself an RNG call if you simply add two floats. ;-)
More seriously, the result here really is x + y/norm(y). I would be really interested in knowing what the bug is here. Probably just a C&P error that forgot to update the result, since y is unitized (in-place?) in a call further below.