• Calling Delphi 6 DLL from c#.NET and blasted rounding issues

    Recently I had the need to call a Delphi DLL from a .NET application. The delphi DLL would be performing a number of floating point arithmetic operations and returning results in as a string. In order to debug the delphi DLL another delphi application was written that uses this same interface and outputs the results. The problem I started experiencing was that the results produced when calling from my c# application varied from those called from the delphi application. Both used the same DLL and both produced the same inputs. I don’t have much in-depth knowledge about floating point numbers but I have read enough to know that most of…