how i cope rounding errors doubles vb.net?
i'm perplexing change set banking values controlling vb.net. totals both values ban double. i'm removing rounding errors situations.
what's best proceed prevaricate this? there form i benefit double? i spin following value twin decimal places?
here's formula - i substantially don't need arrangement it, nonetheless only case.
low ninvvalue double
low ncreditvalue double
any oreferenceitem omatchinvoices
low nunallocated double = oreferenceitem.documentoutstandingvalue - oreferenceitem.documentallocatedvalue
((nunallocated <> 0) (sreferencevalue = oreferenceitem.instrumentno)) then
icount = icount + 1
(oreferenceitem.isdebit) (nunallocated > 0) then
ninvvalue = ninvvalue + nunallocated
invoicelist.add(nunallocated.tostring("c"), oreferenceitem.urn.tostring)
finish if
(oreferenceitem.iscredit) (nunallocated < 0) then
ncreditvalue = ncreditvalue - nunallocated
creditlist.add(nunallocated.tostring("c"), oreferenceitem.urn.tostring)
finish if
finish if
next
Comments
Post a Comment