Flint2-0.1.0.5: Haskell bindings for the flint library for number theory
Safe HaskellSafe-Inferred
LanguageHaskell2010

Data.Number.Flint.Calcium

Description

Here we collect various utility methods for Flint, Arb and Antic types that are missing in those libraries. Some of these functions may be migrated upstream in the future.

Synopsis

Calcium

Version

calcium_version :: IO CString Source #

calcium_version

Returns a pointer to the version of the library as a string X.Y.Z.

Triple-valued logic

newtype CTruth Source #

Triple-valued logic

Constructors

CTruth 

Fields

Instances

Instances details
Show CTruth Source # 
Instance details

Defined in Data.Number.Flint.Calcium.FFI

Eq CTruth Source # 
Instance details

Defined in Data.Number.Flint.Calcium.FFI

Methods

(==) :: CTruth -> CTruth -> Bool #

(/=) :: CTruth -> CTruth -> Bool #

Flint, Arb and Antic extras

Input and output

calcium_write_si :: Ptr CCalciumStream -> CLong -> IO () Source #

calcium_write_si out x

calcium_write_fmpz :: Ptr CCalciumStream -> Ptr CFmpz -> IO () Source #

calcium_write_fmpz out x

Writes the integer x to out.

calcium_write_arb :: Ptr CCalciumStream -> Ptr CArb -> CLong -> CULong -> IO () Source #

calcium_write_arb out z digits flags

calcium_write_acb :: Ptr CCalciumStream -> Ptr CAcb -> CLong -> CULong -> IO () Source #

calcium_write_acb out z digits flags

Writes the Arb number z to out, showing digits digits and with the display style specified by flags (ARB_STR_NO_RADIUS, etc.).

Function codes

ca_Acot :: CCalciumFunctionCode Source #

calcium_stream_init_file out fp

Initializes the stream out for writing to the file fp. The file can be stdout, stderr, or any file opened for writing by the user.

ca_Acoth :: CCalciumFunctionCode Source #

calcium_stream_init_str out

ca_Psi :: CCalciumFunctionCode Source #

calcium_write out s

Writes the string s to out.

ca_Erfi :: CCalciumFunctionCode Source #

calcium_write_free out s

Writes s to out and then frees s by calling flint_free().