You're almost there! Please answer a few more questions for access to the Applications content. Complete registration
Interested in joining? Complete your registration by providing Areas of Interest here. Register

sum function with big decimals numbers

Received Response
91
Views
8
Comments

Summary:

Hi,


We have a validation in gl rates Integration for checksum of all the rates in the source file.

But since gl rates have longer decimal values upto 40 decimals.

Sum function in OIC is not able to calculate it accurately.


We tried using format-number function as well as javascript to format it upto 10 decimals.

Its working in some cases but not in all cases.


For example:

checksum in file : 1634665.76687922166418017961359044899709


While calculating sum of all rates in file using below functions:


1. format-number -> fn:format-number(sum($ReadFile/ns19:ReadResponse/ns17:request-wrapper/ns17:rates/ns17:buy_rate) , "0.0000000000" )


2. Javascript -> parseFloat(buyRateAsString).toFixed(10)

Howdy, Stranger!

Log In

To view full details, sign in.

Register

Don't have an account? Click here to get started!