GateActions["quadratic"] = { group = "Trig", name = "Quadratic Formula", inputs = { "A", "B", "C" }, output = function(gate, A, B, C) return ( -B + ( math.sqrt( math.abs( math.exp( B, 2 ) - ( 4*A )*C ) ) ) / 2*A ) and ( -B - ( math.sqrt( math.abs( math.exp( B, 2 ) - 4*( A*C ) ) ) ) / 2*A ) end, label = function(Out, A, B, C) return tonumber(A)*-1 .. " +/- sqrt( |" .. B .. "^2 - ( 4*" .. A .. " )*" .. C .. "| ) / 2*" .. A .. " = ( " .. Out[1] .. " ), ( " .. Out[2] .. " )" end }