# Library Initialization and Finalization

## Functions

int | ppl_initialize (void)
| Initializes the Parma Polyhedra Library. This function must be called before any other function.
int | ppl_finalize (void)
| Finalizes the Parma Polyhedra Library. This function must be called after any other function.
int | ppl_set_rounding_for_PPL (void)
| Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly.
int | ppl_restore_pre_PPL_rounding (void)
| Sets the FPU rounding mode as it was before initialization of the PPL.
int | ppl_irrational_precision (unsigned *p)
| Writes to `p` the precision parameter used for irrational calculations.
int | ppl_set_irrational_precision (unsigned p)
| Sets the precision parameter used for irrational calculations.

## Detailed Description

Functions for initialization/finalization of the library, as well as setting/resetting of floating-point rounding mode.

## Function Documentation

int ppl_initialize | ( | void |  | ) |

Initializes the Parma Polyhedra Library. This function must be called before any other function.

Returns:
  `PPL_ERROR_INVALID_ARGUMENT` if the library was already initialized.

int ppl_finalize | ( | void |  | ) |

Finalizes the Parma Polyhedra Library. This function must be called after any other function.

Returns:
  `PPL_ERROR_INVALID_ARGUMENT` if the library was already finalized.

int ppl_set_rounding_for_PPL | ( | void |  | ) |

Sets the FPU rounding mode so that the PPL abstractions based on floating point numbers work correctly.

This is performed automatically at initialization-time. Calling this function is needed only if restore_pre_PPL_rounding() has been previously called.

int ppl_restore_pre_PPL_rounding | ( | void |  | ) |

Sets the FPU rounding mode as it was before initialization of the PPL.

After calling this function it is absolutely necessary to call set_rounding_for_PPL() before using any PPL abstractions based on floating point numbers. This is performed automatically at finalization-time.

int ppl_set_irrational_precision | ( | unsigned | p | ) |

Sets the precision parameter used for irrational calculations.

If `p` is less than or equal to `INT_MAX`, sets the precision parameter used for irrational calculations to `p`. Then, in the irrational calculations returning an unbounded rational, (e.g., when computing a square root), the lesser between numerator and denominator will be limited to 2**`p`.