Inside Macintosh: Operating System Utilities /
Chapter 3 - Mathematical and Logical Utilities / Mathematical and Logical Utilities Reference
Routines / Multiplying and Dividing Fixed-Point Numbers

### FracDiv

You can use the `FracDiv` function to divide two variables of the same type (`Fract`, `Fixed`, or `LongInt`) or to divide a `LongInt` or `Fixed` number by a `Fract` number.

```FUNCTION FracDiv (a, b: Fract): Fract;
```
`a`
The first operand, which can be a variable of type `Fract` or a variable of type `Fixed` or `LongInt`.
`b`
The second operand, which can be a variable of type `Fract` or a variable of the same type as the variable in parameter `a`.
##### DESCRIPTION
The `FracDiv` function returns the quotient of the numbers specified in the `a` and `b` parameters. If the `b` parameter is in the format of a `Fract` number, then the `a` parameter can be in the format of a `Fract`, a `Fixed`, or a `LongInt` number. If the `b` parameter is in the format of a `Fixed` or a `LongInt` number, then the `a` parameter must be in the same format.

The returned value is in the format of a `Fract` number if `a` and `b` are both `Fract` numbers, both `Fixed` numbers, or both `LongInt` numbers. Otherwise, the returned value is in the same format as the number in the `a` parameter.

Division by zero results in \$8000000 if `a` is negative, and \$7FFFFFFF otherwise; thus the special case 0/0 yields \$7FFFFFFF.