Skip to content
TORNLIFE More

Incorrect stock rounding

Started by Vladar [1996140] on in Bugs & Issues.

3 replies · 106 views · thread synced · 9 days ago · View on torn.com
About this thread

Posts archived: 4 / 4 posts (100%) · the total is Torn's reply count + the opening post at the last fetch

Counted by TornLife from the archived posts.

Archived posts
4
Discussion span
→
People posting
4
Likes on archived posts
1
Posts by staff, officers and moderators
2
Authority score
58 / 100
Historical score
32 / 100
Story score
34 / 100
Engagement score
43 / 100
Vladar [1996140]
When you buy a stock, it rounds the price up, and when you sell, it rounds down (this makes sense). Hence this transaction nets -2$:

[image: i.gyazo.com]

But the log doesn't round the same way - it seems to round to the nearest dollar instead:

[image: i.gyazo.com]

So my log would indicate I should only be out $1, but really I'm down $2, making it seem like money disappeared. The log should, ideally, display the actual purchase/sale value ($48/$46) instead of a rounded value ($47/$46).
Chedburn [1] Admin Developer
Thanks for the clear report, I'll ask Serhii to ensure the values recorded in the log are rounded in the same way (ceil for buy, floor for sell).