Francesco149 / oppai-ng

difficulty and pp calculator for osu!. better, smaller, faster rewrite of https://github.com/Francesco149/oppai
The Unlicense
155 stars 36 forks source link

Aspire map breaks everything (enormous pp values) #17

Closed christopher-dG closed 6 years ago

christopher-dG commented 6 years ago

I don't know how useful a report this will be because this map was basically made to break everything.

oot@c078d79bf267:/tmp/osubot# ./oppai-1.1.26-x86_64-alpine-linux-musl/oppai 1258033.osu 
Helblinde - The Solace of Oblivion [Aspire] mapped by MinG3012 

AR9.36 OD8.69 CS3.99 HP2.56
300 hitwindow: 26.5 ms
737 circles, 767 sliders, 4 spinners
4767/4767x
959 spacing singletaps (63.8057%)
1036 notes within singletap bpm threshold (68.9288%)

5.5618e+94 stars (3.70787e+94 aim, 4.22458e+59 speed)
100%
2.61967e+284 aim pp
3.87458e+179 speed pp
99.15 acc pp

inf pp
root@c078d79bf267:/tmp/osubot# uname -a
Linux c078d79bf267 4.9.38-16.35.amzn1.x86_64 #1 SMP Sat Aug 5 01:39:35 UTC 2017 x86_64 GNU/Linux

Tested with the latest release binary.

It resulted in this gem

Francesco149 commented 6 years ago

this map should probably be an exception since the site shows 0 stars and it uses infinity bpm. i don't think there's even a valid pp value for this. also, since json doesn't support inf and NaN i make it output the maximum positive value for doubles which is what produced that funny output on the reddit bot.

what do you suggest? cause I don't think there's any way to output infinity over json. should I just output zero for infinity in json mode?

christopher-dG commented 6 years ago

There's not really a good answer, but 0 would be fine, -1 if it's already a signed value. On my end for the bot I'll probably just make it not show pp if it's above some threshold or something.

Francesco149 commented 6 years ago

I guess -1 is fine since pp can't be normally negative

Francesco149 commented 6 years ago

another solution on your end could be to force scientific notation or whatever on the output so it displays 1.79769e+308 either way, i've changed it to -1 which is a good way to signal infinity since we don't use negative values anyways

Francesco149 commented 6 years ago

closing this for now, reopen if you come up with more ideas to handle nan and infinity, but i think the current solution is good enough

christopher-dG commented 6 years ago

For sure, -1 is working fine for me.