Reputation: 79
I have a problem that needs some suggestions from you folks. Example:
selling_price = updated cost + postage + profit + paypal + FVF;
paypal = selling_price * 0.022 + 0.3;
How can I solve/calculate a value that the answer is basing on the answer of the other value?
In this case, the selling_price
value is needing the paypal
value to generate the output and also the paypal
value is needing the selling_price
value to generate the output.
I found out that this one is data dependency problem. Please help me analyze this one. Any help will be much more appreciated.
Upvotes: 0
Views: 104
Reputation: 16544
I think it should be more like this
total = updated_cost + postage + profit + FVF
paypal = total * 0.022 + 0.3
selling_price = total + paypal
Otherwise it would be an impossible to solve "circular logic"
Upvotes: 1