Hello @Malik_Shavkatov,
The old trick, that almost always works for this kind of debugging, is to cross-check each intermediate step’s outcome with hand calculation. I have looked at the input parameters to the function and found them to be a bit “random”, so I am sharing some expected numbers with you for your cross-checking.
The exercise asks us to compute D1, A1, D2, A2 in eight steps, so you might also print
your numbers and check with mine to see where starts to go wrong. Once you spot it, then go back to the instruction because a similar case seemed to be finally resolved by following the instructions.
Good luck!
Raymond