constant x.x

Description

Connect two numbers to number with a decimal point

Inputs

  • Number before the decimal point
  • Number after the decimal point

Outputs

  • Connected number with a decimal point

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
Number before the decimal point: 3
Number after the decimal point: 14
Connected number with a decimal point: 3.14
2.
Number before the decimal point: 2
Number after the decimal point: 3
Connected number with a decimal point: 2.3

Applicable neurons

  • character .
  • Connect - two inputs

Algorithm

Test

Code made by AI:
/**
 * character .: 
 *
 * @return {Array}
 */
function neuron510()
{
return['.'];
}

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

/**
 * constant x.x: Connect two numbers to number with a decimal point
 * 
 * @param x1 Number before the decimal point
 * @param x2 Number after the decimal point
 * @return {Array}
 */
function neuron539(x1, x2)
{
  var outputs = [];
  outputs[0] = x1;
  outputs[1] = x2;

  arr = neuron510();
  outputs[2] = arr[0];

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

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

  return[outputs[4]];
}


Code made by AI:

Create your family tree for free