Skip to content

Loss of precision in operator% #1314

@mborland

Description

@mborland

Right now we are simply using:

const auto q_trunc {q > zero ? floor(q) : ceil(q)};
        r = lhs - (q_trunc * rhs);

We should be able to scale the lhs and rhs significands, and compute the integer modulo, followed by constructing the resultant decimal type when possible

Metadata

Metadata

Assignees

Labels

BugSomething isn't working

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions