1 Star 0 Fork 39

Yinsist/boost

forked from src-openEuler/boost 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
boost-1.81-random-Update-multiprecision_float_test.cpp-to-not-overflow.patch 1.35 KB
一键复制 编辑 原始数据 按行查看 历史
Liu Yuntao 提交于 2023-02-10 15:18 +08:00 . Update to 1.81.1
From 4239d93dad32a11e4c3829050f8070d456266133 Mon Sep 17 00:00:00 2001
From: jzmaddock <john@johnmaddock.co.uk>
Date: Wed, 1 Jun 2022 19:35:36 +0100
Subject: [PATCH] Update multiprecision_float_test.cpp to not overflow type
double. Previously the max value for uint1024_t could just squeeze into a
double because truncation occurred during the conversion, now that cpp_int
performs correctly rounded conversions, overflow occurs, and the computation
fails. Changed the problem distribution to use a multiprecision weight type,
rather than double.
---
libs/random/test/multiprecision_float_test.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/libs/random/test/multiprecision_float_test.cpp b/libs/random/test/multiprecision_float_test.cpp
index bc2a936..2b53483 100644
--- a/libs/random/test/multiprecision_float_test.cpp
+++ b/libs/random/test/multiprecision_float_test.cpp
@@ -77,7 +77,7 @@ typedef boost::mpl::list <
boost::random::lognormal_distribution<big_float>,
boost::random::normal_distribution<big_float>,
#ifndef BOOST_NO_CXX11_EXPLICIT_CONVERSION_OPERATORS
- boost::random::piecewise_constant_distribution<big_float>,
+ boost::random::piecewise_constant_distribution<big_float, big_float>,
boost::random::piecewise_linear_distribution<big_float>,
#endif
boost::random::student_t_distribution<big_float>,
--
2.33.0
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/yinist/boost.git
git@gitee.com:yinist/boost.git
yinist
boost
boost
master

搜索帮助