Divides $float-var1 by $float-var2. The div operator invokes the float-divide operator .
If the value of $float-var2 is equal to zero, the value of Infinity is returned. To learn more see Divide by Zero.
op:float-divide(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 floating point value of dividing $float-var1 by $float-var2.
Invoking float-divide("4.4","2.2") returns the floating point value of 2.0 as shown in the following example query:
<float-divide>{op:float-divide("4.4","2.2")}</float-divide>
The preceding query generates the following result:
<float-divide>2.0</float-divide>
Invoking float-divide("2.2","0") returns the Infinity value as shown in the following example query:
<float-divide>{op:float-divide("2.2","0")}</float-divide>
The preceding query generates the following result:
<float-divide>Infinity</float-divide>
To learn more see the IEEE Standard for Binary Floating-Point Arthimetic.
W3C float data type description.
W3C numeric-divide operator description.