Constructive Derivation

From one operator to a scientific calculator.

The point of the EML result is not that elementary functions are “related”. That has been known for a long time. The point is that a single binary operator, paired with the constant 1, is enough to generate the usual elementary vocabulary in a fully constructive way.

eml(x, y) = exp(x) - log(y)

Step 1: recover exp and log

Because log(1) = 0, exponential is immediate:

exp(z) = eml(z, 1)

Logarithm takes one more level of nesting:

log(z) = eml(1, eml(eml(1, z), 1))

The algebra is straightforward:

eml(1, z) = e - log(z)
eml(eml(1, z), 1) = exp(e - log(z)) = e^e / z
eml(1, eml(eml(1, z), 1)) = e - log(e^e / z) = log(z)

Step 2: recover zero and subtraction

Once logarithm is available, zero is immediate:

0 = log(1)

Subtraction follows from the identities exp(log(a)) = a and log(exp(b)) = b on the principal branch:

sub(a, b) = eml(log(a), exp(b))
          = exp(log(a)) - log(exp(b))
          = a - b

Step 3: addition, negation, multiplication, division

neg(z) = sub(0, z)
add(a, b) = sub(a, neg(b))
inv(z) = exp(neg(log(z))) = 1 / z
mul(a, b) = exp(add(log(a), log(b))) = a * b
div(a, b) = mul(a, inv(b)) = a / b

At this point the library already contains the full field operations, still using only the EML primitive internally.

Step 4: powers and roots

pow(a, b) = exp(mul(b, log(a))) = a^b
sqrt(a) = pow(a, 1 / 2)
cbrt(a) = pow(a, 1 / 3)

This is the familiar exp-log reduction, but now the exp-log pair itself has already been reduced to EML.

Step 5: trigonometric and hyperbolic functions

The complex exponential supplies trigonometric functions through Euler’s formula. In the library implementation:

sin(x) = (exp(i x) - exp(-i x)) / (2 i)
cos(x) = (exp(i x) + exp(-i x)) / 2
tan(x) = sin(x) / cos(x)

sinh(x) = (exp(x) - exp(-x)) / 2
cosh(x) = (exp(x) + exp(-x)) / 2
tanh(x) = sinh(x) / cosh(x)

Step 6: inverse functions

Standard logarithmic formulas give the inverse families. For example:

asin(x)  = i log(-i x + sqrt(1 - x^2))
acos(x)  = i log(x + sqrt(x - 1) sqrt(x + 1))
atan(x)  = (-i / 2) log((-i + x) / (-i - x))

asinh(x) = log(x + sqrt(x^2 + 1))
acosh(x) = log(x + sqrt(x + 1) sqrt(x - 1))
atanh(x) = (1 / 2) log((1 + x) / (1 - x))

Why the complex domain appears

Real elementary functions such as sine and cosine become easiest to generate through the complex exponential, so the implementation works internally in complex128. This is not a defect of the library; it is part of the construction itself.

Branch conventions

The project follows the principal complex branch and carries the same sign correction for the imaginary unit used in the reference implementation. That choice is what keeps the constructive chain consistent with ordinary scientific-computing conventions.