Jump to content
Koumei & the Five Fates: Share Bug Reports and Feedback Here! ×
  • 0

Madurai Slot + Transient Fortitude = -1% Duration?


Voidforged
 Share

Question

Can anyone explain why this happens? 20 second example clip below.

I also just realised, as I pasted the link here, that this is the reason for some people having 12% and others having 13% duration on their EV builds.

Thanks,

Edited by Voidforged
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

  • 0
Just now, WhiteMarker said:

It has to do with the order of the mods.
Tha game calculates stuff in a certain order. End of the story. Nothing special.

But why does calculating Transient first cause the .5% to be rounded down instead of up? Continuity is still only adding whole numbers.

Link to comment
Share on other sites

  • 0

I don't know exactly what math they're doing in the background, but this likely has something to do with the fact that you can't express those numbers exactly inside a computer.  They're probably using floating point, which has trouble representing decimal numbers exactly, and this trouble is exacerbated when you start doing addition or multiplication on them.  

Your example: 1.0f * (1.0f - 0.6f + 0.55f - 0.275f) = 0.67499995.  Unfortunately, when I switch the order of 0.55f and -0.275f I still get 0.67499995, so I'm not exactly sure why it doesn't round to 67% in both cases.  But I'm sure there's no actual difference, it's just a precision/rounding issue.

Edit: I should probably mention that percentages are stored as fractions, so 60% = 0.6f internally, and 27.5% = 0.275f internally.

Edited by Buff00n
Link to comment
Share on other sites

  • 0

I got... something.

-0.6f - 0.275f + 0.55f + 1.0f = 0.675f

-0.6f + 0.55f - 0.275f + 1.0f = 0.67499995f

This ordering only makes sense if the mods are added *clockwise*, with the +100% base value added last.  However, it does show that it's possible to get two slightly different answers with floating point addition just by changing the order.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...