Im trying to get the number of digits that the number (2^32)! would have. According to wikipedia thats a way that doesn't involve actual computing the scary factorial.
evalf(sum(log(i), i = 1 .. 2^32))
That should be finite, just very big.
sFunction := proc (x) options operator, arrow; piecewise(0 <= x and x <= 15, sBox[x+1], -42) end proc
plots would work out nicely if i could force it to start at 0
ok, the seq line gives me a error but the syntax works fine, cant seem to fix that...
Heres my latest annoyance:
sBox := [12, 5, 6, 11, 9, 0, 10, 13, 3, 14, 15, 8, 7, 1, 2]
f := proc (x) options operator, arrow; sFunction(trunc(x)) end proc
plot(f, 0 .. 15, title = "S-Box", labels = ["x", "S-Box(x)"], style = point)
This gives me a graph that clearly has more than 16 points.
Thanks as usual
Anything for 11 anychance? Not sure if Ill be upgrading anytime soon...
Alright, that seemed to help alot. Starting to get the hang of it.
I still have little problems like:
Error, invalid parameters for inline function
> inverse := proc (a) options operator, arrow; G:-output(G:-inverse(G:-input(a))) end proc;
Error, (in inverse) `G` does not evaluate to a module
Anychance you could tell me why this function doesn't return a decimal answer?
decAdd := proc (a, b) options operator, arrow; eval(G:-`+`(G:-input(a), G:-input(b)), T = 2) end proc
And thanks for the info!