JavaScript (ES6), 63 bytes, SLuck49
Original:
x=>eval(atob`eCp4KzEvLyAgfXBModLS4TvEn4wp1iys9YRRKC85KLIhNMC=`)
Crack:
x=>eval(atob`CgpNYXRoLnBvdyh4LTEsMC41KSAvLw4589CEIKKMRefipyz=`)
The base64 code above decodes to:
Math.pow(x-1,0.5) //...
where the ...
stands for a bunch of random garbage that is ignored by the JS interpreter, since it's in a comment.
I found this solution by trial and error. In the end, the only really tricky part were the two newlines at the beginning of the code, needed to make the rest line up properly and to get the M
in Math
to base64-encode into something that was available in the original character set. I first tried spaces, but " M"
base64-encodes into "ICBN"
and I needed the only available B
to encode ".po"
later in the code. "0+M"
, "1*M"
, "1?M"
or any other similar no-op prefixes I could think of didn't work either, but newlines did.
I suspect this may not be exactly the intended solution, but whatever — it works. :)
Demo:
var f = x=>eval(atob`eCp4KzEvLyAgfXBModLS4TvEn4wp1iys9YRRKC85KLIhNMC=`)
var g = x=>eval(atob`CgpNYXRoLnBvdyh4LTEsMC41KSAvLw4589CEIKKMRefipyz=`)
for (var i = -0; i <= 10; i++) console.log(i, '->', f(i), '->', g(f(i)))