[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

### D.14.1 `mpfr` binary operators

Functions with these names take a pair of `mpfr` numbers `(x,y)` and return an `mpfr` number as a result.

- `add`
- `sub`
- `mul`
- `div`
- `pow`
- `atan2`
- `hypot`
- `min`
- `max`
- `vid`
- `bus`

Their semantics are similar to those listed in the `mpfr` documentation, with some minor qualifications.

- Unlike the native API, there is no third argument to which the result is assigned, because the result is the returned value.
- The precision of the result is the greater of the two precisions of the input numbers x and y.
- The `vid` and `bus` functions are added features of the virtual code interface, corresponding to division and subtraction with the order of the operands reversed, as explained in `complex`.

Mathematically it might make more sense for the precision of the result to be the lesser of the two input precisions, but this way is more convenient for virtual code programs that perform binary operations on their input with hard coded constants, because it makes one size fit all.

[ < ] | [ > ] |  | [ << ] | [ Up ] | [ >> ] |  |  |  |  | [Top] | [Contents] | [Index] | [ ? ]

This document was generated on November 8, 2012 using texi2html 1.82.