boost-multiprecision

boost::multiprecision::uint128_t sizeof is 24

僤鯓⒐⒋嵵緔 提交于 2019-12-23 16:13:18
问题 Basic math (128 / 8 = 16) speaks differently. I'm kinda disappointed and want some answers - since from what I've been used to, that notation(type_num_of_bytes_t) describes not just the amount of data you can put into the variable , but also cross-platform fixed variable size , and the latter is IMHO even more important. What am I doing wrong? #include "boost/multiprecision/cpp_int.hpp" using boost::multiprecision::uint128_t; ... qDebug() << sizeof(uint128_t); Output: 24. I'm using standard

How to combine boost odeint with OpenMP and boost multiprecision?

六眼飞鱼酱① 提交于 2019-12-11 16:39:22
问题 I am asking a question, which is related to the last comments in this post: Using openmp with odeint and adaptative step sizes In the end, the original poster asked whether or not OpenMP is compatible with boost multiprecision. I guess this problem has been solved in the meanwhile but I could not find the answer. Hence, I tried to figure it out on my own and implemented some coupled ODEs. #include <iostream> #include <vector> #include <omp.h> #include <boost/numeric/odeint.hpp> #include

how to change at runtime number precision with boost::multiprecision

折月煮酒 提交于 2019-12-01 19:45:56
I've read from the boost::multiprecision documentation : Depending upon the number type, precision may be arbitrarily large (limited only by available memory), fixed at compile time (for example 50 or 100 decimal digits), or a variable controlled at run-time by member functions. The types are expression-template-enabled for better performance than naive user-defined types. I've read some more documentation but I've not found anything regarding changing precision at runtime. I've seen only templates that allows me to set precision at compile time, that's not what I want (I want to create a

how to change at runtime number precision with boost::multiprecision

蓝咒 提交于 2019-12-01 04:23:09
问题 I've read from the boost::multiprecision documentation: Depending upon the number type, precision may be arbitrarily large (limited only by available memory), fixed at compile time (for example 50 or 100 decimal digits), or a variable controlled at run-time by member functions. The types are expression-template-enabled for better performance than naive user-defined types. I've read some more documentation but I've not found anything regarding changing precision at runtime. I've seen only