├── .circleci └── config.yml ├── .clang-format ├── .drone.star ├── .drone ├── after-success.sh ├── before-install.sh ├── before-script.sh └── boost.sh ├── .gitattributes ├── .github └── workflows │ ├── codecov.yml │ └── multiprecision.yml ├── .gitignore ├── CMakeLists.txt ├── LICENSE ├── README.md ├── codecov.yml ├── config ├── Jamfile.v2 ├── has_basic_float128.cpp ├── has_big_obj.cpp ├── has_constexpr_limits_cmd.cpp ├── has_eigen.cpp ├── has_f2c.cpp ├── has_float128.cpp ├── has_gmp.cpp ├── has_intel_quad.cpp ├── has_is_constant_evaluated.cpp ├── has_mpc.cpp ├── has_mpfi.cpp ├── has_mpfr.cpp ├── has_tommath.cpp └── is_ci_sanitizer_run.cpp ├── doc ├── Jamfile.v2 ├── debugger1.png ├── debugger2.png ├── debugger3.png ├── debugger4.png ├── debugger5.png ├── debugger6.png ├── debugger7.png ├── floating_point_eg1.mml ├── floating_point_eg1.png ├── floating_point_eg1.svg ├── floating_point_eg2.mml ├── floating_point_eg2.png ├── floating_point_eg2.svg ├── floating_point_eg3.mml ├── floating_point_eg3.png ├── floating_point_eg3.svg ├── generate.sh ├── history.qbk ├── html │ ├── boost_multiprecision │ │ ├── indexes.html │ │ ├── indexes │ │ │ ├── s01.html │ │ │ ├── s02.html │ │ │ ├── s03.html │ │ │ └── s04.html │ │ ├── intro.html │ │ ├── map.html │ │ ├── map │ │ │ ├── ack.html │ │ │ ├── faq.html │ │ │ ├── hist.html │ │ │ └── todo.html │ │ ├── perf.html │ │ ├── perf │ │ │ ├── float_performance.html │ │ │ ├── int_real_world.html │ │ │ ├── integer_performance.html │ │ │ ├── overhead.html │ │ │ ├── rational_performance.html │ │ │ ├── rational_real_world.html │ │ │ └── realworld.html │ │ ├── ref.html │ │ ├── ref │ │ │ ├── backendconc.html │ │ │ ├── cpp_bin_float_ref.html │ │ │ ├── cpp_dec_ref.html │ │ │ ├── cpp_int_ref.html │ │ │ ├── gmp_int_ref.html │ │ │ ├── headers.html │ │ │ ├── internals.html │ │ │ ├── mpf_ref.html │ │ │ ├── mpfr_ref.html │ │ │ ├── number.html │ │ │ └── tom_int_ref.html │ │ ├── tut.html │ │ └── tut │ │ │ ├── complex.html │ │ │ ├── complex │ │ │ ├── complex128.html │ │ │ ├── complex_adaptor.html │ │ │ ├── cpp_complex.html │ │ │ └── mpc_complex.html │ │ │ ├── conversions.html │ │ │ ├── eigen.html │ │ │ ├── floats.html │ │ │ ├── floats │ │ │ ├── cpp_bin_float.html │ │ │ ├── cpp_dec_float.html │ │ │ ├── float128.html │ │ │ ├── fp_eg.html │ │ │ ├── fp_eg │ │ │ │ ├── aos.html │ │ │ │ ├── caveats.html │ │ │ │ ├── floatbuiltinctor.html │ │ │ │ ├── gauss_lagerre_quadrature.html │ │ │ │ ├── gi.html │ │ │ │ ├── jel.html │ │ │ │ ├── nd.html │ │ │ │ ├── poly_eg.html │ │ │ │ └── variable_precision.html │ │ │ ├── gmp_float.html │ │ │ └── mpfr_float.html │ │ │ ├── fwd.html │ │ │ ├── gen_int.html │ │ │ ├── hash.html │ │ │ ├── import_export.html │ │ │ ├── input_output.html │ │ │ ├── interval.html │ │ │ ├── interval │ │ │ └── mpfi.html │ │ │ ├── ints.html │ │ │ ├── ints │ │ │ ├── cpp_int.html │ │ │ ├── egs.html │ │ │ ├── egs │ │ │ │ ├── bitops.html │ │ │ │ └── factorials.html │ │ │ ├── gmp_int.html │ │ │ └── tom_int.html │ │ │ ├── limits.html │ │ │ ├── limits │ │ │ ├── constants.html │ │ │ ├── functions.html │ │ │ ├── how_to_tell.html │ │ │ └── limits32.html │ │ │ ├── lits.html │ │ │ ├── misc.html │ │ │ ├── misc │ │ │ ├── debug_adaptor.html │ │ │ ├── logged_adaptor.html │ │ │ └── visualizers.html │ │ │ ├── mixed.html │ │ │ ├── new_backend.html │ │ │ ├── primetest.html │ │ │ ├── random.html │ │ │ ├── rational.html │ │ │ ├── rational │ │ │ ├── br.html │ │ │ ├── cpp_rational.html │ │ │ ├── gmp_rational.html │ │ │ ├── rational_adaptor.html │ │ │ ├── tommath_rational.html │ │ │ └── tommath_rational0.html │ │ │ ├── rounding.html │ │ │ ├── serial.html │ │ │ └── variable.html │ ├── index.html │ ├── multiprecision.css │ └── standalone_HTML.manifest ├── html4_symbols.qbk ├── index.idx ├── introduction.qbk ├── multiprecision.css ├── multiprecision.qbk ├── numeric_limits_32_tables.qbk ├── numeric_limits_qbk.cpp ├── performance.qbk ├── performance_float.qbk ├── performance_integer.qbk ├── performance_integer_real_world.qbk ├── performance_overhead.qbk ├── performance_rational.qbk ├── performance_rational_real_world.qbk ├── performance_real_world.qbk ├── reference.qbk ├── reference_backend_requirements.qbk ├── reference_cpp_bin_float.qbk ├── reference_cpp_dec_float.qbk ├── reference_cpp_int.qbk ├── reference_gmp_float.qbk ├── reference_gmp_int.qbk ├── reference_header_structure.qbk ├── reference_internal_support.qbk ├── reference_mpfr_float.qbk ├── reference_number.qbk ├── reference_tom_int.qbk ├── tutorial.qbk ├── tutorial_boost_rational.qbk ├── tutorial_complex.qbk ├── tutorial_complex_adaptor.qbk ├── tutorial_constexpr.qbk ├── tutorial_conversions.qbk ├── tutorial_cpp_bin_float.qbk ├── tutorial_cpp_complex.qbk ├── tutorial_cpp_dec_float.qbk ├── tutorial_cpp_int.qbk ├── tutorial_cpp_rational.qbk ├── tutorial_debug_adaptor.qbk ├── tutorial_eigen.qbk ├── tutorial_float128.qbk ├── tutorial_float128_complex.qbk ├── tutorial_float_builtin_ctor.qbk ├── tutorial_float_eg.qbk ├── tutorial_floats.qbk ├── tutorial_fwd.qbk ├── tutorial_gmp_float.qbk ├── tutorial_gmp_int.qbk ├── tutorial_gmp_rational.qbk ├── tutorial_hash.qbk ├── tutorial_import_export.qbk ├── tutorial_integer.qbk ├── tutorial_integer_examples.qbk ├── tutorial_integer_ops.qbk ├── tutorial_interval_mpfi.qbk ├── tutorial_io.qbk ├── tutorial_logged_adaptor.qbk ├── tutorial_misc_backends.qbk ├── tutorial_mixed_precision.qbk ├── tutorial_mpc_complex.qbk ├── tutorial_mpfr_float.qbk ├── tutorial_new_backend.qbk ├── tutorial_numeric_limits.qbk ├── tutorial_primality.qbk ├── tutorial_random.qbk ├── tutorial_rational.qbk ├── tutorial_rational_adaptor.qbk ├── tutorial_rounding.qbk ├── tutorial_serialization.qbk ├── tutorial_tommath.qbk ├── tutorial_tommath_rational.qbk ├── tutorial_variable_precision.qbk └── tutorial_visualizers.qbk ├── example ├── Jamfile.v2 ├── big_seventh.cpp ├── complex128_examples.cpp ├── constexpr_float_arithmetic_examples.cpp ├── cpp_bin_float_import_export.cpp ├── cpp_bin_float_snips.cpp ├── cpp_complex_examples.cpp ├── cpp_dec_float_snips.cpp ├── cpp_int_import_export.cpp ├── cpp_int_mul_timing.cpp ├── cpp_int_snips.cpp ├── debug_adaptor_snips.cpp ├── eigen_example.cpp ├── exercise_threading_log_agm.cpp ├── float128_snips.cpp ├── floating_point_examples.cpp ├── gauss_laguerre_quadrature.cpp ├── gmp_snips.cpp ├── hashing_examples.cpp ├── hypergeometric_luke_algorithms.cpp ├── integer_examples.cpp ├── logged_adaptor.cpp ├── mixed_integer_arithmetic.cpp ├── mpc_examples.cpp ├── mpfi_snips.cpp ├── mpfr_precision.cpp ├── mpfr_snips.cpp ├── numeric_limits_snips.cpp ├── random_snips.cpp ├── safe_prime.cpp ├── scoped_precision_example.cpp ├── standalone_bernoulli_tgamma.cpp └── tommath_snips.cpp ├── include └── boost │ └── multiprecision │ ├── complex128.hpp │ ├── complex_adaptor.hpp │ ├── concepts │ └── mp_number_archetypes.hpp │ ├── cpp_bin_float.hpp │ ├── cpp_bin_float │ ├── io.hpp │ └── transcendental.hpp │ ├── cpp_complex.hpp │ ├── cpp_dec_float.hpp │ ├── cpp_int.hpp │ ├── cpp_int │ ├── add.hpp │ ├── add_unsigned.hpp │ ├── bitwise.hpp │ ├── checked.hpp │ ├── comparison.hpp │ ├── cpp_int_config.hpp │ ├── divide.hpp │ ├── import_export.hpp │ ├── intel_intrinsics.hpp │ ├── limits.hpp │ ├── literals.hpp │ ├── misc.hpp │ ├── multiply.hpp │ ├── serialize.hpp │ └── value_pack.hpp │ ├── debug_adaptor.hpp │ ├── detail │ ├── assert.hpp │ ├── atomic.hpp │ ├── bitscan.hpp │ ├── check_cpp11_config.hpp │ ├── constexpr.hpp │ ├── default_ops.hpp │ ├── digits.hpp │ ├── dynamic_array.hpp │ ├── empty_value.hpp │ ├── endian.hpp │ ├── et_ops.hpp │ ├── float128_functions.hpp │ ├── float_string_cvt.hpp │ ├── fpclassify.hpp │ ├── functions │ │ ├── constants.hpp │ │ ├── pow.hpp │ │ ├── trig.hpp │ │ └── trunc.hpp │ ├── generic_interconvert.hpp │ ├── hash.hpp │ ├── integer_ops.hpp │ ├── itos.hpp │ ├── min_max.hpp │ ├── no_et_ops.hpp │ ├── no_exceptions_support.hpp │ ├── number_base.hpp │ ├── number_compare.hpp │ ├── precision.hpp │ ├── rebind.hpp │ ├── standalone_config.hpp │ ├── static_array.hpp │ ├── string_helpers.hpp │ ├── tables.hpp │ ├── ublas_interop.hpp │ ├── uniform_int_distribution.hpp │ └── utype_helper.hpp │ ├── eigen.hpp │ ├── float128.hpp │ ├── fwd.hpp │ ├── gmp.hpp │ ├── integer.hpp │ ├── logged_adaptor.hpp │ ├── miller_rabin.hpp │ ├── mpc.hpp │ ├── mpfi.hpp │ ├── mpfr.hpp │ ├── number.hpp │ ├── random.hpp │ ├── rational_adaptor.hpp │ ├── tommath.hpp │ └── traits │ ├── explicit_conversion.hpp │ ├── extract_exponent_type.hpp │ ├── is_backend.hpp │ ├── is_byte_container.hpp │ ├── is_complex.hpp │ ├── is_convertible_arithmetic.hpp │ ├── is_restricted_conversion.hpp │ ├── is_variable_precision.hpp │ ├── max_digits10.hpp │ ├── std_integer_traits.hpp │ └── transcendental_reduction_type.hpp ├── index.html ├── meta └── libraries.json ├── performance ├── Jamfile.v2 ├── arithmetic_backend.hpp ├── cpp_bin_float_conversion_performance.cpp ├── delaunay_test.cpp ├── delaunay_test.log ├── gcd_bench.cpp ├── linpack-benchmark.cpp ├── miller_rabin_performance.cpp ├── miller_rabin_performance.hpp ├── miller_rabin_performance.log ├── miller_rabin_performance_files │ ├── test01.cpp │ ├── test02.cpp │ ├── test03.cpp │ ├── test04.cpp │ ├── test05.cpp │ ├── test06.cpp │ ├── test07.cpp │ ├── test08.cpp │ ├── test09.cpp │ ├── test10.cpp │ ├── test11.cpp │ └── test12.cpp ├── mixed_equivalent_types_bench.cpp ├── performance_test-gcc-linux.log ├── performance_test-intel-linux.log ├── performance_test-msvc-10.log ├── performance_test.cpp ├── performance_test.hpp ├── performance_test.log ├── performance_test_files │ ├── test01.cpp │ ├── test02.cpp │ ├── test03.cpp │ ├── test04.cpp │ ├── test05.cpp │ ├── test06.cpp │ ├── test07.cpp │ ├── test08.cpp │ ├── test09.cpp │ ├── test10.cpp │ ├── test11.cpp │ ├── test12.cpp │ ├── test13.cpp │ ├── test14.cpp │ ├── test15.cpp │ ├── test16.cpp │ ├── test17.cpp │ ├── test18.cpp │ ├── test19.cpp │ ├── test20.cpp │ ├── test21.cpp │ ├── test22.cpp │ ├── test23.cpp │ ├── test24.cpp │ ├── test25.cpp │ ├── test26.cpp │ ├── test27.cpp │ ├── test28.cpp │ ├── test29.cpp │ ├── test30.cpp │ ├── test31.cpp │ ├── test32.cpp │ ├── test33.cpp │ ├── test34.cpp │ ├── test35.cpp │ ├── test36.cpp │ ├── test37.cpp │ ├── test38.cpp │ ├── test39.cpp │ ├── test40.cpp │ ├── test41.cpp │ ├── test42.cpp │ ├── test43.cpp │ ├── test44.cpp │ ├── test45.cpp │ ├── test46.cpp │ ├── test47.cpp │ ├── test48.cpp │ ├── test49.cpp │ ├── test50.cpp │ └── test51.cpp ├── rational_bernoulli_allocations.cpp ├── rational_bernoulli_allocations.log ├── rational_bernoulli_bench.cpp ├── rational_bernoulli_bench.log ├── rational_determinant_bench.cpp ├── rational_determinant_bench.log ├── rational_zeta18_bench.cpp ├── sf_performance-msvc-10.log ├── sf_performance.cpp ├── sf_performance.hpp ├── sf_performance.log ├── sf_performance_basic.cpp ├── sf_performance_bessel.cpp ├── sf_performance_files │ ├── sf_performance_basic_1.cpp │ ├── sf_performance_basic_2.cpp │ ├── sf_performance_basic_3.cpp │ ├── sf_performance_basic_4.cpp │ ├── sf_performance_basic_5.cpp │ ├── sf_performance_basic_6.cpp │ ├── sf_performance_basic_7.cpp │ ├── sf_performance_basic_8.cpp │ ├── sf_performance_basic_9.cpp │ ├── sf_performance_bessel_01.cpp │ ├── sf_performance_bessel_02.cpp │ ├── sf_performance_bessel_03.cpp │ ├── sf_performance_bessel_04.cpp │ ├── sf_performance_bessel_05.cpp │ ├── sf_performance_bessel_06.cpp │ ├── sf_performance_bessel_07.cpp │ ├── sf_performance_bessel_08.cpp │ ├── sf_performance_bessel_09.cpp │ ├── sf_performance_bessel_10.cpp │ ├── sf_performance_bessel_11.cpp │ ├── sf_performance_bessel_12.cpp │ ├── sf_performance_bessel_13.cpp │ ├── sf_performance_bessel_14.cpp │ ├── sf_performance_bessel_15.cpp │ ├── sf_performance_bessel_16.cpp │ ├── sf_performance_bessel_17.cpp │ ├── sf_performance_bessel_18.cpp │ ├── sf_performance_bessel_19.cpp │ ├── sf_performance_nct_01.cpp │ ├── sf_performance_nct_02.cpp │ ├── sf_performance_nct_03.cpp │ ├── sf_performance_nct_04.cpp │ ├── sf_performance_nct_05.cpp │ ├── sf_performance_nct_06.cpp │ ├── sf_performance_nct_07.cpp │ ├── sf_performance_nct_08.cpp │ ├── sf_performance_nct_09.cpp │ ├── sf_performance_nct_10.cpp │ ├── sf_performance_nct_11.cpp │ ├── sf_performance_nct_12.cpp │ ├── sf_performance_nct_13.cpp │ ├── sf_performance_nct_14.cpp │ ├── sf_performance_nct_15.cpp │ ├── sf_performance_nct_16.cpp │ ├── sf_performance_nct_17.cpp │ ├── sf_performance_nct_18.cpp │ ├── sf_performance_nct_19.cpp │ ├── sf_performance_nct_20.cpp │ ├── sf_performance_poly_01.cpp │ ├── sf_performance_poly_02.cpp │ ├── sf_performance_poly_03.cpp │ ├── sf_performance_poly_04.cpp │ ├── sf_performance_poly_05.cpp │ ├── sf_performance_poly_06.cpp │ ├── sf_performance_poly_07.cpp │ ├── sf_performance_poly_08.cpp │ ├── sf_performance_poly_09.cpp │ ├── sf_performance_poly_10.cpp │ ├── sf_performance_poly_11.cpp │ ├── sf_performance_poly_12.cpp │ ├── sf_performance_poly_13.cpp │ ├── sf_performance_poly_14.cpp │ ├── sf_performance_poly_15.cpp │ ├── sf_performance_poly_16.cpp │ ├── sf_performance_poly_17.cpp │ └── sf_performance_poly_18.cpp ├── sf_performance_nct.cpp ├── sf_performance_poly.cpp ├── sqrt_bench.cpp ├── veronoi_performance.log └── voronoi_performance.cpp ├── plots ├── cpp_bin_float_acos.png ├── cpp_bin_float_acos_errors.cpp ├── cpp_bin_float_asin.png ├── cpp_bin_float_asin_errors.cpp ├── cpp_bin_float_atan.png ├── cpp_bin_float_atan_errors.cpp ├── cpp_bin_float_cos.png ├── cpp_bin_float_cos_errors.cpp ├── cpp_bin_float_erf.png ├── cpp_bin_float_erf_errors.cpp ├── cpp_bin_float_erfc.png ├── cpp_bin_float_erfc_errors.cpp ├── cpp_bin_float_exp.png ├── cpp_bin_float_exp_errors.cpp ├── cpp_bin_float_log.png ├── cpp_bin_float_log_errors.cpp ├── cpp_bin_float_sin.png ├── cpp_bin_float_sin_errors.cpp ├── cpp_bin_float_tan.png ├── cpp_bin_float_tan_errors.cpp └── cpp_bin_float_tgamma_errors.cpp ├── test ├── Jamfile.v2 ├── bug11922.cpp ├── bug12039.cpp ├── compile_fail │ ├── conv_fail_01.cpp │ ├── conv_fail_02.cpp │ ├── conv_fail_03.cpp │ ├── conv_fail_04.cpp │ ├── conv_fail_05.cpp │ ├── conv_fail_06.cpp │ ├── conv_fail_07.cpp │ ├── conv_fail_08.cpp │ ├── conv_fail_09.cpp │ ├── conv_fail_10.cpp │ ├── conv_fail_11.cpp │ ├── conv_fail_12.cpp │ ├── conv_fail_13.cpp │ ├── conv_fail_14.cpp │ ├── conv_fail_15.cpp │ ├── conv_fail_16.cpp │ ├── conv_fail_18.cpp │ ├── conv_fail_20.cpp │ ├── conv_fail_21.cpp │ ├── conv_fail_22.cpp │ ├── conv_fail_23.cpp │ ├── conv_fail_24.cpp │ ├── conv_fail_25.cpp │ ├── conv_fail_26.cpp │ ├── conv_fail_27.cpp │ ├── conv_fail_28.cpp │ ├── conv_fail_29.cpp │ ├── conv_fail_30.cpp │ ├── conv_fail_31.cpp │ ├── conv_fail_32.cpp │ ├── conv_fail_33.cpp │ ├── conv_fail_34.cpp │ ├── conv_fail_35.cpp │ ├── conv_fail_36.cpp │ ├── conv_fail_37.cpp │ ├── conv_fail_38.cpp │ ├── conv_fail_39.cpp │ ├── conv_fail_40.cpp │ ├── conv_fail_41.cpp │ ├── conv_fail_42.cpp │ ├── conv_fail_43.cpp │ ├── conv_fail_44.cpp │ ├── conv_fail_45.cpp │ ├── conv_fail_46.cpp │ ├── conv_fail_47.cpp │ ├── conv_fail_48.cpp │ ├── conv_fail_49.cpp │ ├── conv_fail_50.cpp │ ├── conv_fail_51.cpp │ ├── conv_fail_52.cpp │ ├── conv_fail_53.cpp │ ├── conv_fail_54.cpp │ ├── conv_fail_55.cpp │ ├── conv_fail_56.cpp │ ├── conv_fail_57.cpp │ ├── conv_fail_58.cpp │ ├── conv_fail_59.cpp │ ├── cpp_int_complement.cpp │ ├── cpp_int_negate_1.cpp │ ├── cpp_int_negate_2.cpp │ ├── operator_fail_01.cpp │ ├── operator_fail_02.cpp │ ├── operator_fail_03.cpp │ ├── operator_fail_04.cpp │ ├── operator_fail_05.cpp │ ├── operator_fail_06.cpp │ ├── operator_fail_07.cpp │ ├── operator_fail_08.cpp │ ├── operator_fail_09.cpp │ ├── operator_fail_10.cpp │ ├── operator_fail_11.cpp │ ├── operator_fail_12.cpp │ ├── operator_fail_13.cpp │ ├── operator_fail_14.cpp │ ├── operator_fail_15.cpp │ ├── operator_fail_16.cpp │ ├── operator_fail_17.cpp │ └── operator_fail_18.cpp ├── concepts │ ├── number_concept_check.cpp │ ├── sf_concept_check_basic.cpp │ ├── sf_concept_check_bessel.cpp │ ├── sf_concept_check_beta.cpp │ ├── sf_concept_check_beta_2.cpp │ ├── sf_concept_check_beta_3.cpp │ ├── sf_concept_check_elliptic.cpp │ ├── sf_concept_check_gamma.cpp │ └── sf_concept_check_poly.cpp ├── constexpr_arithmetric_test.hpp ├── constexpr_test_arithmetic_backend.cpp ├── constexpr_test_cpp_int.cpp ├── constexpr_test_cpp_int_2.cpp ├── constexpr_test_cpp_int_3.cpp ├── constexpr_test_cpp_int_4.cpp ├── constexpr_test_cpp_int_5.cpp ├── constexpr_test_cpp_int_6.cpp ├── constexpr_test_cpp_int_7.cpp ├── constexpr_test_float128.cpp ├── coverage │ └── Makefile ├── eigen.hpp ├── git_issue_167.cpp ├── git_issue_175.cpp ├── git_issue_248.cpp ├── git_issue_265.cpp ├── git_issue_277.cpp ├── git_issue_30.cpp ├── git_issue_313.cpp ├── git_issue_370.cpp ├── git_issue_393.cpp ├── git_issue_426.cpp ├── git_issue_464.cpp ├── git_issue_488.cpp ├── git_issue_506.cpp ├── git_issue_509.cpp ├── git_issue_526.cpp ├── git_issue_540.cpp ├── git_issue_573.cpp ├── git_issue_576.cpp ├── git_issue_595.cpp ├── git_issue_604.cpp ├── git_issue_608.cpp ├── git_issue_624.cpp ├── git_issue_626.cpp ├── git_issue_636.cpp ├── git_issue_652.cpp ├── git_issue_98.cpp ├── include_test │ ├── cpp_bin_float_include_test.cpp │ ├── cpp_dec_float_include_test.cpp │ ├── cpp_int_include_test.cpp │ ├── gmp_include_test.cpp │ ├── mpfr_include_test.cpp │ └── tommath_include_test.cpp ├── issue_13148.cpp ├── issue_13301.cpp ├── logged_adaptor_cpp_output_test.cpp ├── logged_adaptor_output_test.cpp ├── math │ ├── high_prec │ │ ├── gamma.ipp │ │ ├── gamma_0.ipp │ │ ├── gamma_1_2.ipp │ │ ├── gamma_neg.ipp │ │ ├── readme.txt │ │ ├── test_gamma.cpp │ │ └── test_gamma.hpp │ ├── instances │ │ ├── Jamfile.v2 │ │ └── instances.cpp │ ├── log1p_expm1_test.cpp │ ├── powm1_sqrtp1m1_test.cpp │ ├── readme.txt │ ├── setup.hpp │ ├── table_type.hpp │ ├── test_bessel_i.cpp │ ├── test_bessel_j.cpp │ ├── test_bessel_k.cpp │ ├── test_bessel_y.cpp │ ├── test_beta.cpp │ ├── test_binomial_coeff.cpp │ ├── test_carlson_1.cpp │ ├── test_carlson_2.cpp │ ├── test_carlson_3.cpp │ ├── test_carlson_4.cpp │ ├── test_cbrt.cpp │ ├── test_digamma.cpp │ ├── test_ellint_1.cpp │ ├── test_ellint_2.cpp │ ├── test_ellint_3.cpp │ ├── test_erf.cpp │ ├── test_expint.cpp │ ├── test_gamma.cpp │ ├── test_hermite.cpp │ ├── test_ibeta.cpp │ ├── test_ibeta_2.cpp │ ├── test_ibeta_3.cpp │ ├── test_ibeta_4.cpp │ ├── test_ibeta_inv_1.cpp │ ├── test_ibeta_inv_ab_4.cpp │ ├── test_igamma.cpp │ ├── test_igamma_inv.cpp │ ├── test_igamma_inva.cpp │ ├── test_laguerre.cpp │ ├── test_legendre.cpp │ ├── test_tgamma_ratio.cpp │ └── test_zeta.cpp ├── no_eh_test_support.cpp ├── serial_txts │ ├── boost-no-inspect │ ├── cpp_int1024_serial32.txt │ ├── cpp_int1024_serial64.txt │ ├── cpp_int128_serial32.txt │ ├── cpp_int128_serial64.txt │ ├── cpp_int64_serial32.txt │ └── cpp_int64_serial64.txt ├── sincos.ipp ├── skeleton_backend.hpp ├── standalone_constexpr_test_cpp_int.cpp ├── standalone_constexpr_test_float128.cpp ├── standalone_test_arithmetic_complex128.cpp ├── standalone_test_arithmetic_cpp_bin_float.cpp ├── standalone_test_arithmetic_cpp_dec_float.cpp ├── standalone_test_arithmetic_cpp_int.cpp ├── standalone_test_arithmetic_cpp_rational.cpp ├── standalone_test_arithmetic_float_128.cpp ├── standalone_test_arithmetic_gmp.cpp ├── standalone_test_arithmetic_int512.cpp ├── standalone_test_arithmetic_mpf_logged_adptr.cpp ├── standalone_test_arithmetic_mpz_rat.cpp ├── standalone_test_arithmetic_tommath.cpp ├── standalone_test_convert_from_tom_int.cpp ├── standalone_test_miller_rabin.cpp ├── string_data.ipp ├── test.hpp ├── test_acos.cpp ├── test_adapt_serial.cpp ├── test_arithmetic.hpp ├── test_arithmetic_ab_1.cpp ├── test_arithmetic_ab_2.cpp ├── test_arithmetic_ab_3.cpp ├── test_arithmetic_backend_concept.cpp ├── test_arithmetic_complex128.cpp ├── test_arithmetic_complex_adaptor.cpp ├── test_arithmetic_complex_adaptor_2.cpp ├── test_arithmetic_cpp_bin_float_1.cpp ├── test_arithmetic_cpp_bin_float_2.cpp ├── test_arithmetic_cpp_bin_float_2m.cpp ├── test_arithmetic_cpp_bin_float_3.cpp ├── test_arithmetic_cpp_bin_float_4.cpp ├── test_arithmetic_cpp_bin_float_5.cpp ├── test_arithmetic_cpp_bin_float_6.cpp ├── test_arithmetic_cpp_complex_dbg_adptr.cpp ├── test_arithmetic_cpp_complex_logged_adptr.cpp ├── test_arithmetic_cpp_dec_float_1.cpp ├── test_arithmetic_cpp_dec_float_2.cpp ├── test_arithmetic_cpp_dec_float_3.cpp ├── test_arithmetic_cpp_dec_float_3m.cpp ├── test_arithmetic_cpp_int_1.cpp ├── test_arithmetic_cpp_int_10.cpp ├── test_arithmetic_cpp_int_11.cpp ├── test_arithmetic_cpp_int_12.cpp ├── test_arithmetic_cpp_int_13.cpp ├── test_arithmetic_cpp_int_14.cpp ├── test_arithmetic_cpp_int_15.cpp ├── test_arithmetic_cpp_int_16.cpp ├── test_arithmetic_cpp_int_17.cpp ├── test_arithmetic_cpp_int_18.cpp ├── test_arithmetic_cpp_int_19.cpp ├── test_arithmetic_cpp_int_2.cpp ├── test_arithmetic_cpp_int_20.cpp ├── test_arithmetic_cpp_int_21.cpp ├── test_arithmetic_cpp_int_22.cpp ├── test_arithmetic_cpp_int_23.cpp ├── test_arithmetic_cpp_int_3.cpp ├── test_arithmetic_cpp_int_4.cpp ├── test_arithmetic_cpp_int_5.cpp ├── test_arithmetic_cpp_int_6.cpp ├── test_arithmetic_cpp_int_7.cpp ├── test_arithmetic_cpp_int_8.cpp ├── test_arithmetic_cpp_int_9.cpp ├── test_arithmetic_cpp_int_br.cpp ├── test_arithmetic_cpp_int_dbg_adptr.cpp ├── test_arithmetic_cpp_int_logged_adptr.cpp ├── test_arithmetic_cpp_rat_dbg_adptr.cpp ├── test_arithmetic_cpp_rat_logged_adptr.cpp ├── test_arithmetic_dbg_adptr1.cpp ├── test_arithmetic_dbg_adptr1m.cpp ├── test_arithmetic_dbg_adptr2.cpp ├── test_arithmetic_float_128.cpp ├── test_arithmetic_logged_1.cpp ├── test_arithmetic_logged_2.cpp ├── test_arithmetic_mpc.cpp ├── test_arithmetic_mpc_dbg_adptr.cpp ├── test_arithmetic_mpc_logged_adptr.cpp ├── test_arithmetic_mpf.cpp ├── test_arithmetic_mpf_50.cpp ├── test_arithmetic_mpf_dbg_adptr.cpp ├── test_arithmetic_mpf_logged_adptr.cpp ├── test_arithmetic_mpfi_50.cpp ├── test_arithmetic_mpfi_dbg_adptr.cpp ├── test_arithmetic_mpfi_logged_adptr.cpp ├── test_arithmetic_mpfr.cpp ├── test_arithmetic_mpfr_50.cpp ├── test_arithmetic_mpfr_50_mixed.cpp ├── test_arithmetic_mpfr_50_static.cpp ├── test_arithmetic_mpfr_dbg_adptr.cpp ├── test_arithmetic_mpfr_logged_adptr.cpp ├── test_arithmetic_mpq.cpp ├── test_arithmetic_mpq_dbg_adptr.cpp ├── test_arithmetic_mpq_logged_adptr.cpp ├── test_arithmetic_mpz.cpp ├── test_arithmetic_mpz_br.cpp ├── test_arithmetic_mpz_dbg_adptr.cpp ├── test_arithmetic_mpz_logged_adptr.cpp ├── test_arithmetic_mpz_rat.cpp ├── test_arithmetic_skeleton.cpp ├── test_arithmetic_tommath.cpp ├── test_arithmetic_tommath_br.cpp ├── test_arithmetic_tommath_rat.cpp ├── test_asin.cpp ├── test_assume_uniform_precision.cpp ├── test_atan.cpp ├── test_checked_cpp_int.cpp ├── test_checked_mixed_cpp_int.cpp ├── test_complex.cpp ├── test_complex_signed_zero.cpp ├── test_constants.cpp ├── test_constexpr.cpp ├── test_convert_cpp_int_2_float.cpp ├── test_convert_from_cpp_bin_float.cpp ├── test_convert_from_cpp_dec_float.cpp ├── test_convert_from_cpp_int.cpp ├── test_convert_from_cpp_rational.cpp ├── test_convert_from_float128.cpp ├── test_convert_from_gmp_rational.cpp ├── test_convert_from_mpf_float.cpp ├── test_convert_from_mpfi_float.cpp ├── test_convert_from_mpfr_float.cpp ├── test_convert_from_mpz_int.cpp ├── test_convert_from_tom_int.cpp ├── test_convert_from_tom_rational.cpp ├── test_cos.cpp ├── test_cos_near_half_pi.cpp ├── test_cosh.cpp ├── test_cpp_bin_float.cpp ├── test_cpp_bin_float_conv.cpp ├── test_cpp_bin_float_io.cpp ├── test_cpp_bin_float_round.cpp ├── test_cpp_bin_float_serial.cpp ├── test_cpp_bin_float_tgamma.cpp ├── test_cpp_dec_float_conv.cpp ├── test_cpp_dec_float_round.cpp ├── test_cpp_dec_float_serial.cpp ├── test_cpp_dec_float_tgamma.cpp ├── test_cpp_int.cpp ├── test_cpp_int_conv.cpp ├── test_cpp_int_deserial.cpp ├── test_cpp_int_import_export.cpp ├── test_cpp_int_karatsuba.cpp ├── test_cpp_int_left_shift.cpp ├── test_cpp_int_lit.cpp ├── test_cpp_int_serial.cpp ├── test_cpp_rat_serial.cpp ├── test_cpp_rational.cpp ├── test_eigen_interop_cpp_bin_float_1.cpp ├── test_eigen_interop_cpp_bin_float_2.cpp ├── test_eigen_interop_cpp_bin_float_3.cpp ├── test_eigen_interop_cpp_complex.cpp ├── test_eigen_interop_cpp_dec_float.cpp ├── test_eigen_interop_cpp_dec_float_2.cpp ├── test_eigen_interop_cpp_dec_float_3.cpp ├── test_eigen_interop_cpp_int.cpp ├── test_eigen_interop_gmp.cpp ├── test_eigen_interop_gmp_2.cpp ├── test_eigen_interop_mpc.cpp ├── test_eigen_interop_mpfr_1.cpp ├── test_eigen_interop_mpfr_2.cpp ├── test_eigen_interop_mpfr_3.cpp ├── test_eigen_interop_mpfr_4.cpp ├── test_eigen_interop_mpfr_5.cpp ├── test_eigen_interop_mpfr_6.cpp ├── test_exp.cpp ├── test_fixed_int.cpp ├── test_fixed_zero_precision_io.cpp ├── test_float128_serial.cpp ├── test_float_conversions.cpp ├── test_float_io.cpp ├── test_float_serial.hpp ├── test_fpclassify.cpp ├── test_gcd.cpp ├── test_generic_conv.cpp ├── test_gmp_conversions.cpp ├── test_hash.cpp ├── test_int_io.cpp ├── test_int_sqrt.cpp ├── test_log.cpp ├── test_miller_rabin.cpp ├── test_mixed.hpp ├── test_mixed_cpp_bin_float.cpp ├── test_mixed_cpp_dec_float.cpp ├── test_mixed_cpp_int.cpp ├── test_mixed_float.cpp ├── test_mixed_move_cpp_int.cpp ├── test_mixed_mpf_float.cpp ├── test_mixed_mpfr_float.cpp ├── test_move.cpp ├── test_mpc_conversions.cpp ├── test_mpc_overloads.cpp ├── test_mpf_precisions.cpp ├── test_mpfi.cpp ├── test_mpfi_precisions.cpp ├── test_mpfr_conversions.cpp ├── test_mpfr_mpc_precisions.cpp ├── test_native_integer.cpp ├── test_nothrow_cpp_bin_float.cpp ├── test_nothrow_cpp_dec_float.cpp ├── test_nothrow_cpp_int.cpp ├── test_nothrow_cpp_rational.cpp ├── test_nothrow_float128.cpp ├── test_nothrow_gmp.cpp ├── test_nothrow_mpfr.cpp ├── test_numeric_limits.cpp ├── test_optional_compat.cpp ├── test_pow.cpp ├── test_preserve_all_precision.cpp ├── test_preserve_component_precision.cpp ├── test_preserve_related_precision.cpp ├── test_preserve_source_precision.cpp ├── test_preserve_target_precision.cpp ├── test_rat_float_interconv.cpp ├── test_rational_io.cpp ├── test_roots_10k_digits.cpp ├── test_round.cpp ├── test_sf_import_c99.cpp ├── test_signed_zero.cpp ├── test_sin.cpp ├── test_sin_near_half_pi.cpp ├── test_sinh.cpp ├── test_sqrt.cpp ├── test_tan.cpp ├── test_tanh.cpp ├── test_test.cpp ├── test_threaded_precision.cpp ├── test_trailing_io_delim.cpp ├── test_unchecked_cpp_int.cpp ├── timer.hpp └── ublas_interop │ ├── common │ ├── init.hpp │ └── testhelper.hpp │ ├── test1.cpp │ ├── test1.hpp │ ├── test11.cpp │ ├── test12.cpp │ ├── test13.cpp │ ├── test2.cpp │ ├── test2.hpp │ ├── test21.cpp │ ├── test22.cpp │ ├── test23.cpp │ ├── test3.cpp │ ├── test3.hpp │ ├── test31.cpp │ ├── test32.cpp │ ├── test33.cpp │ ├── test4.cpp │ ├── test4.hpp │ ├── test42.cpp │ ├── test43.cpp │ ├── test5.cpp │ ├── test5.hpp │ ├── test52.cpp │ ├── test53.cpp │ ├── test6.cpp │ ├── test6.hpp │ ├── test62.cpp │ ├── test63.cpp │ ├── test7.cpp │ ├── test7.hpp │ ├── test71.cpp │ ├── test72.cpp │ └── test73.cpp └── tools └── sincos.cpp /.drone/after-success.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | -------------------------------------------------------------------------------- /.drone/before-install.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | -------------------------------------------------------------------------------- /.drone/before-script.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | 4 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # /boost/libs/multiprecision/.gitignore 2 | # Use of manifest is unclear, so add to .gitignore. 3 | /doc/html/standalone_HTML.manifest 4 | *.DS_Store 5 | /**/*.dSYM/ 6 | **/.temps/* 7 | build/* 8 | .vscode/* 9 | .idea/* 10 | 11 | # CMake Related Options 12 | *.a 13 | *.o 14 | cmake_install.cmake 15 | CMakeCache.txt 16 | Makefile 17 | **/CMakeFiles/** 18 | **CTestTestfile.cmake 19 | DartConfiguration.tcl 20 | cmake-build-debug/* 21 | -------------------------------------------------------------------------------- /codecov.yml: -------------------------------------------------------------------------------- 1 | codecov: 2 | require_ci_to_pass: yes 3 | 4 | coverage: 5 | precision: 1 6 | round: up 7 | range: '50...100' 8 | status: 9 | project: 10 | default: # This can be anything, but it needs to exist as the name 11 | # basic settings 12 | target: 75% 13 | threshold: 10% 14 | if_ci_failed: error #success, failure, error, ignore 15 | only_pulls: false 16 | patch: 17 | default: 18 | target: 75% 19 | threshold: 25% 20 | 21 | parsers: 22 | gcov: 23 | branch_detection: 24 | conditional: no 25 | loop: no 26 | method: no 27 | macro: no 28 | 29 | comment: 30 | layout: 'reach,diff,flags,files,footer' 31 | behavior: default 32 | require_changes: no 33 | -------------------------------------------------------------------------------- /config/has_basic_float128.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2024. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include 9 | 10 | int main() 11 | { 12 | __float128 f = 0; 13 | f = sqrtq(f); 14 | 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /config/has_big_obj.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2020. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef __GNUC__ 7 | #error "compiler is not GCC" 8 | #endif 9 | 10 | int main() 11 | { 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /config/has_constexpr_limits_cmd.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2019. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef __GNUC__ 7 | #error "Compiler is not GCC" 8 | #endif 9 | #if __GNUC__ < 9 10 | #error "Older GCC versions don't support -fconstexpr-ops-limit" 11 | #endif 12 | 13 | int main() 14 | { 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /config/has_eigen.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2011. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | int main() 9 | { 10 | #if EIGEN_VERSION_AT_LEAST(3, 3, 0) 11 | #else 12 | #error "Obsolete Eigen" 13 | #endif 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /config/has_f2c.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2019. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | int main() 9 | { 10 | return 0; 11 | } 12 | -------------------------------------------------------------------------------- /config/has_float128.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2013. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #ifndef BOOST_HAS_FLOAT128 9 | #error "This doesn't work unless Boost.Config enables __float128 support" 10 | #endif 11 | 12 | extern "C" { 13 | #include 14 | } 15 | 16 | int main() 17 | { 18 | __float128 f = -2.0Q; 19 | f = fabsq(f); 20 | f = expq(f); 21 | 22 | return 0; 23 | } 24 | -------------------------------------------------------------------------------- /config/has_intel_quad.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2013. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | extern "C" _Quad __fabs(_Quad); 7 | 8 | int main() 9 | { 10 | _Quad f = -2.0Q; 11 | f = __fabsq(f); 12 | 13 | return 0; 14 | } 15 | -------------------------------------------------------------------------------- /config/has_tommath.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2011. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | int main() 9 | { 10 | mp_int v; 11 | mp_init(&v); 12 | if (v.dp) 13 | mp_clear(&v); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /config/is_ci_sanitizer_run.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2021. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #if !defined(BOOST_CI_SANITIZER_BUILD) 7 | # error "Sanitizer is NOT in effect". 8 | #endif 9 | 10 | int main() 11 | { 12 | return 0; 13 | } 14 | -------------------------------------------------------------------------------- /doc/debugger1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger1.png -------------------------------------------------------------------------------- /doc/debugger2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger2.png -------------------------------------------------------------------------------- /doc/debugger3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger3.png -------------------------------------------------------------------------------- /doc/debugger4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger4.png -------------------------------------------------------------------------------- /doc/debugger5.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger5.png -------------------------------------------------------------------------------- /doc/debugger6.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger6.png -------------------------------------------------------------------------------- /doc/debugger7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/debugger7.png -------------------------------------------------------------------------------- /doc/floating_point_eg1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/floating_point_eg1.png -------------------------------------------------------------------------------- /doc/floating_point_eg2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/floating_point_eg2.png -------------------------------------------------------------------------------- /doc/floating_point_eg3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/floating_point_eg3.png -------------------------------------------------------------------------------- /doc/html4_symbols.qbk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/doc/html4_symbols.qbk -------------------------------------------------------------------------------- /doc/index.idx: -------------------------------------------------------------------------------- 1 | # Copyright 2011 John Maddock. Distributed under the Boost 2 | # Software License, Version 1.0. (See accompanying file 3 | # LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 4 | # 5 | # Rewrite the class scanner to accept declarations, not just definitions, 6 | # as the docs don't include full definitions. 7 | # 8 | !define-scanner class_name "^[[:space:]]*(template[[:space:]]*<[^;:{]+>[[:space:]]*)?(class|struct)[[:space:]]*(\<\w+\>([[:blank:]]*\([^)]*\))?[[:space:]]*)*(\<\w*\>)[[:space:]]*(<[^;:{]+>)?[[:space:]]*(\{|:[^;\{()]*\{)" "(?:class|struct)[^;{]+\\<\5\\>\\s*[;{]" \5 9 | 10 | !scan-path boost/multiprecision .*\.hpp true 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /doc/reference.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:ref Reference] 12 | 13 | [include reference_number.qbk] 14 | [include reference_cpp_int.qbk] 15 | [include reference_gmp_int.qbk] 16 | [include reference_tom_int.qbk] 17 | [include reference_gmp_float.qbk] 18 | [include reference_mpfr_float.qbk] 19 | [include reference_cpp_bin_float.qbk] 20 | [include reference_cpp_dec_float.qbk] 21 | [include reference_internal_support.qbk] 22 | [include reference_backend_requirements.qbk] 23 | [include reference_header_structure.qbk] 24 | 25 | [endsect] 26 | -------------------------------------------------------------------------------- /doc/tutorial_complex_adaptor.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:complex_adaptor complex_adaptor] 12 | 13 | namespace boost{ namespace multiprecision{ 14 | 15 | template 16 | struct complex_adaptor; 17 | 18 | }} 19 | 20 | Class template `complex_adaptor` is designed to sit inbetween class `number` and an actual floating point backend, 21 | in order to create a new complex number type. 22 | 23 | It is the means by which we implement __cpp_complex and __complex128. 24 | 25 | [endsect] [/section:complex_adaptor complex_adaptor] 26 | -------------------------------------------------------------------------------- /doc/tutorial_hash.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:hash Hash Function Support] 12 | 13 | [hash1] 14 | 15 | [hash2] 16 | 17 | [hash3] 18 | 19 | [hash4] 20 | 21 | [endsect] [/section:hash Hash Function Support] 22 | -------------------------------------------------------------------------------- /doc/tutorial_integer_examples.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:egs Examples] 12 | 13 | [import ../example/integer_examples.cpp] 14 | 15 | [section:factorials Factorials] 16 | [FAC1] 17 | [endsect] [/section:factorials Factorials] 18 | 19 | 20 | [section:bitops Bit Operations] 21 | [BITOPS] 22 | [endsect] [/section:bitops Bit Operations] 23 | 24 | 25 | [endsect] 26 | -------------------------------------------------------------------------------- /doc/tutorial_misc_backends.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:misc Miscellaneous Number Types.] 12 | 13 | Backend types listed in this section are predominantly designed to aid debugging. 14 | 15 | [include tutorial_logged_adaptor.qbk] 16 | [include tutorial_debug_adaptor.qbk] 17 | [include tutorial_visualizers.qbk] 18 | 19 | [endsect] [/section:misc Miscellaneous Number Types.] 20 | -------------------------------------------------------------------------------- /doc/tutorial_serialization.qbk: -------------------------------------------------------------------------------- 1 | [/ 2 | Copyright 2011 - 2020 John Maddock. 3 | Copyright 2013 - 2019 Paul A. Bristow. 4 | Copyright 2013 Christopher Kormanyos. 5 | 6 | Distributed under the Boost Software License, Version 1.0. 7 | (See accompanying file LICENSE_1_0.txt or copy at 8 | http://www.boost.org/LICENSE_1_0.txt). 9 | ] 10 | 11 | [section:serial Boost.Serialization Support] 12 | 13 | Support for serialization comes in two forms: 14 | 15 | * Classes __number, __debug_adaptor, __logged_adaptor and __rational_adaptor have "pass through" serialization 16 | support which requires the underlying backend to be serializable. 17 | * Backends __cpp_int, __cpp_bin_float, __cpp_dec_float and __float128__ have full support for Boost.Serialization. 18 | 19 | [endsect] [/section:serialization Boost Serialization] 20 | -------------------------------------------------------------------------------- /include/boost/multiprecision/complex128.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_MP_COMPLEX128_HPP 7 | #define BOOST_MP_COMPLEX128_HPP 8 | 9 | #include 10 | #include 11 | 12 | namespace boost { 13 | namespace multiprecision { 14 | 15 | template <> 16 | struct component_type > > 17 | { 18 | using type = float128; 19 | }; 20 | 21 | } 22 | } // namespace boost::multiprecision 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /include/boost/multiprecision/cpp_complex.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_MP_CPP_COMPLEX_HPP 7 | #define BOOST_MP_CPP_COMPLEX_HPP 8 | 9 | #include 10 | #include 11 | 12 | #endif 13 | -------------------------------------------------------------------------------- /include/boost/multiprecision/detail/rebind.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. 3 | // Copyright Christopher Kormanyos 2013. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 6 | // 7 | 8 | #ifndef BOOST_MP_DETAIL_REBIND_HPP 9 | #define BOOST_MP_DETAIL_REBIND_HPP 10 | 11 | namespace boost { namespace multiprecision { namespace backends { namespace detail { 12 | template 13 | struct rebind 14 | { 15 | using type = typename std::allocator_traits::template rebind_alloc; 16 | }; 17 | }}}} // namespace boost::multiprecision::backends::detail 18 | 19 | #endif // BOOST_MP_DETAIL_REBIND_HPP 20 | -------------------------------------------------------------------------------- /include/boost/multiprecision/traits/is_complex.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_MP_IS_COMPLEX_HPP 7 | #define BOOST_MP_IS_COMPLEX_HPP 8 | 9 | #include 10 | #include 11 | 12 | namespace boost { namespace multiprecision { namespace detail { 13 | 14 | template struct is_complex : public std::integral_constant {}; 15 | 16 | template struct is_complex > : public std::integral_constant {}; 17 | 18 | } 19 | } 20 | } // namespace boost::multiprecision::detail 21 | 22 | #endif // BOOST_MP_IS_BACKEND_HPP 23 | -------------------------------------------------------------------------------- /include/boost/multiprecision/traits/transcendental_reduction_type.hpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2020 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifndef BOOST_MP_TRANSCENDENTAL_REDUCTION_TYPE_HPP 7 | #define BOOST_MP_TRANSCENDENTAL_REDUCTION_TYPE_HPP 8 | 9 | namespace boost { namespace multiprecision { namespace detail { 10 | 11 | template 12 | struct transcendental_reduction_type 13 | { 14 | using type = T; 15 | }; 16 | 17 | } 18 | } 19 | } // namespace boost::multiprecision::detail 20 | 21 | #endif // BOOST_MP_TRANSCENDENTAL_REDUCTION_TYPE_HPP 22 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 |

7 | Automatic redirection failed, please go to doc/html/index.html. 8 |

9 |

Copyright John Maddock 2001

10 |

Distributed under the Boost Software License, Version 1.0. (See accompanying file 11 | LICENSE_1_0.txt or copy at www.boost.org/LICENSE_1_0.txt).

12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /meta/libraries.json: -------------------------------------------------------------------------------- 1 | { 2 | "key": "multiprecision", 3 | "name": "Multiprecision", 4 | "authors": [ 5 | "John Maddock", 6 | "Christopher Kormanyos" 7 | ], 8 | "description": "Extended precision arithmetic types for floating point, integer, and rational arithmetic.", 9 | "category": [ 10 | "Math" 11 | ], 12 | "maintainers": [ 13 | "John Maddock ", 14 | "christopher Kormanyos " 15 | ], 16 | "cxxstd": "14" 17 | } 18 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test01() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin, et_off> >("cpp_int (no Expression templates)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test02() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin("cpp_int"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test03() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin > >("cpp_int (128-bit cache)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test04() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin > >("cpp_int (256-bit cache)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test05() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin > >("cpp_int (512-bit cache)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test06() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin > >("cpp_int (1024-bit cache)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test07() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin("uint1024_t"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test08() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_CPP_INT 12 | test_miller_rabin("checked_uint1024_t"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test09() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_MPZ 12 | test_miller_rabin >("mpz_int (no Expression templates)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test10() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_MPZ 12 | test_miller_rabin("mpz_int"); 13 | std::cout << "Time for mpz_int (native Miller Rabin Test) = " << test_miller_rabin_gmp() << std::endl; 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test11() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_TOMMATH 12 | test_miller_rabin >("tom_int (no Expression templates)"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/miller_rabin_performance_files/test12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../miller_rabin_performance.hpp" 7 | 8 | void test12() 9 | { 10 | using namespace boost::multiprecision; 11 | #ifdef TEST_TOMMATH 12 | test_miller_rabin("tom_int"); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/performance_test_files/test01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | 8 | void test01() 9 | { 10 | #ifdef TEST_INT64 11 | test("std::uint64_t", 64); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/performance_test_files/test02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPF) 8 | #include 9 | #endif 10 | 11 | void test02() 12 | { 13 | #ifdef TEST_MPF 14 | test("gmp_float", 50); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPF) 8 | #include 9 | #endif 10 | 11 | void test03() 12 | { 13 | #ifdef TEST_MPF 14 | test("gmp_float", 100); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPF) 8 | #include 9 | #endif 10 | 11 | void test04() 12 | { 13 | #ifdef TEST_MPF 14 | test("gmp_float", 500); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test05() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 128); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test06() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test07() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test08() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 1024); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test10() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test, boost::multiprecision::et_off> >("cpp_int(fixed)", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test11() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test, boost::multiprecision::et_off> >("cpp_int(fixed)", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test12() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test, boost::multiprecision::et_off> >("cpp_int(fixed)", 1024); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test13() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 128); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test14() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test15() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test16() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 1024); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test17.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT_RATIONAL) 8 | #include 9 | #endif 10 | 11 | void test17() 12 | { 13 | #ifdef TEST_CPP_INT_RATIONAL 14 | test("cpp_rational", 128); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT_RATIONAL) 8 | #include 9 | #endif 10 | 11 | void test18() 12 | { 13 | #ifdef TEST_CPP_INT_RATIONAL 14 | test("cpp_rational", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test19.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT_RATIONAL) 8 | #include 9 | #endif 10 | 11 | void test19() 12 | { 13 | #ifdef TEST_CPP_INT_RATIONAL 14 | test("cpp_rational", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test20.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT_RATIONAL) 8 | #include 9 | #endif 10 | 11 | void test20() 12 | { 13 | #ifdef TEST_CPP_INT_RATIONAL 14 | test("cpp_rational", 1024); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test21.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPQ) 8 | #include 9 | #endif 10 | 11 | void test21() 12 | { 13 | #ifdef TEST_MPQ 14 | test("mpq_rational", 128); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test22.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPQ) 8 | #include 9 | #endif 10 | 11 | void test22() 12 | { 13 | #ifdef TEST_MPQ 14 | test("mpq_rational", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test23.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPQ) 8 | #include 9 | #endif 10 | 11 | void test23() 12 | { 13 | #ifdef TEST_MPQ 14 | test("mpq_rational", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test24.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPQ) 8 | #include 9 | #endif 10 | 11 | void test24() 12 | { 13 | #ifdef TEST_MPQ 14 | test("mpq_rational", 1024); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test25.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_TOMMATH) 8 | #include 9 | #endif 10 | 11 | void test25() 12 | { 13 | #ifdef TEST_TOMMATH 14 | test("tommath_int", 128); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test26.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_TOMMATH) 8 | #include 9 | #endif 10 | 11 | void test26() 12 | { 13 | #ifdef TEST_TOMMATH 14 | test("tommath_int", 256); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test27.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_TOMMATH) 8 | #include 9 | #endif 10 | 11 | void test27() 12 | { 13 | #ifdef TEST_TOMMATH 14 | test("tommath_int", 512); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test29.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_DEC_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test29() 12 | { 13 | #ifdef TEST_CPP_DEC_FLOAT 14 | test("cpp_dec_float", 50); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test30.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_DEC_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test30() 12 | { 13 | #ifdef TEST_CPP_DEC_FLOAT 14 | test("cpp_dec_float", 100); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test31.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_DEC_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test31() 12 | { 13 | #ifdef TEST_CPP_DEC_FLOAT 14 | test > >("cpp_dec_float", 500); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test32.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_BIN_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test32() 12 | { 13 | #ifdef TEST_CPP_BIN_FLOAT 14 | test("cpp_bin_float", 50); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test33.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_BIN_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test33() 12 | { 13 | #ifdef TEST_CPP_BIN_FLOAT 14 | test("cpp_bin_float", 100); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test34.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_BIN_FLOAT) 8 | #include 9 | #endif 10 | 11 | void test34() 12 | { 13 | #ifdef TEST_CPP_BIN_FLOAT 14 | test > >("cpp_bin_float", 500); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test35.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPFR) 8 | #include 9 | #endif 10 | 11 | void test35() 12 | { 13 | #ifdef TEST_MPFR 14 | test("mpfr_float", 50); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test36.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPFR) 8 | #include 9 | #endif 10 | 11 | void test36() 12 | { 13 | #ifdef TEST_MPFR 14 | test("mpfr_float", 50); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test37.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPFR) 8 | #include 9 | #endif 10 | 11 | void test37() 12 | { 13 | #ifdef TEST_MPFR 14 | test("mpfr_float", 100); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test38.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPFR) 8 | #include 9 | #endif 10 | 11 | void test38() 12 | { 13 | #ifdef TEST_MPFR 14 | test("mpfr_float", 500); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test39.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test39() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 1024*2); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test40.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test40() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 1024*4); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test41.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test41() 12 | { 13 | #if defined(TEST_CPP_INT) && defined(TEST_KARATSUBA) 14 | test("cpp_int", (boost::multiprecision::backends::karatsuba_cutoff + 2) * sizeof(boost::multiprecision::limb_type) * CHAR_BIT); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test42.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test42() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 1024 * 2); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test45.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test45() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 1024 * 4); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test46.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test46() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 1024 * 8); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test47.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_CPP_INT) 8 | #include 9 | #endif 10 | 11 | void test47() 12 | { 13 | #ifdef TEST_CPP_INT 14 | test("cpp_int", 1024 * 16); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test50.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test50() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 1024*8); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/performance_test_files/test51.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../performance_test.hpp" 7 | #if defined(TEST_MPZ) 8 | #include 9 | #endif 10 | 11 | void test51() 12 | { 13 | #ifdef TEST_MPZ 14 | test("gmp_int", 1024*16); 15 | #endif 16 | } 17 | -------------------------------------------------------------------------------- /performance/sf_performance_basic.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "sf_performance.hpp" 7 | 8 | void basic_tests() 9 | { 10 | basic_tests_1(); 11 | basic_tests_2(); 12 | basic_tests_3(); 13 | basic_tests_4(); 14 | basic_tests_5(); 15 | basic_tests_6(); 16 | basic_tests_7(); 17 | basic_tests_8(); 18 | basic_tests_9(); 19 | } 20 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_1() 9 | { 10 | 11 | std::cout << "Allocation Counts for Horner Evaluation:\n"; 12 | #ifdef TEST_MPFR 13 | basic_allocation_test("mpfr_float_50", mpfr_float_50(2)); 14 | #endif 15 | } 16 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_2() 9 | { 10 | #ifdef TEST_MPFR 11 | basic_allocation_test("mpfr_float_50 - no expression templates", number, et_off>(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_3() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | basic_allocation_test("mpfr_class", mpfr_class(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_4() 9 | { 10 | #ifdef TEST_MPREAL 11 | basic_allocation_test("mpfr::mpreal", mpfr::mpreal(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_5.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_5() 9 | { 10 | std::cout << "Allocation Counts for boost::math::tools::evaluate_polynomial:\n"; 11 | #ifdef TEST_MPFR 12 | poly_allocation_test("mpfr_float_50", mpfr_float_50(2)); 13 | #endif 14 | } 15 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_6.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_6() 9 | { 10 | #ifdef TEST_MPFR 11 | poly_allocation_test("mpfr_float_50 - no expression templates", number, et_off>(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_7.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_7() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | poly_allocation_test("mpfr_class", mpfr_class(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_basic_8.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void basic_tests_8() 9 | { 10 | #ifdef TEST_MPREAL 11 | poly_allocation_test("mpfr::mpreal", mpfr::mpreal(2)); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_01() 9 | { 10 | #ifdef TEST_MPFR 11 | #if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0) 12 | time_proc("Bessel Functions (50 digit precision)", "mpfr_float_50", test_bessel, 1); 13 | #else 14 | time_proc("Bessel Functions (50 digit precision)", "mpfr_float_50", test_bessel, mpfr_buildopt_tls_p() ? 3 : 1); 15 | #endif 16 | #endif 17 | } 18 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_03() 9 | { 10 | #ifdef TEST_MPFR 11 | #if MPFR_VERSION < MPFR_VERSION_NUM(3, 0, 0) 12 | time_proc("Bessel Functions (50 digit precision)", "static_mpfr_float_50", test_bessel, et_on> >, 1); 13 | #else 14 | time_proc("Bessel Functions (50 digit precision)", "static_mpfr_float_50", test_bessel, et_on> >, mpfr_buildopt_tls_p() ? 3 : 1); 15 | #endif 16 | #endif 17 | } 18 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_05() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Bessel Functions (50 digit precision)", "mpf_float_50", test_bessel, 3); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_06() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Bessel Functions (50 digit precision)", "mpf_float_50 (no expression templates", test_bessel, et_off> >, 3); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_07() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Bessel Functions (50 digit precision)", "cpp_dec_float_50", test_bessel, 3); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_08() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Bessel Functions (50 digit precision)", "cpp_bin_float_50", test_bessel, 3); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_09() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Bessel Functions (50 digit precision)", "mpfr_class", test_bessel, mpfr_buildopt_tls_p() ? 3 : 1); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_10() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Bessel Functions (50 digit precision)", "mpfr::mpreal", test_bessel, mpfr_buildopt_tls_p() ? 3 : 1); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_11() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Bessel Functions (100 digit precision)", "mpfr_float_100", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_12() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Bessel Functions (100 digit precision)", "mpfr_float_100 (no expression templates", test_bessel, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_13() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Bessel Functions (100 digit precision)", "static_mpfr_float_100", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_14() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Bessel Functions (100 digit precision)", "mpf_float_100", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_15() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Bessel Functions (100 digit precision)", "mpf_float_100 (no expression templates", test_bessel, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_16() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Bessel Functions (100 digit precision)", "cpp_dec_float_100", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_17.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_17() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Bessel Functions (100 digit precision)", "cpp_bin_float_100", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_18() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Bessel Functions (100 digit precision)", "mpfr_class", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_bessel_19.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void bessel_tests_19() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Bessel Functions (100 digit precision)", "mpfr::mpreal", test_bessel); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_01() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpfr_float_50", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_02() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpfr_float_50 (no expression templates", test_nct, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_03() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (50 digit precision)", "static_mpfr_float_50", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_04() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpf_float_50", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_05() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpf_float_50 (no expression templates", test_nct, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_06() 9 | { 10 | #ifdef TEST_MPREAL 11 | mpfr::mpreal::set_default_prec(50 * 1000L / 301L); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_07() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Non-central T Distribution (50 digit precision)", "cpp_dec_float_50", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_08() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Non-central T Distribution (50 digit precision)", "cpp_bin_float_50", test_nct, 3); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_09() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpfr_class", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_10() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Non-central T Distribution (50 digit precision)", "mpfr::mpreal", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_11() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpfr_float_100", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_12() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpfr_float_100 (no expression templates", test_nct, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_13() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Non-central T Distribution (100 digit precision)", "static_mpfr_float_100", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_14() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpf_float_100", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_15() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpf_float_100 (no expression templates", test_nct, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_16() 9 | { 10 | #ifdef TEST_MPREAL 11 | mpfr::mpreal::set_default_prec(100 * 1000L / 301L); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_17.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_17() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Non-central T Distribution (100 digit precision)", "cpp_dec_float_100", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_18() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Non-central T Distribution (100 digit precision)", "cpp_bin_float_100", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_19.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_19() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpfr_class", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_nct_20.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void nct_tests_20() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Non-central T Distribution (100 digit precision)", "mpfr::mpreal", test_nct); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_01() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpfr_float_50", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_02() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpfr_float_50 (no expression templates", test_polynomial, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_03() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (50 digit precision)", "static_mpfr_float_50", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_04() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpf_float_50", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_05() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpf_float_50 (no expression templates", test_polynomial, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_06() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Polynomial Evaluation (50 digit precision)", "cpp_dec_float_50", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_07() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Polynomial Evaluation (50 digit precision)", "cpp_bin_float_50", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_08() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpfr_class", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_09() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpfr::mpreal", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_10() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (100 digit precision)", "mpfr_float_100", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_11() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (50 digit precision)", "mpfr_float_100 (no expression templates", test_polynomial, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_12() 9 | { 10 | #ifdef TEST_MPFR 11 | time_proc("Polynomial Evaluation (100 digit precision)", "static_mpfr_float_100", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_13() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Polynomial Evaluation (100 digit precision)", "mpf_float_100", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_14() 9 | { 10 | #ifdef TEST_MPF 11 | time_proc("Polynomial Evaluation (100 digit precision)", "mpf_float_100 (no expression templates", test_polynomial, et_off> >); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_15() 9 | { 10 | #ifdef TEST_CPP_DEC_FLOAT 11 | time_proc("Polynomial Evaluation (100 digit precision)", "cpp_dec_float_100", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_16() 9 | { 10 | #ifdef TEST_CPP_BIN_FLOAT 11 | time_proc("Polynomial Evaluation (100 digit precision)", "cpp_bin_float_100", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_17.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_17() 9 | { 10 | #ifdef TEST_MPFR_CLASS 11 | time_proc("Polynomial Evaluation (100 digit precision)", "mpfr_class", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /performance/sf_performance_files/sf_performance_poly_18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2011 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include "../sf_performance.hpp" 7 | 8 | void poly_tests_18() 9 | { 10 | #ifdef TEST_MPREAL 11 | time_proc("Polynomial Evaluation (100 digit precision)", "mpfr::mpreal", test_polynomial); 12 | #endif 13 | } 14 | -------------------------------------------------------------------------------- /plots/cpp_bin_float_acos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_acos.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_asin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_asin.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_atan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_atan.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_cos.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_cos.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_erf.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_erf.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_erfc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_erfc.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_exp.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_exp.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_log.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_sin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_sin.png -------------------------------------------------------------------------------- /plots/cpp_bin_float_tan.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/plots/cpp_bin_float_tan.png -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | void foo(cpp_int) 11 | { 12 | } 13 | 14 | int main() 15 | { 16 | foo(2.3); // conversion from float is explicit 17 | } 18 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i == 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i != 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i <= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i >= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i > 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i < 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i = 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i += 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i -= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i *= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i /= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i %= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i |= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i ^= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 2; 13 | i &= 2.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(2); 15 | i = a; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_20.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i = a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_21.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i += a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_22.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i -= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_23.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i *= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_24.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i /= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_25.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i %= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_26.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i &= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_27.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i |= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_28.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2), b(3); 14 | cpp_int i(3); 15 | i ^= a * b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_29.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i + 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_30.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 + i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_31.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 - i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_32.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i - 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_33.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i * 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_34.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 * i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_35.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 / i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_36.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i / 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_37.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i % 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_38.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 % i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_39.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 & i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_40.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i & 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_41.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i | 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_42.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 | i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_43.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = 3.3 ^ i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_44.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(3), j; 13 | j = i ^ 3.3; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_45.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_GMP 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | void foo(mpz_int i); 13 | 14 | int main() 15 | { 16 | mpf_t f 17 | foo(f); 18 | } 19 | 20 | #else 21 | 22 | #error "Nothing to test without GMP!" 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_46.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_GMP 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | int main() 13 | { 14 | mpf_t f; 15 | mpz_int i; 16 | i = f; 17 | } 18 | 19 | #else 20 | 21 | #error "Nothing to test without GMP!" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_47.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_GMP 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | void foo(mpf_float_50); 13 | 14 | int main() 15 | { 16 | mpf_float_100 f(2); 17 | foo(f); 18 | } 19 | 20 | #else 21 | 22 | #error "Nothing to test without GMP!" 23 | 24 | #endif 25 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_48.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_GMP 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | int main() 13 | { 14 | mpf_float_100 f(2); 15 | mpf_float_50 f2; 16 | f2 = f; 17 | } 18 | 19 | #else 20 | 21 | #error "Nothing to test without GMP!" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_49.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_MPFR 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | int main() 13 | { 14 | mpfr_float_100 f(2); 15 | mpfr_float_50 f2; 16 | f2 = f; 17 | } 18 | 19 | #else 20 | 21 | #error "Nothing to test without GMP!" 22 | 23 | #endif 24 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_50.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #ifdef TEST_MPFR 7 | 8 | #include 9 | 10 | using namespace boost::multiprecision; 11 | 12 | int main() 13 | { 14 | mpfr_float_100 f(2); 15 | mpfr_float_50 f2 = f; 16 | } 17 | 18 | #else 19 | 20 | #error "Nothing to test without GMP!" 21 | 22 | #endif 23 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_51.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_100 f(2); 13 | cpp_dec_float_50 f2 = f; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_52.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_100 f(2); 13 | cpp_dec_float_50 f2; 14 | f2 = f; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_53.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | int256_t i = 3; 13 | int128_t j = i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_54.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | int256_t i = 3; 13 | int128_t j; 14 | j = i; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_55.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | int256_t i = 3; 13 | uint256_t j; 14 | j = i; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_56.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | int256_t i = 3; 13 | uint256_t j = i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_57.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 3; 13 | int256_t j = i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_58.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i = 3; 13 | int256_t j; 14 | j = i; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/conv_fail_59.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_int i(1), j(3); 13 | void* p = i * j; 14 | (void)p; // warning suppression. 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/cpp_int_complement.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | checked_int256_t i; 13 | i = ~i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/cpp_int_negate_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | checked_uint256_t i; 13 | i = -i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/cpp_int_negate_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | number, et_on> i; 13 | i = -i; 14 | } 15 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_01.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | number, et_on> a(2); 13 | number, et_off> b(2); 14 | 15 | a = a + b; 16 | } 17 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_02.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using namespace boost::multiprecision; 10 | 11 | int main() 12 | { 13 | cpp_dec_float_50 a(2); 14 | cpp_int b(2); 15 | 16 | a = a + b; 17 | } 18 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_03.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | ++x; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_04.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x++; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_05.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x--; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_06.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | --x; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_07.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x += a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_08.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x -= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_09.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x *= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_10.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x /= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_11.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x %= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_12.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x |= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_13.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x &= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_14.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x ^= a; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_15.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x >>= 2; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_16.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x <<= 2; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_17.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x = 2; 15 | } 16 | -------------------------------------------------------------------------------- /test/compile_fail/operator_fail_18.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float_50 a(2), b(3); 13 | auto x = a + b; 14 | x = a; 15 | } 16 | -------------------------------------------------------------------------------- /test/git_issue_167.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2019 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include "test.hpp" 8 | 9 | int main() 10 | { 11 | try{ 12 | std::locale::global(std::locale("en-US")); 13 | boost::multiprecision::cpp_dec_float_50 d("1234.56"); 14 | std::string s = d.str(); 15 | 16 | BOOST_CHECK_EQUAL(s, "1234.56"); 17 | } 18 | catch(const std::runtime_error&){} // No en-US locale 19 | 20 | return boost::report_errors(); 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /test/git_issue_393.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | // 6 | 7 | #include 8 | #include 9 | #include 10 | 11 | typedef boost::multiprecision::cpp_rational NT; 12 | typedef Eigen::Matrix M; 13 | 14 | void f(M& m1, M const& m2) 15 | { 16 | m1 = m2 * m2; 17 | } 18 | -------------------------------------------------------------------------------- /test/git_issue_506.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2022 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include "test.hpp" 8 | 9 | using namespace std; 10 | namespace mp = boost::multiprecision; 11 | 12 | int main() 13 | { 14 | mp::cpp_int ten(10); 15 | mp::cpp_int ran(5); 16 | mp::cpp_int pmod = mp::powm(ten, 5, 13) * 5; 17 | BOOST_CHECK(pmod == (100000 % 13) * 5); 18 | pmod = mp::powm(ten, 5, 13) * ran; 19 | BOOST_CHECK(pmod == (100000 % 13) * 5); 20 | return 0; 21 | } 22 | -------------------------------------------------------------------------------- /test/git_issue_509.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2023 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #define BOOST_MP_STANDALONE 7 | 8 | #include 9 | #include 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | uint64_t doubleAsInt = 0xBFDFFFFFFFFFFFFC; 16 | const auto value = std::bit_cast(doubleAsInt); 17 | boost::multiprecision::cpp_bin_float_quad v = value; 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /test/git_issue_608.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2024 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | using big_float_type = boost::multiprecision::cpp_bin_float_100; 10 | 11 | int main() 12 | { 13 | static_assert(boost::multiprecision::is_compatible_arithmetic_type, big_float_type>::value == 0, "This should not be a compatible type"); 14 | } 15 | 16 | -------------------------------------------------------------------------------- /test/git_issue_636.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2024 Matt Borland. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | // 6 | // See: https://github.com/boostorg/multiprecision/issues/635 7 | 8 | #include 9 | #include 10 | 11 | int main() 12 | { 13 | static_assert(std::is_trivially_copyable::value, "Should be trivial now"); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/include_test/cpp_bin_float_include_test.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_bin_float<50> a; 13 | } 14 | -------------------------------------------------------------------------------- /test/include_test/cpp_dec_float_include_test.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | cpp_dec_float<50> a; 13 | } 14 | -------------------------------------------------------------------------------- /test/include_test/gmp_include_test.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | mpf_float a; 13 | mpz_int b; 14 | mpq_rational c; 15 | } 16 | -------------------------------------------------------------------------------- /test/include_test/mpfr_include_test.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | mpfr_float a; 13 | } 14 | -------------------------------------------------------------------------------- /test/include_test/tommath_include_test.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | using namespace boost::multiprecision; 9 | 10 | int main() 11 | { 12 | tom_int a; 13 | } 14 | -------------------------------------------------------------------------------- /test/math/high_prec/readme.txt: -------------------------------------------------------------------------------- 1 | These tests are designed to test Boost.Math's code at really rather high precision - 500 decimal digits or so. 2 | 3 | As such they use their own test data, and take rather a long time to run. 4 | 5 | // Copyright 2016 John Maddock. Distributed under the Boost 6 | // Software License, Version 1.0. (See accompanying file 7 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 8 | -------------------------------------------------------------------------------- /test/math/instances/instances.cpp: -------------------------------------------------------------------------------- 1 | // Copyright John Maddock 2013. 2 | // Use, modification and distribution are subject to the 3 | // Boost Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #define BOOST_MATH_OVERFLOW_ERROR_POLICY ignore_error 7 | 8 | #include "../setup.hpp" 9 | #include 10 | 11 | //#define BOOST_MATH_TEST_TYPE double 12 | //#define TEST_GROUP_1 13 | #include "../../../../math/test/test_instances/test_instances.hpp" 14 | -------------------------------------------------------------------------------- /test/math/readme.txt: -------------------------------------------------------------------------------- 1 | These tests verify that the multiprecision types can interoperate with Boost.Math. 2 | 3 | We use Boost.Math's own test data for these and test at various precisions which trigger 4 | different code inside the Math lib. We don't test at very high precision here as 5 | Boost.Math's test data doesn't go much beyond 35 digits (for good reason, some compilers 6 | choke when attempting to parse higher precision numbers as double's). 7 | 8 | 9 | // Copyright 2018 John Maddock. Distributed under the Boost 10 | // Software License, Version 1.0. (See accompanying file 11 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 12 | 13 | -------------------------------------------------------------------------------- /test/no_eh_test_support.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2016 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | #include 8 | 9 | #ifdef BOOST_NO_EXCEPTIONS 10 | 11 | #include 12 | #include 13 | 14 | namespace boost { 15 | 16 | void throw_exception(std::exception const& e) 17 | { 18 | std::cerr << "Terminating with exception: " << e.what() << std::endl; 19 | } 20 | 21 | } // namespace boost 22 | 23 | #else 24 | 25 | namespace boost { namespace detail { 26 | void dummy_proc() {} 27 | }} // namespace boost::detail 28 | 29 | #endif 30 | -------------------------------------------------------------------------------- /test/serial_txts/boost-no-inspect: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/boostorg/multiprecision/96eb274ac6bea385f435e743d8206275ff56a184/test/serial_txts/boost-no-inspect -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_complex128.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012-2021 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #define BOOST_MP_STANDALONE 8 | 9 | #include 10 | 11 | #ifdef BOOST_HAS_FLOAT128 12 | #include 13 | #endif 14 | 15 | #include "test_arithmetic.hpp" 16 | 17 | int main() 18 | { 19 | #ifdef BOOST_HAS_FLOAT128 20 | test(); 21 | #endif 22 | return boost::report_errors(); 23 | } 24 | -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_cpp_dec_float.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 - 2021 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #define BOOST_MP_STANDALONE 8 | 9 | #include "test_arithmetic.hpp" 10 | #include 11 | 12 | template 13 | struct related_type>> 14 | { 15 | using type = boost::multiprecision::number>; 16 | }; 17 | 18 | int main() 19 | { 20 | test(); 21 | return boost::report_errors(); 22 | } 23 | -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_float_128.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 - 2021 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #ifdef _MSC_VER 8 | #define _SCL_SECURE_NO_WARNINGS 9 | #endif 10 | 11 | #define BOOST_MP_STANDALONE 12 | 13 | #include "test_arithmetic.hpp" 14 | #include 15 | 16 | int main() 17 | { 18 | test(); 19 | return boost::report_errors(); 20 | } 21 | -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_gmp.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #ifdef _MSC_VER 8 | #define _SCL_SECURE_NO_WARNINGS 9 | #endif 10 | 11 | #define BOOST_MP_STANDALONE 12 | 13 | #include "test_arithmetic.hpp" 14 | #include 15 | #include 16 | 17 | int main() 18 | { 19 | test(); 20 | return boost::report_errors(); 21 | } 22 | -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_mpf_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #define BOOST_MP_STANDALONE 8 | 9 | #include "test_arithmetic.hpp" 10 | #include 11 | #include 12 | 13 | int main() 14 | { 15 | test > >(); 16 | return boost::report_errors(); 17 | } 18 | -------------------------------------------------------------------------------- /test/standalone_test_arithmetic_tommath.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. 3 | // Copyright 2021 Matt Borland. Distributed under the Boost 4 | // Software License, Version 1.0. (See accompanying file 5 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 6 | 7 | #ifdef _MSC_VER 8 | #define _SCL_SECURE_NO_WARNINGS 9 | #endif 10 | 11 | #define BOOST_MP_STANDALONE 12 | 13 | #include "test_arithmetic.hpp" 14 | #include 15 | 16 | template <> 17 | struct is_twos_complement_integer : public std::integral_constant 18 | {}; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_ab_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include "../performance/arithmetic_backend.hpp" 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_ab_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include "../performance/arithmetic_backend.hpp" 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_ab_3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include "../performance/arithmetic_backend.hpp" 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_complex128.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #ifdef BOOST_HAS_FLOAT128 8 | #include 9 | #endif 10 | 11 | #include "libs/multiprecision/test/test_arithmetic.hpp" 12 | 13 | int main() 14 | { 15 | #ifdef BOOST_HAS_FLOAT128 16 | test(); 17 | #endif 18 | return boost::report_errors(); 19 | } 20 | -------------------------------------------------------------------------------- /test/test_arithmetic_complex_adaptor.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #define NO_MIXED_OPS 7 | 8 | #include 9 | 10 | #include "libs/multiprecision/test/test_arithmetic.hpp" 11 | 12 | int main() 13 | { 14 | test(); 15 | test >, boost::multiprecision::et_on> >(); 16 | return boost::report_errors(); 17 | } 18 | -------------------------------------------------------------------------------- /test/test_arithmetic_complex_adaptor_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #define MIXED_OPS_ONLY 7 | 8 | #include 9 | 10 | #include "libs/multiprecision/test/test_arithmetic.hpp" 11 | 12 | int main() 13 | { 14 | test(); 15 | test >, boost::multiprecision::et_on> >(); 16 | return boost::report_errors(); 17 | } 18 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_bin_float_5.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | #include "libs/multiprecision/test/test_arithmetic.hpp" 9 | 10 | using namespace boost::multiprecision; 11 | 12 | typedef number, et_off> cpp_bin_float_500_et_s; 13 | 14 | template <> 15 | struct related_type 16 | { 17 | typedef number >, et_off> type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_complex_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_complex_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_dec_float_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | #include "test_arithmetic.hpp" 9 | 10 | template 11 | struct related_type > > 12 | { 13 | typedef boost::multiprecision::number > type; 14 | }; 15 | 16 | int main() 17 | { 18 | test(); 19 | return boost::report_errors(); 20 | } 21 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_dec_float_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | 8 | #include "test_arithmetic.hpp" 9 | 10 | template 11 | struct related_type > > 12 | { 13 | typedef boost::multiprecision::number > type; 14 | }; 15 | 16 | int main() 17 | { 18 | test, boost::multiprecision::et_off> >(); 19 | return boost::report_errors(); 20 | } 21 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_rat_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_cpp_rat_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_dbg_adptr1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #define NO_MIXED_OPS 11 | 12 | #include 13 | #include 14 | #include "test_arithmetic.hpp" 15 | 16 | int main() 17 | { 18 | test > > >(); 19 | return boost::report_errors(); 20 | } 21 | -------------------------------------------------------------------------------- /test/test_arithmetic_dbg_adptr1m.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #define MIXED_OPS_ONLY 11 | 12 | #include 13 | #include 14 | #include "test_arithmetic.hpp" 15 | 16 | int main() 17 | { 18 | test > > >(); 19 | return boost::report_errors(); 20 | } 21 | -------------------------------------------------------------------------------- /test/test_arithmetic_dbg_adptr2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_float_128.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_logged_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_logged_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #include 12 | #include "test_arithmetic.hpp" 13 | 14 | int main() 15 | { 16 | test > > >(); 17 | return boost::report_errors(); 18 | } 19 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpc.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #define TEST_MPC 8 | 9 | #include "libs/multiprecision/test/test_arithmetic.hpp" 10 | 11 | template 12 | struct related_type > > 13 | { 14 | typedef boost::multiprecision::number > type; 15 | }; 16 | 17 | int main() 18 | { 19 | test(); 20 | return boost::report_errors(); 21 | } 22 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpc_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpc_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpf_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpf_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfi_50.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #define TEST_MPFR 12 | #include "test_arithmetic.hpp" 13 | 14 | template 15 | struct related_type > > 16 | { 17 | typedef boost::multiprecision::number > type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfi_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfi_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #define TEST_MPFR 12 | #include "test_arithmetic.hpp" 13 | 14 | template 15 | struct related_type > > 16 | { 17 | typedef boost::multiprecision::number > type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfr_50.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #define TEST_MPFR 12 | #include "test_arithmetic.hpp" 13 | 14 | template 15 | struct related_type > > 16 | { 17 | typedef boost::multiprecision::number > type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfr_50_mixed.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #define TEST_MPFR 12 | #include "test_arithmetic.hpp" 13 | 14 | template <> 15 | struct related_type 16 | { 17 | typedef boost::multiprecision::mpfr_float_50 type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfr_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpfr_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpq.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | template <> 15 | struct related_type 16 | { 17 | typedef boost::multiprecision::mpz_int type; 18 | }; 19 | 20 | int main() 21 | { 22 | test(); 23 | return boost::report_errors(); 24 | } 25 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpq_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpq_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpz.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | #include 12 | 13 | #include "test_arithmetic.hpp" 14 | 15 | int main() 16 | { 17 | test(); 18 | return boost::report_errors(); 19 | } 20 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpz_dbg_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_mpz_logged_adptr.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2021 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #include 7 | #include 8 | 9 | #include "test_arithmetic.hpp" 10 | 11 | int main() 12 | { 13 | test > >(); 14 | return boost::report_errors(); 15 | } 16 | -------------------------------------------------------------------------------- /test/test_arithmetic_skeleton.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include "skeleton_backend.hpp" 11 | #include "test_arithmetic.hpp" 12 | 13 | int main() 14 | { 15 | test(); 16 | return boost::report_errors(); 17 | } 18 | -------------------------------------------------------------------------------- /test/test_arithmetic_tommath.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2012 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | #ifdef _MSC_VER 7 | #define _SCL_SECURE_NO_WARNINGS 8 | #endif 9 | 10 | #include 11 | 12 | #include "test_arithmetic.hpp" 13 | 14 | template <> 15 | struct is_twos_complement_integer : public std::integral_constant 16 | {}; 17 | 18 | int main() 19 | { 20 | test(); 21 | return boost::report_errors(); 22 | } 23 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_bin_float_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type(); 14 | test_float_type(); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_bin_float_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_2(); 14 | test_float_type_2(); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_bin_float_3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_3(); 14 | test_float_type_3(); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_complex.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2023 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_complex_type(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_dec_float.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | template <> 11 | struct related_number 12 | { 13 | typedef boost::multiprecision::cpp_dec_float_50 type; 14 | }; 15 | 16 | int main() 17 | { 18 | using namespace boost::multiprecision; 19 | test_float_type(); 20 | test_float_type(); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_dec_float_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | template <> 11 | struct related_number 12 | { 13 | typedef boost::multiprecision::cpp_dec_float_50 type; 14 | }; 15 | 16 | int main() 17 | { 18 | using namespace boost::multiprecision; 19 | //test_float_type_2(); 20 | test_float_type_2(); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_dec_float_3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | template <> 11 | struct related_number 12 | { 13 | typedef boost::multiprecision::cpp_dec_float_50 type; 14 | }; 15 | 16 | int main() 17 | { 18 | using namespace boost::multiprecision; 19 | //test_float_type_2(); 20 | test_float_type_3(); 21 | return 0; 22 | } 23 | -------------------------------------------------------------------------------- /test/test_eigen_interop_cpp_int.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_integer_type(); 14 | test_integer_type(); 15 | test_integer_type(); 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/test_eigen_interop_gmp.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_integer_type(); 14 | test_integer_type(); 15 | 16 | return 0; 17 | } 18 | -------------------------------------------------------------------------------- /test/test_eigen_interop_gmp_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | test_float_type(); 13 | test_float_type(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpc.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_complex_type(); 14 | test_complex_type(); 15 | return 0; 16 | } 17 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_1.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_2.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_2(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_3.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_3(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_4.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_5.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_2(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_eigen_interop_mpfr_6.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////////////////////// 2 | // Copyright 2018 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) 5 | 6 | #include 7 | 8 | #include "eigen.hpp" 9 | 10 | int main() 11 | { 12 | using namespace boost::multiprecision; 13 | test_float_type_3(); 14 | return 0; 15 | } 16 | -------------------------------------------------------------------------------- /test/test_float128_serial.cpp: -------------------------------------------------------------------------------- 1 | /////////////////////////////////////////////////////////////// 2 | // Copyright 2013 John Maddock. Distributed under the Boost 3 | // Software License, Version 1.0. (See accompanying file 4 | // LICENSE_1_0.txt or copy at https://www.boost.org/LICENSE_1_0.txt 5 | 6 | // 7 | // Compare arithmetic results using fixed_int to GMP results. 8 | // 9 | 10 | #ifdef _MSC_VER 11 | #define _SCL_SECURE_NO_WARNINGS 12 | #endif 13 | 14 | #include 15 | #include "test_float_serial.hpp" 16 | 17 | int main() 18 | { 19 | using namespace boost::multiprecision; 20 | test(); 21 | return boost::report_errors(); 22 | } 23 | -------------------------------------------------------------------------------- /test/ublas_interop/test1.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2000-2002 3 | // Joerg Walter, Mathias Koch 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. (See 6 | // accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // The authors gratefully acknowledge the support of 10 | // GeNeSys mbH & Co. KG in producing this work. 11 | // 12 | 13 | #if defined(__GNUC__) && (__GNUC__ >= 9) 14 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" 15 | #endif 16 | 17 | #include "test1.hpp" 18 | 19 | int main() 20 | { 21 | test_vector(); 22 | test_matrix_vector(); 23 | test_matrix(); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /test/ublas_interop/test3.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2000-2002 3 | // Joerg Walter, Mathias Koch 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. (See 6 | // accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // The authors gratefully acknowledge the support of 10 | // GeNeSys mbH & Co. KG in producing this work. 11 | // 12 | 13 | #if defined(__GNUC__) && (__GNUC__ >= 9) 14 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" 15 | #endif 16 | 17 | #include "test3.hpp" 18 | 19 | int main() 20 | { 21 | test_vector(); 22 | test_matrix_vector(); 23 | test_matrix(); 24 | return 0; 25 | } 26 | -------------------------------------------------------------------------------- /test/ublas_interop/test4.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2000-2002 3 | // Joerg Walter, Mathias Koch 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. (See 6 | // accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // The authors gratefully acknowledge the support of 10 | // GeNeSys mbH & Co. KG in producing this work. 11 | // 12 | 13 | #if defined(__GNUC__) && (__GNUC__ >= 9) 14 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" 15 | #endif 16 | 17 | #include "test4.hpp" 18 | 19 | int main() 20 | { 21 | test_matrix_vector(); 22 | test_matrix(); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/ublas_interop/test5.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2000-2002 3 | // Joerg Walter, Mathias Koch 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. (See 6 | // accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // The authors gratefully acknowledge the support of 10 | // GeNeSys mbH & Co. KG in producing this work. 11 | // 12 | 13 | #if defined(__GNUC__) && (__GNUC__ >= 9) 14 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" 15 | #endif 16 | 17 | #include "test5.hpp" 18 | 19 | int main() 20 | { 21 | test_matrix_vector(); 22 | test_matrix(); 23 | return 0; 24 | } 25 | -------------------------------------------------------------------------------- /test/ublas_interop/test6.cpp: -------------------------------------------------------------------------------- 1 | // 2 | // Copyright (c) 2000-2002 3 | // Joerg Walter, Mathias Koch 4 | // 5 | // Distributed under the Boost Software License, Version 1.0. (See 6 | // accompanying file LICENSE_1_0.txt or copy at 7 | // http://www.boost.org/LICENSE_1_0.txt) 8 | // 9 | // The authors gratefully acknowledge the support of 10 | // GeNeSys mbH & Co. KG in producing this work. 11 | // 12 | 13 | #if defined(__GNUC__) && (__GNUC__ >= 9) 14 | #pragma GCC diagnostic ignored "-Wdeprecated-copy" 15 | #endif 16 | 17 | #include "test6.hpp" 18 | 19 | int main() 20 | { 21 | test_matrix_vector(); 22 | test_matrix(); 23 | return 0; 24 | } 25 | --------------------------------------------------------------------------------