Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement Algorithm M #388

Closed
wants to merge 2 commits into from
Closed

Implement Algorithm M #388

wants to merge 2 commits into from

Conversation

ellie-idb
Copy link
Member

@ellie-idb ellie-idb commented Jan 5, 2022

WIP -- do not merge

Depends on changes introduced in #387.

@ellie-idb
Copy link
Member Author

Hey @9il, I'm almost done with this, but I'm getting stuck on how to handle underflowing here. Currently we just assert -- I'm not able to find much literature on how to handle what to do, as a test case like this fails:

auto view = DecimalView!ulong(false, 0, BigUIntView!ulong.fromHexString("88BF4748507FB9900ADB624CCFF8D78897DC900FB0460327D4D86D327219"));
auto coeff = (cast(BigUIntView!uint)view.coefficient).lightConst;
assert (algoM!float(0.0, coeff, cast(int)view.exponent) == float.infinity);
assert (algoM!double(0.0, coeff, cast(int)view.exponent) == 0x1.117e8e90a0ff7p+239);

@ellie-idb ellie-idb marked this pull request as ready for review January 28, 2022 19:15
@ellie-idb ellie-idb requested a review from 9il January 28, 2022 19:15
@ellie-idb ellie-idb changed the title WIP: Implement Algorithm M Implement Algorithm M Feb 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants