3 ms·
I know about nothing about PyPy internals but case float_abs(_): - return float + return float.with_range(low=0, high=None) to me, loo
by Someone 1y ago
I know about nothing about PyPy internals but
case float_abs(_):
- return float
+ return float.with_range(low=0, high=None)
to me, looks like a risky change. I would fear this could introduce a bug when computing
isNaN(abs(NaN))
That should return true, but with that change, I fear it could return false because it informs the optimizer that abs never returns a NaN.
- oasisaimlessly 1y agoWhere'd you get that patch from? I can't find it in the blog post. EDIT: Ah, other comment mentions article was edited.
- stassats 1y agoThat shouldn't mean that it doesn't return a NaN. Things are generally not optimized away because of NaNs. E.g. in GCC, abs(c) > -1.0 is not folded, unless building with -ffast-math