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.

Division+

From Esolang
Jump to navigation Jump to search

Division+ is a less stupid version of Division invented by User:None1 that can simulate any FSA.

Syntax

Any valid program in Division looks like this:

a/b

a and b are non-negative decimal integers.

Any invalid program raises a syntax error:

Syntax error

For a valid program, if b is 0, it runs into an infinite loop without printing anything.

Otherwise, it prints the digits decimal expansion of the quotient starting from the digit right after the decimal point. For example, the program:

1/3

prints:

3333333333333333333333333333333333333333333333...(goes on forever)

and the program:

2/4

prints:

5

and the program:

2/1

prints nothing because there's no decimal point in the quotient (2).

Examples

Truth Machine

input/9

Replace input with the input (0 or 1).

Infinite loop

1/0