We are currently working on new rules for what content should and shouldn't be allowed on this website, and are looking for feedback! See Esolang:2026 topicality proposal to view and give feedback on the current draft.

Trigfunge

From Esolang
Jump to navigation Jump to search

Trigfunge is a fungeoid invented by User:None1 that uses a queue instead of a stack and uses trigonometric functions to manipulate data.

Memory

Trigfunge uses a queue which stores unbounded floats with infinite precision.

Commands

  • @^v<>|_0: The same as Befunge.
  • sct: Change queue front to sin/cos/tan(queue front) respectively.
  • =: The next command is skipped unless the queue front is equal to the value behind it.
  • !: Pop queue front and push it into the queue back.
  • ,: Input number and push it into queue. (optional)
  • .: Output queue front without popping it. (optional)

Computational class

Turing-complete because it can simulate a 2-register minsky machine. We can use cosn(0) (0 applied by cos n times) to represent the integer n.

We can push 3 numbers a,b,c into the queue. Then, we can use the ! command to access any number and compare any two. Decrement can be done by incrementing c instead.

See also