Leonardus
Loading...
Searching...
No Matches
adapter128.h
Go to the documentation of this file.
1
17#pragma once
18
19// Inc Library
20#include <string>
21#include <gmp.h>
22
23
28std::string __int128_to_string( __int128 p_z );
29
30
37std::string __float128_to_string( __float128 p_float, size_t p_precision );
38
39
46__int128 string_to___int128( const std::string & p_s );
47
48
55__float128 string_to___float128( const std::string & p_s );
56
57
63bool mpz_t_to___int128( __int128 & p_dst, const mpz_t p_src );
64
65
70void __int128_to_mpz_t( mpz_t p_dst, __int128 p_src );
71
72
78void __float128_to_mpf_t( mpf_t p_dst, __float128 p_f128 );
79
80
82namespace adapter128 {
83
88__float128 ceil( __float128 p_r );
89
90
95__float128 floor( __float128 p_r );
96
97
102__float128 trunc( __float128 p_r );
103
104
109__float128 cos( __float128 p_angle );
110
111
116__float128 sin( __float128 p_angle );
117
123__float128 sqrt( __float128 p_r );
124
125
131__float128 atan2( __float128 p_num, __float128 p_den );
132
133
138__float128 asin( __float128 p_ratio );
139
140
145__float128 acos( __float128 p_ratio );
146
147
155__float128 pow( __float128 p_base, __float128 p_exp );
156
157
162__float128 rint( __float128 p_num );
163
164
170__float128 log( __float128 p_num );
171
172
178__float128 log10( __float128 p_num );
179
180} // namespace adapter128
void __int128_to_mpz_t(mpz_t p_dst, __int128 p_src)
Converts an __int128 into a mpz_t.
Definition adapter128.cpp:128
__int128 string_to___int128(const std::string &p_s)
We need an adapter function, because __int128 isn't supported by the standard library.
Definition adapter128.cpp:70
__float128 string_to___float128(const std::string &p_s)
We need an adapter function, because __float128 isn't supported by the standard library.
Definition adapter128.cpp:81
std::string __int128_to_string(__int128 p_z)
We need an adapter function, because __int128 isn't supported by std::to_string().
Definition adapter128.cpp:35
void __float128_to_mpf_t(mpf_t p_dst, __float128 p_f128)
Converts a __float128 to a mpf_t.
Definition adapter128.cpp:162
std::string __float128_to_string(__float128 p_float, size_t p_precision)
We need an adapter function, because __float128 isn't supported by std::to_string().
Definition adapter128.cpp:60
bool mpz_t_to___int128(__int128 &p_dst, const mpz_t p_src)
Converts a mpz_t into an __int128.
Definition adapter128.cpp:90
Collection of adapters for 128 bit data types.
Definition adapter128.h:82
__float128 floor(__float128 p_r)
__float128 overload of floor().
Definition adapter128.cpp:180
__float128 rint(__float128 p_num)
__float128 overload of rint().
Definition adapter128.cpp:230
__float128 atan2(__float128 p_num, __float128 p_den)
__float128 overload of atan2().
Definition adapter128.cpp:207
__float128 ceil(__float128 p_r)
__float128 overload of ceil().
Definition adapter128.cpp:175
__float128 log10(__float128 p_num)
__float128 overload of log10().
Definition adapter128.cpp:242
__float128 asin(__float128 p_ratio)
__float128 overload of asin().
Definition adapter128.cpp:212
__float128 cos(__float128 p_angle)
__float128 overload of cos().
Definition adapter128.cpp:195
__float128 log(__float128 p_num)
__float128 overload of log().
Definition adapter128.cpp:235
__float128 pow(__float128 p_base, __float128 p_exp)
__float128 overload of pow().
Definition adapter128.cpp:222
__float128 trunc(__float128 p_r)
__float128 overload of trunc().
Definition adapter128.cpp:185
__float128 sin(__float128 p_angle)
__float128 overload of sin().
Definition adapter128.cpp:190
__float128 sqrt(__float128 p_r)
__float128 overload of sqrt().
Definition adapter128.cpp:200
__float128 acos(__float128 p_ratio)
__float128 overload of acos().
Definition adapter128.cpp:217