私は c++ を使用して物理シミュレーションを実行しています。正確な結果を得るには、boost::multiprecision を使用しています。これまでは cpp_dec_float_50 タイプを使用していましたが、今度は異なる変数のシミュレーションを異なる精度でテストする必要があります。
では、cpp_dec_float_27(27 桁の精度) などの新しいタイプを作成するにはどうすればよいですか?
テンプレートコードを変更しようとしました:
namespace boost{ namespace multiprecision{
template <unsigned Digits10, class ExponentType = boost::int32_t, class Allocator = void>
class cpp_dec_float;
typedef number<cpp_dec_float<50> > cpp_dec_float_50;
typedef number<cpp_dec_float<100> > cpp_dec_float_100;
}} // namespaces
しかし、私は多くの問題を抱えています。