How does Shopify calculate live line item totals?

I am currently working on live line item total calculation, and I ran into this confusing result from shopify draft order. Could anyone tells me how the system get this total instead of $178.96. Thanks!!!

Hi,

Your discount is already applied. It might be applied another discount.

Please click ‘Edit discount’ in Payment part and remove any additional discount applied.

Then, you will get $178.94 includes the discount.

Hi Kim, thank you for answering my question, but it does not seem to answer my question. The original price is $50.33 when it added 11.12% discount the calculation gave me $44.74 as a unit price which makes sense, but if we take $44.74 x 4 we will get $178.96 instead of $178.94 from shopify calculation. That part confuses me on how can we get that same matching number.