Adriandmen / 05AB1E

A concise stack-based golfing language
MIT License
759 stars 48 forks source link

BUG: Raising numbers to the power of any float which is actually a whole number runs infinitely #179

Closed lyxal closed 3 years ago

lyxal commented 3 years ago

To understand this issue, compare the following programs:

10 1 m

Try it online!

and

10 1z m

Try it online!

The program where 10 is raised to the power of integer 1 outputs as expected. But the program where 10 is raised to the power of float 1.0 never ends. Yet, raising 10 to other floats works.

Further, compare the following:

10 2 m

Try it online!

and

10 2 z z m

Try it online!

(Here, we use z twice to convert 2 to 2.0)

The program raising 10 to the power of plain integer 2 works as expected, while the program raising 10 to the power of float 2.0 infinitely runs.

Relevant SE chat conversation

lyxal commented 3 years ago

Okay turns out TIO is stale and needs 05AB1E updated.