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

What could possibly go wrong??? #19366

Merged
merged 1 commit into from
Sep 19, 2018

Conversation

Exxion
Copy link
Member

@Exxion Exxion commented Aug 16, 2018

0% tested. Merge at your own risk.

In all seriousness, the list of things that could possibly go wrong is fairly short but certainly not empty
I'll make sure it doesn't break anything tomorrow (probably)

@Exxion Exxion added Needs Moar Testing This issue potentially doesn't actually happen the way it's stated to happen. / Test PR more. System Modifies an underlying system within the game, may not affect players in any way. ✋ Do Not Merge ✋ Don't you do it. labels Aug 16, 2018
@Kurfursten
Copy link
Collaborator

I am pretty sure we did this before with the exact same "what could go wrong" meme and shit started to break because we actually do use infinity for some things that require calculations. Purely for example here if you insert an infinite power cell into an APC it crashes because it has to divide by infinity to determine percent charge.

@Exxion
Copy link
Member Author

Exxion commented Aug 16, 2018

  1. Infinite power cells don't use this define
  2. We never did have this define set like this on live. Sonix had it for one commit in a PR but reverted it before it got merged just in case
  3. Dividing by infinity works just fine. The reason APCs broke when infinite power cells had infinite capacity is because the browser fails to display the number, not because the math breaks

@Kurfursten
Copy link
Collaborator

🤷‍♂️ I must have been recalling this #14621 (comment)

@DamianX
Copy link
Contributor

DamianX commented Aug 16, 2018

remember #15457
is there a reason to do this?

@Exxion
Copy link
Member Author

Exxion commented Aug 16, 2018

  1. Yes, I remember that. Again, infinite cells don't use this macro. Again, that was a problem specifically with showing it in a browser.
  2. Mathematical correctness and an asston of possible (albeit unlikely) edge case bugs

@DamianX
Copy link
Contributor

DamianX commented Aug 16, 2018

fine by me

@ghost
Copy link

ghost commented Aug 23, 2018

amazing related story, it's seems they (Microsoft) named positive infinity 1.#INF because it would otherwise fuck up Visual C runtime library's rounding algorithm. And there is funny corner case related to that.
https://blogs.msdn.microsoft.com/oldnewthing/20130228-01/?p=5103

@DamianX DamianX merged commit e433300 into vgstation-coders:Bleeding-Edge Sep 19, 2018
@Kurfursten Kurfursten removed the ✋ Do Not Merge ✋ Don't you do it. label Dec 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Moar Testing This issue potentially doesn't actually happen the way it's stated to happen. / Test PR more. System Modifies an underlying system within the game, may not affect players in any way.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants