Closed ohhmm closed 3 months ago
boost::multiprecision::cpp_int("000144")
parsed into value 100.
Should this parse as an octal base?
boost::multiprecision::cpp_int("000144")
parsed into value 100.Should this parse as an octal base?
I think anything of the form 0144 should be octal, but 000144 are base-10 leading zeros that need to get stripped out. See the linked PR.
as an octal base?
Because then the expected answer is: $8{\times}8+4{\times}8+4=100$
Hi. This doesn't look expected to me. Leading zeros hardly should change base of parsing. But since it is C standard compliant, lets close this ticket.
boost::multiprecision::cpp_int("000144") parsed into value 100. See some details here: https://github.com/ohhmm/openmind/blob/28b9ed5d55bf1766606442cc34689ee0c32671e7/omnn/math/test/Integer_test.cpp#L59