mirror of
https://github.com/boostorg/multiprecision.git
synced 2026-02-13 12:32:18 +00:00
Correct logic to detect when string representation has enough bits.
[SVN r77774]
This commit is contained in:
@@ -35,7 +35,7 @@ void calc_log2(T& num, unsigned digits)
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits * 1000L / 301 < 1100)
|
||||
if(digits < 3640)
|
||||
{
|
||||
num = string_val;
|
||||
return;
|
||||
@@ -92,7 +92,7 @@ void calc_e(T& result, unsigned digits)
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits * 1000L / 301 < 1100)
|
||||
if(digits < 3640)
|
||||
{
|
||||
result = string_val;
|
||||
return;
|
||||
@@ -138,7 +138,7 @@ void calc_pi(T& result, unsigned digits)
|
||||
//
|
||||
// Check if we can just construct from string:
|
||||
//
|
||||
if(digits * 1000L / 301 < 1100)
|
||||
if(digits < 3640)
|
||||
{
|
||||
result = string_val;
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user