diff options
Diffstat (limited to 'Master/texmf-dist/tex/lualatex/luacas/test/expressions/luacas-rationalexponent.lua')
-rw-r--r-- | Master/texmf-dist/tex/lualatex/luacas/test/expressions/luacas-rationalexponent.lua | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/lualatex/luacas/test/expressions/luacas-rationalexponent.lua b/Master/texmf-dist/tex/lualatex/luacas/test/expressions/luacas-rationalexponent.lua new file mode 100644 index 00000000000..85690f8c665 --- /dev/null +++ b/Master/texmf-dist/tex/lualatex/luacas/test/expressions/luacas-rationalexponent.lua @@ -0,0 +1,15 @@ +local a = BinaryOperation.POWEXP({Integer(8), Integer(1) / Integer(2)}) +local b = BinaryOperation.POWEXP({Integer(27), Integer(1) / Integer(3)}) +local c = BinaryOperation.POWEXP({Integer(36), Integer(1) / Integer(2)}) +local d = BinaryOperation.POWEXP({Integer(36264691), Integer(1) / Integer(2)}) +local e = BinaryOperation.POWEXP({Integer(357911), Integer(1) / Integer(2)}) +local f = BinaryOperation.ADDEXP({BinaryOperation.POWEXP({Integer(8), Integer(1) / Integer(2)}), BinaryOperation.POWEXP({Integer(32), Integer(1) / Integer(2)})}) + +starttest("rational powers") +testeq(a:autosimplify(), "(2 * (2 ^ 1/2))", a) +testeq(b:autosimplify(), "3", b) +testeq(c:autosimplify(), "6", c) +testeq(d:autosimplify(), "(331 * (331 ^ 1/2))", d) +testeq(e:autosimplify(), "(71 * (71 ^ 1/2))", e) +testeq(f:autosimplify(), "(6 * (2 ^ 1/2))", f) +endtest()
\ No newline at end of file |