Scientific math: complex numbers, fractions and algebra
Zlv Desktop handles complex numbers, exact fractions, derivatives, factoring, equation solving, integrals, root finding, curve fitting and interpolation.
Beyond everyday arithmetic, the desktop Rust engine includes tools usually found in scientific software: complex numbers, exact rational arithmetic, a small computer algebra system and numerical methods. The examples on this page use Zlv Desktop.
Exact fractions
With Exact Mathematics Mode on (the default), fractions are kept exact. Add in frac to turn a decimal into a fraction.
Results appear next to each line in Zlv Desktop. Download it free.
Complex numbers
Write the imaginary unit as i directly after a number, as in 4i. Square roots of negative numbers return complex results.
Results appear next to each line in Zlv Desktop. Download it free.
in polar shows the magnitude and angle of a complex number.
Algebra
The algebra functions work with expressions in x.
| Function | What it does |
|---|---|
diff(expr, x) | Derivative with respect to x |
expand(expr) | Multiplies out products |
factor(expr, x) | Factors a polynomial |
solve(equation, x) | Solves an equation written with = |
simplify(expr) | Collects like terms |
Results appear next to each line in Zlv Desktop. Download it free.
Factoring uses the domain chosen in Settings > Calculation > Algebraic factorization domain: rational, real or complex. With the default complex domain, factor(x^2 + 16, x) returns (x - 4i) * (x + 4i).
Numerical methods
Results appear next to each line in Zlv Desktop. Download it free.
integral(expr, a, b)integrates from a to b.root(expr, a, b)finds where the expression is zero between a and b.
The web app's lighter TypeScript engine can also integrate a function you defined: integral(f, 0, 3).
Evaluating…
Curve fitting and interpolation
polyfit(xs, ys, degree) fits a polynomial to data and reports the equation with its R² value. interp(xs, ys, x) reads a value between known points by linear interpolation.
Results appear next to each line in Zlv Desktop. Download it free.
Scientific notation and other number formats
Add in sci to show a result in scientific notation. Number bases such as hex and binary are covered in Programmer math.
Results appear next to each line in Zlv Desktop. Download it free.