| 1 |
local a = LN(SymbolExpression("x")) |
| 2 |
local b = LN(BinaryOperation.POWEXP({E, SymbolExpression("x")})) |
| 3 |
local c = BinaryOperation.POWEXP({Integer(2), LOG(Integer(2), SymbolExpression("y"))}) |
| 4 |
local d = dparse("e^(-x*ln(x))") |
| 5 |
|
| 6 |
local e = Logarithm(Integer(2), Integer(256)) |
| 7 |
local f = Logarithm(Integer(4), Integer(8)) |
| 8 |
local g = Logarithm(Integer(1)/Integer(5), Integer((125))) |
| 9 |
local h = Logarithm(Integer(1)/Integer(9), Integer(1)/Integer(243)) |
| 10 |
local i = Logarithm(Integer(1)/Integer(25), Integer(3125)) |
| 11 |
|
| 12 |
local k = Logarithm(E, Integer(1)/Integer(9)) |
| 13 |
|
| 14 |
starttest("logarithms") |
| 15 |
testeq(a, "log(e, x)") |
| 16 |
testeq(a:autosimplify(), "log(e, x)", a) |
| 17 |
testeq(b:autosimplify(), "x", b) |
| 18 |
testeq(c:autosimplify(), "y", c) |
| 19 |
testeq(d:autosimplify(), parse("x^(-x)"), d) |
| 20 |
testeq(e:autosimplify(), parse("8"), e) |
| 21 |
testeq(f:autosimplify(), parse("3/2"), f) |
| 22 |
testeq(g:autosimplify(), parse("-3"), g) |
| 23 |
testeq(h:autosimplify(), parse("5/2"), h) |
| 24 |
testeq(i:autosimplify(), parse("-5/2"), i) |
| 25 |
testeq(k:autosimplify(), parse("-ln(9)"), k) |
| 26 |
endtest() |