Kryptostack
adapter128.h
Go to the documentation of this file.
1
17#pragma once
18
19#include <string>
20
21
25std::string to_string( __int128 p_z );
26
30std::string to_string( __float128 p_float, size_t p_precision );
31
36__int128 stoint128( const std::string & p_s );
37
42__float128 stofloat128( const std::string & p_s );
43
46inline __int128 mmod( __int128 p_x, __int128 p_m ) {
47 const __int128 res = p_x % p_m;
48 return res>=0 ? res : res+p_m;
49}
50
52__float128 ceil( __float128 p_r );
53
55__float128 floor( __float128 p_r );
56
58__float128 trunc( __float128 p_r );
59
61__float128 cos( __float128 p_angle );
62
64__float128 sin( __float128 p_angle );
65
68__float128 sqrt( __float128 p_r );
69
71__float128 atan2( __float128 p_num, __float128 p_den );
72
76__float128 pow( __float128 p_base, __float128 p_exp );
77
79__float128 rint( __float128 p_num );
80
83__float128 log( __float128 p_num );
84
87__float128 log10( __float128 p_num );
__float128 atan2(__float128 p_num, __float128 p_den)
__float128 overload of atan2()
Definition: adapter128.cpp:99
std::string to_string(__int128 p_z)
We need an adapter function, because __int128 isn't supported by std::to_string().
Definition: adapter128.cpp:31
__int128 mmod(__int128 p_x, __int128 p_m)
Mathemtical modulus.
Definition: adapter128.h:46
__float128 ceil(__float128 p_r)
__float128 overload of ceil()
Definition: adapter128.cpp:73
__float128 cos(__float128 p_angle)
__float128 overload of cos()
Definition: adapter128.cpp:89
__float128 sqrt(__float128 p_r)
__float128 overload of sqrt()
Definition: adapter128.cpp:93
__float128 sin(__float128 p_angle)
__float128 overload of sin()
Definition: adapter128.cpp:85
__float128 log(__float128 p_num)
__float128 overload of log()
Definition: adapter128.cpp:114
__int128 stoint128(const std::string &p_s)
We need an adapter function, because __float128 isn't supported by the standard library.
Definition: adapter128.cpp:59
__float128 rint(__float128 p_num)
__float128 overload of rint()
Definition: adapter128.cpp:110
__float128 floor(__float128 p_r)
__float128 overload of floor()
Definition: adapter128.cpp:77
__float128 stofloat128(const std::string &p_s)
We need an adapter function, because __float128 isn't supported by the standard library.
Definition: adapter128.cpp:69
__float128 pow(__float128 p_base, __float128 p_exp)
__float128 overload of pow()
Definition: adapter128.cpp:103
__float128 trunc(__float128 p_r)
__float128 overload of trunc()
Definition: adapter128.cpp:81
__float128 log10(__float128 p_num)
__float128 overload of log10()
Definition: adapter128.cpp:120