@mratsim
Hello I adapt Nim-decimal for management, compliant with the AS400. so I test a
maximum I introduced the boundary to be in agreement with the database
(POSTGRESQL but it is identical with DB2) on the other hand significant numbers
are important there are times when we have 20.15 zones in the financial sector
see bank (35 digits) during a changeover to € I had only 3cts of difference on
the whole accounting.
for the moment my test is stopped at proc fma everything seems OK to me so far
in management we do not use math functions the square root of the price of a
stock does not mean anything;) etc ... but I will test a lot of more also
introduce the calculation of the percentage into a formula
I'm going to put on github the modified project with another name, I do not
want there to be a confusion your project is healthy and mine needs to test
with a database and for the moment my tests are only on values and
interaction with a GUI on the other hand I will report that the base is based
on Nim-Decimal
I have found a mistake
proc * * (a, b: DecimalType): DecimalType =
var status: uint32 result = newDecimal () mpd_qmul (result [], a [], b [],
CTX_ADDR, addr status)
template * * [T: SomeNumber] (a: T, b: DecimalType): untyped =
newDecimal (a) * b
template * * [T: SomeNumber] (a: DecimalType, b: T): untyped =
newDecimal (b) * a
my test only works if I do template * * [T: SomeNumber] (a: DecimalType, b: T):
untyped = a * newDecimal (b)