Safe Haskell | None |
---|---|

Language | Haskell98 |

- module Data.Number.MPFR.FFIhelper
- withMutableMPFRBA :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFR1 :: (Integral a, Integral b) => (Ptr MPFR -> Ptr MPFR -> a -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> b -> RoundMode -> ST s Int
- withMutableMPFR2 :: (Integral a, Integral b) => (Ptr MPFR -> a -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> b -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFRS :: (Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFRUI :: (Integral a, Integral b) => (Ptr MPFR -> a -> CRoundMode -> IO CInt) -> MMPFR s -> b -> RoundMode -> ST s Int
- withMutableMPFRd :: (Ptr MPFR -> Ptr MPFR -> CDouble -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> Double -> RoundMode -> ST s Int
- withMutableMPFRd' :: (Ptr MPFR -> CDouble -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> Double -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFRBA3 :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFRSC :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int
- withMutableMPFRSNR :: (Ptr MPFR -> Ptr MPFR -> IO CInt) -> MMPFR s -> MMPFR s -> ST s Int
- withMutableMPFRSNRNR :: (Ptr MPFR -> IO ()) -> MMPFR s -> ST s ()
- withMutableMPFRP :: (Ptr MPFR -> IO CInt) -> MMPFR s -> ST s Int
- withMutableMPFRB :: (Ptr MPFR -> Ptr MPFR -> IO CInt) -> MMPFR s -> MMPFR s -> ST s Int
- unsafeWriteMMPFR :: MMPFR s -> MPFR -> ST s ()
- unsafeFreeze :: MMPFR s -> ST s MPFR
- unsafeThaw :: MPFR -> ST s (MMPFR s)
- writeMMPFR :: MMPFR s -> MPFR -> ST s ()
- freeze :: MMPFR s -> ST s MPFR
- thaw :: MPFR -> ST s (MMPFR s)
- data MMPFR s

# Documentation

module Data.Number.MPFR.FFIhelper

withMutableMPFRBA :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int Source #

withMutableMPFR1 :: (Integral a, Integral b) => (Ptr MPFR -> Ptr MPFR -> a -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> b -> RoundMode -> ST s Int Source #

withMutableMPFR2 :: (Integral a, Integral b) => (Ptr MPFR -> a -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> b -> MMPFR s -> RoundMode -> ST s Int Source #

withMutableMPFRS :: (Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int Source #

withMutableMPFRUI :: (Integral a, Integral b) => (Ptr MPFR -> a -> CRoundMode -> IO CInt) -> MMPFR s -> b -> RoundMode -> ST s Int Source #

withMutableMPFRd :: (Ptr MPFR -> Ptr MPFR -> CDouble -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> Double -> RoundMode -> ST s Int Source #

withMutableMPFRd' :: (Ptr MPFR -> CDouble -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> Double -> MMPFR s -> RoundMode -> ST s Int Source #

withMutableMPFRBA3 :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int Source #

withMutableMPFRSC :: (Ptr MPFR -> Ptr MPFR -> Ptr MPFR -> CRoundMode -> IO CInt) -> MMPFR s -> MMPFR s -> MMPFR s -> RoundMode -> ST s Int Source #

unsafeWriteMMPFR :: MMPFR s -> MPFR -> ST s () Source #

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.

unsafeFreeze :: MMPFR s -> ST s MPFR Source #

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.

unsafeThaw :: MPFR -> ST s (MMPFR s) Source #

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.

writeMMPFR :: MMPFR s -> MPFR -> ST s () Source #

Replace the state of the mutable MPFR with a new one, making a complete copy.

freeze :: MMPFR s -> ST s MPFR Source #

Convert a mutable MPFR to an immutable one, making a complete copy.