# discriminant b² - 4ac

• a
• b
• c

• b² - 4ac

## Neuron type

Best algorithm has been found - locked

## Patterns

Pattern Input Output
1.
 a: 3 b: 5 c: 2
 b² - 4ac: 1
2.
 a: 1 b: 2 c: 3
 b² - 4ac: -8
3.
 a: 2 b: 4 c: 6
 b² - 4ac: -32

## Applicable neurons

• Minus (x - y)
• Multiple (x × y)
• 4
• NAND
• Destroyed building (calculation, windows, walls)
• character )
• character ≥
• >, < opposite
• character z
• empty string
• character m
• character y
• character k
• 24

## Algorithm

### Test

```/**
* Multiple (x × y):
*
* @param x1 Number X
* @param x2 Number Y
* @return {Array}
*/
function neuron3(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '*'+Number(x2)).toString()];
}

/**
* 4:
*
* @return {Array}
*/
function neuron504()
{
return [4];
}

/**
* Minus (x - y):
*
* @param x1 Number X
* @param x2 Number Y
* @return {Array}
*/
function neuron2(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '-'+Number(x2)).toString()];
}

/**
* discriminant b² - 4ac:
*
* @param x1 a
* @param x2 b
* @param x3 c
* @return {Array}
*/
function neuron602(x1, x2, x3)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;
outputs[2] = x3;

arr = neuron3(outputs[1], outputs[1]);
outputs[3] = arr[0];

arr = neuron3(outputs[0], outputs[2]);
outputs[4] = arr[0];

arr = neuron504();
outputs[5] = arr[0];

arr = neuron504();
outputs[6] = arr[0];

arr = neuron3(outputs[4], outputs[6]);
outputs[7] = arr[0];

arr = neuron2(outputs[3], outputs[7]);
outputs[8] = arr[0];

return[outputs[8]];
}

```