Software AG Products 10.7 | Integrating On-Premises and Cloud Applications | Integration Cloud | Built-In Services | Built-In Services | subtractFloats
 
subtractFloats
Subtracts one floating point number (represented as a String) from another and returns the difference.
Input Parameters
num1
String Number (floating point number represented as a String).
num2
String Number (floating point number represented as a String) to subtract from num1.
precision
String Optional. Number of decimal places to which the difference will be rounded. The default value is null.
Output Parameters
value
String Difference of num1 - num2. If a difference cannot be produced, value contains one of the following:
Value
Description
Infinity
The computation produces a positive value that overflows the representable range of a float type.
-Infinity
The computation produces a negative value that overflows the representable range of a float type.
0.0
The computation produces a value that underflows the representable range of a float type (for example, subtracting a number from infinity).
NaN
The computation produces a value that cannot be represented as a number (for example, the result of an illegal operation such as multiplying zero by zero or any operation that uses NaN as input, such as 10.0 - NaN = NaN).
Usage Notes
Make sure the strings that are passed to the service in num1andnum2 are in a locale-neutral format (that is, using the pattern -####.##). Passing locally formatted strings may result in unexpected results. For example, calling addFloats in a German locale with the arguments 1,23 and 2,34 will result in the value 357, not 3.57 or 3,57.