lights FAQ Forum github.com/luapower/eq
This package
eq

Math
amoeba
eq
ldecnumber

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: 7 years ago | Edit on GitHub

Package:eq
Pkg type:Lua
Version: 9a9e491
Last commit:
Author: Cosmin Apreutesei
License: Public Domain

Requires: none

Required by: path2d 


Top