To those that get inexplicable precision problems: your code most likely has a conversion of double to float at some point(like the modulo operator) and loses precision.
A reference/pointer is often 8 bytes long on the x64 architecture, so it's always pointless for primitive types unless you want to actually change them
To whom it may concern: do NOT print the lines as you execute them, else the last test will reach max buffer size and you'll waste your time looking for a nonexistent error!
Based and no unnecessary string allocation pilled.
This thing would require a very substantial effort
A creative lesson about FP
Pretty fun kata with prior knowledge in crafting interpreters
To those that get inexplicable precision problems: your code most likely has a conversion of double to float at some point(like the modulo operator) and loses precision.
You must throw an exception in cases like referencing an undeclared variable or an input that doesn't evaluate to an expression
Look at how the last basic test works, it expects a throw when trying to get a non-existent "y"
A bit too much manual work for my taste, but otherwise a good kata
This comment is hidden because it contains spoiler information about the solution
This recursive relation is correct for any base, height and modulo(if you apply it correctly too, as per the description)
I assume the 4kyu rank was given for the complexity of both instructions AND tests.
This comment is hidden because it contains spoiler information about the solution
On one hand it's the temptation and ease of regex, on the other is the temptation of writing a beautifully structured interpreter toolchain
A reference/pointer is often 8 bytes long on the x64 architecture, so it's always pointless for primitive types unless you want to actually change them
To whom it may concern: do NOT print the lines as you execute them, else the last test will reach max buffer size and you'll waste your time looking for a nonexistent error!
This comment is hidden because it contains spoiler information about the solution
Loading more items...