-
Notifications
You must be signed in to change notification settings - Fork 146
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
default to magnitude 8->1 in Dettman multiplication #1630
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me. I didn’t realize the output bounds could be set so tight.
I think it would be better to write input_magnitude := 8 * (Option.value inbounds_multiplier 1)
to be consistent with the documentation here:
Lines 442 to 446 in 60efd19
Definition default_inbounds_multiplier := 1. | |
Definition inbounds_multiplier_spec : named_argT | |
:= ([Arg.long_key "inbounds-multiplier"], | |
Arg.String, | |
["The (improper) fraction by which the bounds of each input limb are scaled (default: " ++ show default_inbounds_multiplier ++ ")"]). |
Hmm, I think what we actually want is to change |
Then just make an alternate version of the spec that uses the different default, and stick that in Line 1197 in 60efd19
|
Two files do Option.value. But perhaps they shouldn't share the option? I am not sure I understand the overall architecture here, or your suggestion wrt Heuristics. |
I think insofar as they have different default values, this is an indication that they are maybe doing at least slightly different things conceptually? I'm not sure though.
My suggestion is that CLI should be describing default values to the user, and providing the PushButtonSynthesis / BoundsPipeline levels with the values the user provides when invoking them. Whether CLI fills in defaults or passes along I guess if you define a constant for the default value in each PushButtonSynthesis file, you could parametrize the spec doc over the default value, and then pass it in when declaring the parameter for each pipeline. |
See bitcoin-core/secp256k1#1319 (review) and https://github.com/bitcoin-core/secp256k1/blob/26392da2fb7153addae0bd604495eb96f995d76c/src/field_impl.h#L329-L334