This is a rather common inquiry in contests that require computing elements of a sequence.
For example, consider the following recursive implementation of the factorial function (Python):
f = lambda n:n<1or n*f(n-1)
This works well for all positive n; f(n) returns the required result as an in...
Link to TIO: https://tio.run/##1VhLb9pAEL7zK1a59NIiSNtDc0tCG6lS2yhEitSIw2KP7REbL10vIfx6amMb7PVgdjHpQ@KxrO15fvPtMJq/4Hp9I5lOXxGwW5lo9iMI0IMLtoT0xzB9Cwj0281KYRgVy2yz37tFb7aYM87mPEkgDkGxUGIcZgLvU4FXfAoiwCQCter3ckXm/gVL5EJHlKp2BdcrT8gYSrnFzwsWS5WK@5i@c3HnsW9h7ngRxys2niEk7JarmZNu8@HSiIonpJF2kdwqa7tphM/oA@Ops9cy/rUA1e99YpiwJUed3cM1G2uuvAiFz74vnkBJIcNtWqhrZWrKCB6BAsqsXGHzSgVzhY5MsaGOtME2yfsgA7yBdVPso5i0iv4qVwISG@zU78wtqe6V4Kg4byxziwwfqNi5xObbQmicC/S4RhlneMi@neL5oFCDepOwEcylLtBDQ/84W3JJ9NX2sL1Xvhu7PERcp55kbDXCIAAFsQeH0kUCtKsy8uL@fO8Htzunniyhf6s6nGPXiT2KAD/yaTJ5vVp7NzwRrZOU2o0s2gv0AL0Xyw/FyX3AAh6ixz…
^^ is my attempt at a sqrt implementation
if I get that working I have the whole thing working, once I glue it together
I have a chunk that works for abs, a chunk that gets the a*a+b*b for Pythagorean, and then I'd just have to do addition and I'd be done
Complex Dice Rolling Expressions code-golf random parsing string
Background
I play D&D on a regular basis with some friends. While talking about the complexity of some systems/versions when it comes to rolling dice and applying bonuses and penalties, we jokingly came up with some additional com...
Taxi, 7394 bytes
Go to the Post Office:w 1 l 1 r 1 l.Pickup a passenger going to The Babelfishery.Pickup a passenger going to The Babelfishery.Go to The Babelfishery:s 1 l 1 r.Pickup a passenger going to Cyclone.Go to Cyclone:n 5 l 2 l.Pickup a passenger going to Bird's Bench.Pickup a passenger ...
CMC: given a string, for "", "1", "22", "333", "4444", "55555", "666666", "7777777", "88888888", "999999999", output a certain value; for other strings output another certain value
a capacitor stores electrical difference voltage is proportional to that field but voltage itself is not like the electron that are on plate to my knoledge
CMC: given a string, for "", "1", "22", "333", "4444", "55555", "666666", "7777777", "88888888", "999999999", output a certain value; for other strings output another certain value
@DestructibleLemon, it's the essence, but modern capacitors a) don't use flat plates, but roll them up into a small package; b) use more materials than just metal and air. See e.g. en.wikipedia.org/wiki/Capacitor_types
Rank Correlation Coefficient
The usual correlation coefficient (in 2d) measures how well a set of points can be described by a line, and if yes, its sign tells us whether we have a positive or negative correlation. But this assumes that coordinates of the points can actually interpreted quantita...
CMC: given a string, for "", "1", "22", "333", "4444", "55555", "666666", "7777777", "88888888", "999999999", output a certain value; for other strings output another certain value