Well for numbers larger than that, the ‘divideFloats’ service loses accuracy.
For example with 99999999999999999 as divident and 4 as divisor, divideFloats returns 25000000000000000.0 as quotient. On the other hand if you use your Windows calculator app, the quotient would be 24999999999999999.75.
This results in negative remainders. For example with that divisor and and divident you would get a remainder of -1 and an isDivisible value of No.
On the other hand, with the same divident and 9 as the divisor, which must clearly return isDivisible = Yes and return nothing for a remainder, the results become unexpected. One would get isDivisible = “No” and remainder as -9.
I think the ‘divideFloats’ BIS rounds of the significant digits far “quicker” than your average calculator.
I do think that for most practical applications, the biggest number I have successfully tested should be good enough.
In my free time I also created a floatRound service, which rounds off the significant digits in a floating point number depending on how many significant digits the user inputs. Would any one like me to share that as well?
Thanks
pEnGuIn
#Integration-Server-and-ESB#webMethods#Flow-and-Java-services