Questions tagged [multiprecision]
83 questions
0
votes
1 answer
Can std::vector>(N).data() safely be reinterpret_casted to fftwq_complex*?
I did not really expect the following example to work, but indeed it does (g++ 4.6.4, with --std=c++0x):
#include
#include
#include
int main(int /*argc*/, char** /*argv*/)
{
…

Sunday
- 631
- 1
- 7
- 14
0
votes
1 answer
Use static data initializers inline
I have found this section in the cpp_dec_float source file:
struct initializer
{
initializer()
{
cpp_dec_float::nan();
cpp_dec_float::inf();
…
user1382306
0
votes
2 answers
Is boost::multiprecision::cpp_int a POD?
I am intending to use classes that have boost::multiprecision::cpp_int (see Boost Multiprecision) as data members, and I am hoping to manage instances of these classes on the heap using the boost::fast_pool_allocator Boost custom allocator.
In order…

Dan Nissenbaum
- 13,558
- 21
- 105
- 181
0
votes
1 answer
Memory leak with dynamic array of mpfr variables in c++
I have a simple c++ program using the multiprecision library MPFR written to try and understand a memory problem in a bigger program:
int main() {
int prec=65536, size=1, newsize=1;
mpfr_t **mf;
while(true) {
size=newsize;
mf=new…

jorgen
- 3,425
- 4
- 31
- 53
-1
votes
1 answer
multi-precision multiplication in CUDA
I am trying to implement multi-precision multiplication in CUDA. For doing that, I have implemented a kernel which should compute multiplication of uint32_t type operand with 256-bit operand and put the result in 288-bit array. So far, I have came…

A23149577
- 2,045
- 2
- 40
- 74
-1
votes
1 answer
Input a 128-bit value c++ boost
I use int128_t in boost, multiprecision library.
When I write int128_t number = 265252859812191058636308480000000;
I have a mistake, that constant is too long.
How can I input 128-bit value correctly?
For example:
AF5228967057FE1CB84B92511BE89A47 in…

Sofiia
- 51
- 1
- 6
-2
votes
1 answer
How to use the C++ max function with boost 128 bit integer
If I have the following code:
#include
using namespace boost::multiprecision
int main()
{
int128_t a = Func_a()
int128_t b = Func_b()
std::cout << std::max(a, b) << std::endl;
return 0;
}
And if…
user6542719
-3
votes
1 answer
how to install mpfun90?
I am trying to write a multiprecision program in Fortran. I already wrote a double precision program in Fortran. Can anybody help me to convert it to multiprecision. I discovered D. Baily multiprecision Library ( …

Yılmaz Eser
- 1
- 1