Square - content

Inputs

  • Side a

Outputs

  • Content

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
Side a: 2
Content: 4
2.
Side a: 3
Content: 9
3.
Side a: 1
Content: 1

Applicable neurons

  • Plus (x + y)
  • Multiple (x × y)

Algorithm

Test

Code made by AI:
/**
 * 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()];
}

/**
 * Square - content: 
 * 
 * @param x1 Side a
 * @return {Array}
 */
function neuron13(x1)
{
  var outputs = [];
  outputs[0] = x1;

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

  return[outputs[1]];
}


Code made by AI:

Create your family tree for free