Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

My pattern is invalid? #60

Closed
MsHinchy opened this issue Apr 10, 2020 · 3 comments · Fixed by #106
Closed

My pattern is invalid? #60

MsHinchy opened this issue Apr 10, 2020 · 3 comments · Fixed by #106
Labels
prediction Prediction / Calculation Issues

Comments

@MsHinchy
Copy link

image

My turnip price was 108, barely above the range of valid patterns I get for my shop prices this week. I have not bought from Daisy Mae on my own island yet, but my friend did come to buy from her, so maybe that has something to do with it?

@dstaley
Copy link

dstaley commented Apr 10, 2020

I think this is a result of wonky floating point math in JavaScript. From what I've read, the original C++ code uses 32-bit integers, and when they're converted to JavaScript's floating point numbers it can result in off-by-one miscalculations.

@ZZZZzzzzac ZZZZzzzzac mentioned this issue Apr 14, 2020
@mikebryant mikebryant added the prediction Prediction / Calculation Issues label Apr 14, 2020
@mikebryant
Copy link
Owner

I don't think this is an issue with floating point - the difference is much too big.

108*0.85 is 91.8 - so according to the extracted code for a decreasing pattern - your numbers are impossible, Monday AM should be minimum 92

Therefore I think either a resident of your island must have bought turnips that week.. or while we don't think so, the visitor buying turnips must have affected things..

@WardenDrew
Copy link

I've got another instance of invalid pattern numbers this week:

First Time: No
Last Weeks Pattern: Unknown
Sunday: 92
Monday AM: 95
Monday PM: 92
Tuesday AM: 179
Tuesday PM: 253

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
prediction Prediction / Calculation Issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants