-
Notifications
You must be signed in to change notification settings - Fork 123
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
width
issue in manual and help text
#931
Comments
That description of
As to the other point, your confusion about |
This is one of the errors mentioned in issue #931.
Brilliant, thanks for the changes! |
Hi Galois, it's me again! π
I might have got completely the wrong end of the stick here, but I think I might have found a couple of super minor errors in the manual and Cryptol help text. Hopefully easy to fix β or equally likely explain what I've misunderstood!
For the
width
function, the manual sayswidth
is(lg2 rounded up)
but what seems to be being calculated is:(lg2 (arg+1))
i.e., it seems to increment the argument and then take the
lg2
, rather than taking thelg2
and then rounding up the answer. To me, the description of the function in the manual gives the wrong answer ifarg
is a power of 2.Also, on page 70 the manual incorrectly says "Note that lg2 is the floor log base 2 function."
Separately, In the help text:
:? lg2
sayslg2 n = width (max 1 n-1)
.This doesn't seem to be the case, because
lg2 1 = 0
butwidth (max 1 0) = width 1 = 1
.Any thoughts?
Thanks for all your amazing work on Cryptol :-)
Martin
The text was updated successfully, but these errors were encountered: