|
Data.Number.MPFR.Mutable | Portability | non-portable | Stability | experimental | Maintainer | ales.bizjak0@gmail.com |
|
|
|
|
|
Description |
This module provides a "mutable" interface to the MPFR library. Functions i
this module should have very little overhead over the original C functions.
Type signatures of functions should be self-explanatory. Order of arguments
is identical to the one in C functions. See MPFR manual for documentation
on particular functions.
All operations are performed in the ST monad so safe transition between mutable
and immutable interface is possible with runST. For example mutable interface
could be used in inner loops or in local calculations with temporary variables,
helping reduce allocation overhead of the pure interface.
|
|
Synopsis |
|
|
|
Documentation |
|
|
A mutable MPFR. Currently this is just a newtype wrapped STRef to
a MPFR but this may change in the future for a more efficient implementation.
Type argument s is the state variable argument for the ST type.
|
|
|
Utility functions
|
|
|
Convert an immutable MPFR to a mutable one, making a complete copy.
|
|
|
Replace the state of the mutable MPFR with a new one,
making a complete copy.
|
|
|
Convert a mutable MPFR to an immutable one, making a complete copy.
|
|
|
Convert an immutable MPFR to a mutable one. The unsafe prefix comes from
the fact that limbs of the MPFR are not copied so any modifications done on
on the mutable MPFR will reflect on the original. If the original will not be
used or limbs of the mutable not modified, then it is safe to use.
|
|
|
Replace the state of the mutable MPFR with a new one. The actual limbs are
not copied, so any further modifications on the mutable MPFR will reflect on
the MPFR given in as the second argument.
|
|
|
Convert a mutable MPFR to an immutable one. The unsafe prefix comes from
the fact that limbs of the MPFR are not copied so any further modifications
on the mutable MPFR will reflect on the "frozen" one. If mutable MPFR will
not be modified afterwards, it is perfectly safe to use.
|
|
Basic arithmetic functions
|
|
For documentation on particular functions see
http://www.mpfr.org/mpfr-current/mpfr.html#Basic-Arithmetic-Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Special functions
|
|
For documentation on particular functions see
http://www.mpfr.org/mpfr-current/mpfr.html#Special-Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Miscellaneous functions
|
|
For documentation on particular functions see
http://www.mpfr.org/mpfr-current/mpfr.html#Miscellaneous functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer related functions
|
|
For documentation on particular functions see
http://www.mpfr.org/mpfr-current/mpfr.html#Integer-Related-Functions
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Produced by Haddock version 2.4.2 |