vihanb / PPCG-Design

A redesign of the PPCG website
codegolf.stackexchange.com
35 stars 13 forks source link

Scientific notation is not sorted correctly. #126

Open Wheatwizard opened 7 years ago

Wheatwizard commented 7 years ago

On this question Unary is marked as scoring 182 bytes when it in actuality scores 10182 bytes, because the author expressed the byte count in scientific notation.

This happens both when it is written as

7*10^182

and

7*10<sup>182</sup>
ETHproductions commented 7 years ago

This is more of a lack of a feature than a bug. Or does it count as a bug? Does a function improperly handling input it's not designed to handle count as a bug?

Anyway, I do think it's a good idea to add this feature to the userscript leaderboard. I recall adding support for this to the leaderboard on this challenge, so I'll see if I can't translate that over to here when I get a chance.

Wheatwizard commented 7 years ago

I don't necessarily care if it ranks such answers properly but I think it should not include answers it can't parse on the leaderboard.

ETHproductions commented 7 years ago

The problem is it does successfully parse these answers, albeit incorrectly. (There has to be some leeway because especially on old answers, the header can use one of a bajillion different formats to specify the byte count.)

ArthaTi commented 6 years ago

"E" notation should also be implemented then.

I sometimes see arrow notation used too, on non-codegolf challenges.

ETHproductions commented 6 years ago

Arrow notation shouldn't be much of an issue, since we don't currently support leaderboards on non-code-golf challenges to my knowledge. E notation is a pretty good idea though.