# op:double-divide

Divides $double-var1 by $double-var2. The div operator invokes the double-divide operator.

If the value of $double-var2 is equal to zero, the value of Infinity is returned. To learn more see Divide by Zero.

### Signatures

op:double-divide(xs:double $double-var1, xs:double $double-var2) —> xs:double

### Arguments

Data Type | Argument | Description
--- | --- | ---
xs:double | $double-var1 | Represents a double precision (64 bit) floating point number, for example: 1.1.
xs:double | $double-var2 | Represents a double precision (64 bit) floating point number, for example: 1.1.

### Returns

Returns the double precision floating point value of dividing $double-var1 by $double-var2.

### Examples

#### Simple

Invoking double-divide("4.4","2.2") returns the double precision floating point value of 2.0 as shown in the following example query:

    <double-divide>{op:double-divide("4.4","2.2")}</double-divide>

The preceding query generates the following result:

    <double-divide>2.0</double-divide>

#### Divide by Zero

Invoking double-divide("2.2","0")returns the Infinity value as shown in the following example query:

    <double-divide>{op:double-divide("2.2","0")}</double-divide>

The preceding query generates the following result:

    <double-divide>Infinity</double-divide>

To learn more see the IEEE Standard for Binary Floating-Point Arthimetic.

Related Topics

W3C double data type description.

W3C numeric-divide operator description.

IEEE Standard for Binary Floating-Point Arthimetic.