Vyxal / Vyxal

A code-golfing language experience that has aspects of traditional programming languages - terse, elegant, readable.

Home Page:https://vyxal.github.io/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Bug: `ḋ` flag breaks complex number output

PlaceReporter99 opened this issue · comments

Describe the bug
When adding the flag to a programme that outputs a complex number, it outputs nothing in the online interpreter.

Example program (with flag)

u√

Try it

Expected Output

i

Other things

  • Latest release when issue was created
  • Removing the flag resolves issue
  • No lists to force-evaluate
  • I ran it in Python 3.10.11 IDLE (using execute_vyxal("u√","eḋ","")) and got this error (with directory names shortened):
Traceback (most recent call last):
  File "<pyshell#125>", line 1, in <module>
    execute_vyxal("u√","eḋ","")
  File "\site-packages\vyxal\main.py", line 430, in execute_vyxal
    vy_print(output, ctx=ctx)
  File "\site-packages\vyxal\elements.py", line 7260, in vy_print
    lhs = str(float(lhs))
  File "\site-packages\sympy\core\expr.py", line 350, in __float__
    raise TypeError("Cannot convert complex to float")
TypeError: Cannot convert complex to float