Sine (sinus) - degrees

Inputs

  • angle in degrees

Outputs

  • sine

Neuron type

Best algorithm has been found - locked

Patterns

Pattern Input Output
1.
angle in degrees: 0
sine: 0
2.
angle in degrees: 90
sine: 1
3.
angle in degrees: 270
sine: -1

Applicable neurons

  • Sine (sinus) - radians
  • Radians into degrees
  • Degrees into radians
  • Rectangle - circuit
  • a < b
  • (a, b]
  • convert minutes and seconds into MM:SS
  • character a
  • Validate integer

Algorithm

Test

Code made by AI:
/**
 * Pi (π) - 3.141592653589793: 
 *
 * @return {Array}
 */
function neuron560()
{
math.config({number: 'BigNumber', precision: 64}); return[math.PI]; /* return [3.141592653589793] */
}

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

/**
 * 8: 
 *
 * @return {Array}
 */
function neuron508()
{
return [8];
}

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

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

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

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

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

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

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

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

  return[outputs[4]];
}


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

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

/**
 * Degrees into radians: 
 * 
 * @param x1 Degrees
 * @return {Array}
 */
function neuron605(x1)
{
  var outputs = [];
  outputs[0] = x1;

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

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

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

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

  return[outputs[4]];
}


/**
 * Sine (sinus) - radians: The word comes from the Latin sinus for gulf or bay, since, given a unit circle, it is the side of the triangle on which the angle opens.
 *
 * @param x1 angle in radians
 * @return {Array}
 */
function neuron555(x1)
{
return[Math.sin(Number(x1))];
}

/**
 * Sine (sinus) - degrees: 
 * 
 * @param x1 angle in degrees
 * @return {Array}
 */
function neuron593(x1)
{
  var outputs = [];
  outputs[0] = x1;

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

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

  return[outputs[2]];
}


Code made by AI:

Rodokmen - poznejte své předky | TOPlist U.I., Umělá inteligence