lights FAQ Forum   github.com/luapower/eq
eq

Math
eq

eq

3rd degree equation solver


local eq = require'eq'

eq.solve2(a, b, c[, epsilon]) -> [s1[, s2]]

Solve the 2nd degree equation ax2 + bx + c and return all the real solutions.

Epsilon controls the precision at which the solver converges on close enough solutions.

eq.solve3(a, b, c, d[, epsilon]) -> [s1[, s2[, s3]]]

Solve the 3rd degree equation ax3 + bx2 + cx + d and return all the real solutions.

Epsilon controls the precision at which the solver converges on close enough solutions.


Last updated: 18 months ago | Edit on GitHub

Pkg type:Lua
Version: r1-10-g7b0ae0d
Last commit:
License: PD
Requires: none
Required by: path2d  sg  winapi 

Top