+ 5
Good day Tim Fussnegger! In this case you may consider to use decimal instead of double for more accurate result. You may find out more information at link below: https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/builtin-types/floating-point-numeric-types Hopefully it helps! 😉
23rd Jan 2020, 12:37 AM
Zephyr Koo
Zephyr Koo - avatar
+ 6
Tim Fussnegger You're welcome and hope it's working well or otherwise please keep us updated! 😊
24th Jan 2020, 7:33 PM
Zephyr Koo
Zephyr Koo - avatar
+ 5
Tim Fussnegger I'm agree with Fernando Pozzetti, addition information (dataset, Excel & C# formula) will definitely help to troubleshoot the problem.
30th Jan 2020, 12:20 AM
Zephyr Koo
Zephyr Koo - avatar
+ 2
Show your code.
23rd Jan 2020, 2:32 AM
Maninder $ingh
Maninder $ingh - avatar
+ 1
Can you add pictures, or the code of both Excel and your program? I am far from being an expert in Excel, but, that way I would be able to check it out.
29th Jan 2020, 7:35 PM
Fernando Pozzetti
Fernando Pozzetti - avatar
0
Differences happen because you are not explicitly telling the code to round up, down, or what to do if the result is .5 Always use doubles and tell your code/application to behave the same way by using math functions to round your result, such as Ceiling, Floor, Abs, etc.
23rd Jan 2020, 3:16 AM
Fernando Pozzetti
Fernando Pozzetti - avatar