|
Leonardus
|
Collection of conversion functions. More...
Functions | |
| std::string | __int128_to_string (__int128 p_z) |
| Converts an __int128 to its string representation. | |
| std::string | __float128_to_string (__float128 p_float, size_t p_precision) |
| Converts a __float128 to its string representation. | |
| __int128 | string_to___int128 (const std::string &p_s) |
| Converts a string to an __int128 value. | |
| __float128 | string_to___float128 (const std::string &p_s) |
| Converts a string to a __float128 value. | |
| std::pair< bool, __float128 > | mpz_t_to___float128 (const mpz_t p_src) |
| Converts a mpz_t into a __float128. | |
| std::pair< bool, __int128 > | mpz_t_to___int128 (const mpz_t p_src) |
| Converts a mpz_t into an __int128. | |
| void | __int128_to_mpz_t (mpz_t p_dst, __int128 p_src) |
| Converts an __int128 into a mpz_t. | |
| bool | __float128_to_mpf_t (mpf_t p_dst, __float128 p_f128) |
| Converts a __float128 to a mpf_t. | |
Collection of conversion functions.
| bool conversion::__float128_to_mpf_t | ( | mpf_t | p_dst, |
| __float128 | p_f128 | ||
| ) |
Converts a __float128 to a mpf_t.
Note: GMP doesn't support 128 Bit floats directly.
| [out] | p_dst | The destination mpf_t. |
| [in] | p_f128 | The source __float128. |
| string conversion::__float128_to_string | ( | __float128 | p_float, |
| size_t | p_precision | ||
| ) |
Converts a __float128 to its string representation.
This adapter is required because __float128 is not supported by std::to_string(). Implementation uses GNU quadmath.
| [in] | p_float | The __float128 to convert. |
| [in] | p_precision | The number of decimal digits to include. |
| void conversion::__int128_to_mpz_t | ( | mpz_t | p_dst, |
| __int128 | p_src | ||
| ) |
Converts an __int128 into a mpz_t.
| [out] | p_dst | The destination mpz_t. |
| [in] | p_src | The source __int128. |
| string conversion::__int128_to_string | ( | __int128 | p_z | ) |
Converts an __int128 to its string representation.
This adapter is required because __int128 is not supported by std::to_string().
| [in] | p_z | The __int128 value to convert. |
| std::pair< bool, __float128 > conversion::mpz_t_to___float128 | ( | const mpz_t | p_src | ) |
Converts a mpz_t into a __float128.
Least significant digits are discarded if they do not fit into the __float128.
| [in] | p_src | The source mpz_t. |
| std::pair< bool, __int128 > conversion::mpz_t_to___int128 | ( | const mpz_t | p_src | ) |
Converts a mpz_t into an __int128.
| [in] | p_src | The source mpz_t. |
| __float128 conversion::string_to___float128 | ( | const std::string & | p_s | ) |
Converts a string to a __float128 value.
This adapter is required because __float128 is not supported by the standard library. Implemented using GNU quadmath. Insignificant digits may be discarded during conversion.
| [in] | p_s | The string representation of the float. |
| __int128 conversion::string_to___int128 | ( | const std::string & | p_s | ) |
Converts a string to an __int128 value.
This adapter is required because __int128 is not supported by the standard library.
| [in] | p_s | The string to convert. |