Opened 7 years ago

Closed 7 years ago

Last modified 6 years ago

#11648 closed Bugs (fixed)

div infinite loop

Reported by: chfast@… Owned by: John Maddock
Milestone: Boost 1.61.0 Component: multiprecision
Version: Boost 1.59.0 Severity: Problem
Keywords: Cc:

Description

Dividing two values of fixed 256-bit unchecked unsigned integer type can never finish.

Type:

using u256 =  boost::multiprecision::number<boost::multiprecision::cpp_int_backend<256, 256, boost::multiprecision::unsigned_magnitude, boost::multiprecision::unchecked, void>>;

Values:

u256 a{"0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFBA"};
u256 b{"0x1DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6076B981DAE6077"};

Full test: https://gist.github.com/chfast/9136896f1ee1d214b7a6

Attachments (1)

boost-div.cpp (564 bytes ) - added by chfast@… 7 years ago.
test case

Download all attachments as: .zip

Change History (5)

by chfast@…, 7 years ago

Attachment: boost-div.cpp added

test case

comment:1 by John Maddock, 7 years ago

Resolution: fixed
Status: newclosed

comment:2 by anonymous, 6 years ago

Has that been released in 1.61?

comment:3 by anonymous, 6 years ago

Yes.

comment:4 by chfast@…, 6 years ago

Milestone: To Be DeterminedBoost 1.61.0
Note: See TracTickets for help on using tickets.