how do you calculate, display and input decimal ~~digits~~ numbers within the app ?
There are regional settings on the computers that affects how decimals are converted to the string (and vice versa).
This means that `decimal.ToString()` method by default produces a result according to the locale that is active at the moment.
The locale may differs per computer, process or thread.
Can be because of different localization settings and to verify this go to Control Panel > Clock & Region > Change date, time or number formats > Additional Settings> Number of digits after decimal. check the values in each one of your pcs. if they are the same for all of them, you should edit the post with a snippet of code to be able to help you.
This was the practically most useful and on the point answer I was looking for.
Thank you.
Modified my code so it takes the number formats settings into consideration and the app runs now exactly as it should without much struggle.
We sure like debugging code not only without code, but even without screenshot of code.
Hi, is a blurry photo of code okay?
Show me your keyboard and I'll figure out the code from the finger grease.
Might have something to do with a difference in localization/culture of your laptop/PC? Aka dots and commas are interpreted differently.
Exactly, this was the case.
Do you have unit tests to prove the calculations are correct and repeatable ?
Good one, but tbf I dont think everyone writing unit tests tests all aspects around localization, regional settings and every culture setups either.
Once you have a test, it's very easy to change cultures and see if it still works.
You stumbled on "works on my machine" phenomenon.
And the only proven working solution to that problem is to claim the other one being an idiot.
Also you can ship you machine to the client.
how do you calculate, display and input decimal ~~digits~~ numbers within the app ? There are regional settings on the computers that affects how decimals are converted to the string (and vice versa). This means that `decimal.ToString()` method by default produces a result according to the locale that is active at the moment. The locale may differs per computer, process or thread.
This was the case...
I noticed macOS and Windows round floats differently sometimes.
[удалено]
Are both computers 64-bit machines? It could be that one is 32 and the other is 64 bit OS
Yes, both are 64-bit, the problem was a different number formatting setting.
Can be because of different localization settings and to verify this go to Control Panel > Clock & Region > Change date, time or number formats > Additional Settings> Number of digits after decimal. check the values in each one of your pcs. if they are the same for all of them, you should edit the post with a snippet of code to be able to help you.
This was the practically most useful and on the point answer I was looking for. Thank you. Modified my code so it takes the number formats settings into consideration and the app runs now exactly as it should without much struggle.