Re: [EXTERNAL] Re: 1-button calcula tor ~ "all elementary fns from a single operator"
Henry Baker <[email protected]> Sun, 03 May 2026 16:33:02 +0000
| Newsgroups | gmane.comp.mathematics.maxima.general |
|---|---|
| Message-ID | <[email protected]> |
OK, I looked at the Python3 code for the EML compiler, and it looks like it would be trivial to translate its formulae into Maxima using pattern matching.
For example, here are some of the Python3 functions:
def EML(a, b): return f"EML[{a},{b}]"
def eml_exp(z): return EML(z, "1") # Exp[z]
def eml_log(z): return EML("1", eml_exp(EML("1", z))) # Log[z]
def eml_zero(): return eml_log("1") # 0 = Log[1]
def eml_sub(a, b): return EML(eml_log(a), eml_exp(b)) # a - b
def eml_neg(z): return eml_sub(eml_zero(), z) # -z
def eml_add(a, b): return eml_sub(a, eml_neg(b)) # a + b
def eml_inv(z): return eml_exp(eml_neg(eml_log(z))) # 1/z
def eml_mul(a, b): return eml_exp(eml_add(eml_log(a), eml_log(b))) # a*b
def eml_div(a, b): return eml_mul(a, eml_inv(b)) # a/b
def eml_pow(a, b): return eml_exp(eml_mul(b, eml_log(a))) # a^b
def eml_one(): return "1"
def eml_two(): return eml_add("1", "1")
def eml_double(z): return eml_add(z, z)
Thus, in Maxima
matchdeclare(z,all);
tellsimp(exp(z),EML(z,1));
tellsimp(log(z),EML(1,exp(EML(1,z))));
However, such a pattern-matching compiler would have a bigger problem with sums and products, and an even bigger problem with converting constants -- e.g., integers, rationals, floats.
The good news: EML compiling and simplification provide a pretty decent workout for Maxima, and would likely make some pretty good test cases and/or benchmarks.
-----Original Message-----
From: Henry Baker <[email protected]>
Sent: May 2, 2026 8:53 AM
To: Przemek Klosowski via Maxima-discuss <[email protected]>
Subject: Re: [Maxima-discuss] [EXTERNAL] Re: 1-button calculator ~ "all elementary fns from a single operator"
OK, I downloaded the "EML compiler" from here:
https://github.com/VA00/SymbolicRegressionPackage/tree/master
The EML compiler requires python3 & numpy (and probably other stuff that I might already have installed).
I then did a trivial script to convert from Mathematica expressions to Maxima expressions.
EML requires that log(0)=minf, so I defined mylog(x):=if (x=0) then minf else log(x), and used mylog(x) instead of log(x) in the definition of eml.
However, I now require that %e^minf = 0.
What is the magic in Maxima to make this happen? I did "? minf", but that didn't provide any help.
-----Original Message-----
From: Henry Baker
Sent: May 1, 2026 11:23 AM
To: Przemek Klosowski via Maxima-discuss
Subject: Re: [Maxima-discuss] [EXTERNAL] Re: 1-button calculator ~ "all elementary fns from a single operator"
Obviously, Google was confused.
Q: If z = exp(x)-log(y), then x = log(z + log(y)) might look a tad better ? Is this log(z+log(y)) function universal in the same sense as eml() ?
Q: if we have a 1BC expression for f(x)=y, can we then trivially compute x=f^-1(y) ?
Q: The 1BC paper seems to want to rely on functions defined over the reals; I suspect that functions defined over the complex numbers might give additional 1BC results that might be prettier ? Perhaps the constant %pi*%i might work to force things into the complex plane ?
Q: I've always had a fondness for asinh(x), as it is bijective onto the reals, and has many of the same properties/characteristics as "gradual underflow" floating point numbers. I'm wondering if it could be part of a universal 1BC function ?
-----Original Message-----
From: Przemek Klosowski via Maxima-discuss
Sent: May 1, 2026 9:24 AM
To:
Subject: Re: [Maxima-discuss] [EXTERNAL] Re: 1-button calculator ~ "all elementary fns from a single operator"
> BTW, Google just told me that the obvious differential equation for > eml(x,y) is
>
> dy/dx = y*exp(x)
(%i1) eq:'diff(y,x)=y*exp(x);
dy x
(%o1) ── = %e y
dx
(%i2) ode2(eq,y,x);
x
%e
(%o2) y = %e %c
what am I missing?
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss
_______________________________________________
Maxima-discuss mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maxima-discuss