3 ms·
An argument for the proposition that this behavior was intended is that if the purpose of sign was to get the sign for order, then it was actually entirely unne
by dionidium 13y ago
An argument for the proposition that this behavior was intended is that if the purpose of sign was to get the sign for order, then it was actually entirely unnecessary and they could have just done something like this:
order = log(max(abs(s), 1)) * ((s) / max(abs(s), 1))
I'd prefer the benefit of the doubt, especially given their previous responses.
- dionidium 13y agoMade a mistake when rearranging parens. It's not wrong, just a little ugly. That should of course be: order = log(max(abs(s), 1)) * (s / max(abs(s), 1)) Or, better: ns = max(abs(s), 1) order = log(ns) * (s / ns)
- makomk 13y agoThat's not a very good argument - they could just as easily have calculated sign as ((s) / max(abs(s), 1)) if this was intentional, so the fact they didn't probably just means whoever wrote the code didn't think of that trick.
- dionidium 13y agoThat a good point. Of course, I'm reasoning backward to justify something that's already there, so it started its life as a bad argument :)