Bug: `W` flag doesn't work sometimes
PlaceReporter99 opened this issue · comments
Describe the bug
Some programs do not work with the W
flag.
Example program
W
flag
1»⟑]"Ȯ⁋æ≥ǔ}¼√ḋ¾d¯₴÷≤„~-↳§*≤4_⌐↳¯→ḟS∆Y↵Ḃ¥zjλ…°qẆ∷9»
Expected Output
⟨ 1 | 2190103378294521845700248699309885665950123333195645737170955981267389324534409006970256858120588676151695966441 ⟩
Other things
Error in offline interpreter:
Traceback (most recent call last):
File "<pyshell#148>", line 1, in <module>
execute_vyxal('1»⟑]"Ȯ⁋æ≥ǔ}¼√ḋ¾d¯₴÷≤„~-↳§*≤4_⌐↳¯→ḟS∆Y↵Ḃ¥zjλ…°qẆ∷9»',"eW","")
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\main.py", line 409, in execute_vyxal
output = vy_str(stack, ctx)
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\elements.py", line 7379, in vy_str
return {
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\elements.py", line 7388, in <lambda>
+ (" | " if ctx.vyxal_lists else ", ").join(
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\elements.py", line 7390, in <lambda>
lambda x: vy_repr(x, ctx),
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\elements.py", line 7299, in vy_repr
return {
File "C:\Users\user\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\vyxal\elements.py", line 7302, in <lambda>
else str(sympy.nsimplify(lhs.round(20), rational=True)),
AttributeError: 'int' object has no attribute 'round'
This isn't the fault of the W flag, it's the fault of compressed numbers not pushing as Sympy values.