Wrong calculation of decimal places (always happens in any version, even the lat
-
Wrong calculation of decimal places (always happens in any version, even the latest)
I updated to version 3.0
In the Cost Calculator Builder, the count gives 0.16. The correct would be, 0.15 and the 625 should be discarded. What happens is that these values ??are added, multiplied, subtracted or divided infinitely, in a hidden way. Instead of just multiplying these two decimal places, besides these two decimal places they are added secretly and so it gives a crazy value. There is a Settings, Currency, Number of Decimals option, where you can put two decimal places, but it only hides the continuation of the numbers, causing the calculation to continue to be done, secretly, thus forming a different number than expected. I didn’t enable rounding, otherwise, they would be whole numbers, they wouldn’t have decimal places after the comma.
On any pocket calculator, it gives the value of 13.50. In the Cost Calculator Builder, the value is 14.0625. When you calculate on a page made by me and see that it gives this number different from normal, the client doesn’t believe your plugin.
In currency, microcents are not calculated. The correct calculation after the comma is, calculate two digits and stop there. Your plugin does calculations from decimal places onwards from the third digit after the comma without me knowing, then it gives a different number from the right one.In currency, microcents are not calculated. The right thing is to calculate two decimal places.
Your plugin is calculating from the third decimal place too. With that, the result comes out very wrong, it gives a very big difference in the total value. The plugin only works for whole numbers, but I need to use it for fractional numbers as well.
Will somebody give you a half-penny change? Of course.
Please fix this.
Put some option to actually drop above two decimal places after the comma.
This number 0.15625 has to be the exact value of 0.15. Where 0.15 x 2 = 0.30 and not 0.3125. If you set 2 decimal places in Currencies, decimal place numbers, the account will secretly be done with those extra decimal places. And for currency, we only use 2 decimal places.
Mathematical operators in the Cost Calculator Builder help, only round to whole numbers. I use the Hello Elementor theme, it is very basic.
image link
https://drive.google.com/file/d/12a-2vzsUSTWJcaPi_gxk5_cu-N0YC8Ry/view?usp=sharingHow the calculation was done:
Total fields, has the following equation: quantity_field_id_0 / (quantity_field_id_2 * quantity_field_id_1)
quantity_field_id_0 = with value input 1500
quantity_field_id_2 = with value input 20
quantity_field_id_1 = with value input 81500 / (20 x 8) = 160
1500 / 160 = 9.375
9.375 / 60 = 0.15625
0.15625 x 90 = 14.0625 [wrong]
The exact count is 0.15 x 90 = 13.50 [correct]Thanks for your attention!
The page I need help with: [log in to see the link]
- The topic ‘Wrong calculation of decimal places (always happens in any version, even the lat’ is closed to new replies.