xsharp.eu • Small incompatibility with mod operator/function - Page 2
Page 2 of 2

Small incompatibility with mod operator/function

Posted: Thu Feb 25, 2021 7:16 am
by wriedmann
Hi Arne,
please let me add my 0.2 cents: I expect that a lot of rounding errors will be gone only moving from float to decimal.... decimal may be slower than "classic" numeric datatypes, but that is irrelevant.
This will be the most important thing in a .NET migration (my first programming job was using Cobol<g>).
Wolfgang

Small incompatibility with mod operator/function

Posted: Thu Feb 25, 2021 7:38 am
by ArneOrtlinghaus
Hi Wolfgang,
yes, I see it like you. But: ... everything must work with decimal.
- There mustn't be any function in between that uses double (self written or basic X# function)
- Every use of a database/file/control input/output in between must be verified separately, because here mechanisms are used outside of the decimal calculation.

What should remain are the roundings that are prescribed by business rules, for example tax roundings or currency exchange roundings.

Small incompatibility with mod operator/function

Posted: Thu Feb 25, 2021 8:11 am
by wriedmann
Hi Arne,
I agree with you.
IMHO there should be an option in the RDD that every numeric field get with decimals should return a decimal instead of a float.
If I remember correctly, Robert had written sometimes ago that the runtime would see untyped numeric datatypes with decimals as "decimal" datatype and not more as float.
Wolfgang