Division employs real arithmetic to determine a first approximation to the reciprocal of the denominator significand. This is refined by Newton iteration. The working accuracy is adjusted accordingly throughout this process until a sufficiently accurate reciprocal is produced the division is completed by multiplying by the numerator and adjusting the exponent as needed. An exponent fault will be reported if an attempt is made to produce an exponent greater than rad in absolute value. Divide by exact zero will also be reported as a fault.
Division is generally several times more costly than multiplication, for instance.
If n is positive this gives the final result with a near minimum number of multiplications. The algorithms used do not rely on subtraction of the arguments and there is no danger of arithmetic errors being caused by these comparisons. Converts the value represented by its first argument to a fixed-point value by truncating towards zero to retain the specified number of decimal places. This is the value produced by truncation to retain nd decimal places. If nd is absent a value zero is assumed and an integral value is returned.