Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/codegen/compile.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2497,7 +2497,7 @@ module BigNumLibtommath : BigNumType = struct
then []
else
let (a, b) = Big_int.quomod_big_int n twoto28 in
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Curious why it's 28 bit here?

Copy link
Copy Markdown
Contributor Author

@ggreif ggreif Jul 27, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@nomeata is this some MP/LibTomMath thing?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I think the internal representation of libtommath bigints uses 28 bit limbs

[ Int32.of_int (Big_int.int_of_big_int b) ] @ go a
[ Big_int.int32_of_big_int b ] @ go a
in go n
in
(* how many 32 bit digits *)
Expand Down