tkellehe / noodel

A programming language designed around supporting ASCII animation based code golfing challenges.
10 stars 0 forks source link

Reciprocal of a number (1/x) #117

Open tkellehe opened 7 years ago

tkellehe commented 7 years ago

Reciprocal of a number (1/x)

my answer

A command that takes the first character of a string and places at the end, for numbers takes the reciprocal of the number. The interpreter for Noodel is written in JavaScript which has double precision floating point numbers.

Try it:)


How it works

  # Implicitly pushes the number onto the stack.
ẹ # Takes the reciprocal of the input.
  # Implicitly prints the top of the stack to the screen.