确认事项
Lamina版本
4deb5cd
操作系统
其他 Linux 发行版
编译器
GCC
Bug描述
尝试计算(-8)^(1/3)得到nan
重现步骤
print((-8)^(1/3));
Debug - Starting file parsing, total tokens: 15
Debug - Block parsing started: global, depth=1, position=1:1, current token='print'
Debug - parse_primary: token[0] = 'print' (type=16)
Debug - parse_primary: token[2] = '(' (type=19)
Debug - parse_primary: token[4] = '8' (type=18)
Debug - parse_primary: token[7] = '(' (type=19)
Debug - parse_primary: token[8] = '1' (type=18)
Debug - parse_primary: token[10] = '3' (type=18)
Debug - Global block ended at EOF: depth=1, statements=1
nan
期望行为
-8开三次根号应为-2

实际行为
输出nan
相关代码
> print((-8)^(1/3));
Debug - Starting file parsing, total tokens: 15
Debug - Block parsing started: global, depth=1, position=1:1, current token='print'
Debug - parse_primary: token[0] = 'print' (type=16)
Debug - parse_primary: token[2] = '(' (type=19)
Debug - parse_primary: token[4] = '8' (type=18)
Debug - parse_primary: token[7] = '(' (type=19)
Debug - parse_primary: token[8] = '1' (type=18)
Debug - parse_primary: token[10] = '3' (type=18)
Debug - Global block ended at EOF: depth=1, statements=1
nan
>
错误输出
> print((-8)^(1/3));
Debug - Starting file parsing, total tokens: 15
Debug - Block parsing started: global, depth=1, position=1:1, current token='print'
Debug - parse_primary: token[0] = 'print' (type=16)
Debug - parse_primary: token[2] = '(' (type=19)
Debug - parse_primary: token[4] = '8' (type=18)
Debug - parse_primary: token[7] = '(' (type=19)
Debug - parse_primary: token[8] = '1' (type=18)
Debug - parse_primary: token[10] = '3' (type=18)
Debug - Global block ended at EOF: depth=1, statements=1
nan
>
额外信息
虽然确实挺多计算器算不出,但lamina作为数学语言还是应该适配下
愿意协助
确认事项
Lamina版本
4deb5cd
操作系统
其他 Linux 发行版
编译器
GCC
Bug描述
尝试计算(-8)^(1/3)得到nan
重现步骤
期望行为
-8开三次根号应为-2
实际行为
输出nan
相关代码
错误输出
额外信息
虽然确实挺多计算器算不出,但lamina作为数学语言还是应该适配下
愿意协助