# Price with VAT

## Inputs

• Price without VAT
• VAT

## Outputs

• Price with VAT

## Neuron type

Best algorithm has been found - locked

## Patterns

Pattern Input Output
1.
 Price without VAT: 100 VAT: 20
 Price with VAT: 120
2.
 Price without VAT: 200 VAT: 50
 Price with VAT: 300
3.
 Price without VAT: 10 VAT: 19
 Price with VAT: 11.9

## Applicable neurons

• Plus (x + y)
• Multiple (x × y)
• Percentage (X% / 100)
• 3 digits of ascii code into character
• character h
• Distance between two points (3d)
• IF a=b THEN c ELSE d
• minutes into seconds
• before decimal point
• get seconds from time (hh:mm:ss)

## Algorithm

### Test

```/**
* 1:
*
* @return {Array}
*/
function neuron501()
{
return [1];
}

/**
* 0:
*
* @return {Array}
*/
function neuron500()
{
return [0];
}

/**
* Connect - two inputs:
*
* @param x1 Variable A
* @param x2 Variable B
* @return {Array}
*/
function neuron520(x1, x2)
{
return [x1.toString()+x2.toString()];
}

/**
* 100:
*
* @return {Array}
*/
function neuron537()
{
var outputs = [];

arr = neuron501();
outputs[0] = arr[0];

arr = neuron500();
outputs[1] = arr[0];

arr = neuron520(outputs[1], outputs[1]);
outputs[2] = arr[0];

arr = neuron520(outputs[0], outputs[2]);
outputs[3] = arr[0];

return[outputs[3]];
}

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

/**
* Percentage (X% / 100):
*
* @param x1 Number in percentage
* @return {Array}
*/
function neuron536(x1)
{
var outputs = [];
outputs[0] = x1;

arr = neuron537();
outputs[1] = arr[0];

arr = neuron17(outputs[0], outputs[1]);
outputs[2] = arr[0];

return[outputs[2]];
}

/**
* 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()];
}

/**
* Plus (x + y): The addition of two whole numbers is the total amount of those quantities combined.
*
* @param x1 first number
* @param x2 second number
* @return {Array}
*/
function neuron1(x1, x2)
{
math.config({number: 'BigNumber', precision: 64}); return [math.eval(Number(x1) + '+'+Number(x2)).toString()];
}

/**
* Price with VAT:
*
* @param x1 Price without VAT
* @param x2 VAT
* @return {Array}
*/
function neuron653(x1, x2)
{
var outputs = [];
outputs[0] = x1;
outputs[1] = x2;

arr = neuron536(outputs[1]);
outputs[2] = arr[0];

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

arr = neuron1(outputs[3], outputs[0]);
outputs[4] = arr[0];

return[outputs[4]];
}

```