Return the remainder of dividing $float-var1 by $float-var2. The mod operator invokes the float-mod operator.
To learn more about using this operator with NaN, positive infinity, or negative infinity operands, see the W3C numeric-mod operator description.
op:float-mod(xs:float $float-var1, xs:float $float-var2) —> xs:float
Represents a 32 bit floating point number, for example: 1.1. |
||
Represents a 32 bit floating point number, for example: 1.1. |
Returns the remainder of dividing $float-var1 by $float-var2.
Invoking float-mod("1.25","1.0") returns the floating point value: .25 because 1.25 divided by 1.0 results in 1 with the remainder: .25. The remainder: .25 is returned as shown in the following example query:
<float-mod>{op:float-mod("1.25","1.0")}</float-mod>
The preceding query generates the following result:
<float-mod>0.25</float-mod>
Invoking float-mod("2.2","0")returns a NaN (Not a Number) value as shown in the following example query:
<float-mod>{op:float-mod("2.2","0")}</float-mod>
The preceding query generates the following result:
<float-mod>NaN</float-mod>
W3C float data type description.
W3C numeric-mod operator description.