======== #1 math.abs() ========

math.abs(0) .. 0
math.abs(3) .. 3
math.abs(-3) .. 3
math.abs(4j) .. 4
math.abs(4j) .. 4
math.abs(3 + 4j) .. 5
math.abs(3 - 4j) .. 5
math.abs(array { 0, 3, -3 }) .. {0, 3, 3}

======== #2 math.acos() ========

math.acos(0) .. 1.5708
math.acos(1) .. 0
math.acos(-1) .. 3.14159
math.acos(0):deg .. 90
math.acos(1):deg .. 0
math.acos(-1):deg .. 180
math.acos(array { 0, 1, -1 }) .. { 1.5708,       0, 3.14159}

======== #3 math.arg() ========

math.arg(0) .. 0
math.arg(3) .. 0
math.arg(-3) .. 0
math.arg(4j) .. 1.5708
math.arg(-4j) .. -1.5708
math.arg(1 + 1j) .. 0.785398
math.arg(1 - 1j) .. -0.785398
math.arg(0):deg .. 0
math.arg(3):deg .. 0
math.arg(-3):deg .. 0
math.arg(4j):deg .. 90
math.arg(-4j):deg .. -90
math.arg(1 + 1j):deg .. 45
math.arg(1 - 1j):deg .. -45
math.arg(array { 0, 3, -3 }) .. {0, 0, 0}

======== #4 math.asin() ========

math.asin(0) .. 0
math.asin(1) .. 1.5708
math.asin(-1) .. -1.5708
math.asin(0):deg .. 0
math.asin(1):deg .. 90
math.asin(-1):deg .. -90
math.asin(array { 0, 1, -1 }) .. {      0,  1.5708, -1.5708}

======== #5 math.atan() ========

math.atan(0) .. 0
math.atan(1) .. 0.785398
math.atan(-1) .. -0.785398
math.atan(0):deg .. 0
math.atan(1):deg .. 45
math.atan(-1):deg .. -45
math.atan(array { 0, 1, -1 }) .. {        0,  0.785398, -0.785398}

======== #6 math.atan2() ========

math.atan2(1, 0) .. 1.5708
math.atan2(0, 1) .. 0
math.atan2(1, 1) .. 0.785398
math.atan2(-1, 1) .. -0.785398
math.atan2(1, 0):deg .. 90
math.atan2(0, 1):deg .. 0
math.atan2(1, 1):deg .. 45
math.atan2(-1, 1):deg .. -45

======== #7 math.ceil() ========

math.ceil(0) .. 0
math.ceil(.1) .. 1
math.ceil(.9) .. 1
math.ceil(1) .. 1
math.ceil(1.5) .. 2
math.ceil(3.5) .. 4
math.ceil(-.1) .. 0
math.ceil(-.9) .. 0
math.ceil(-1) .. -1
math.ceil(-1.5) .. -1
math.ceil(-3.5) .. -3
math.ceil(array { 0, .1, .9, 1, 1.5, 3.5, -.1, -.9, -1, -1.5, -3.5 }) .. { 0,  1,  1,  1,  2,  4, -0, -0, -1, -1, -3}

======== #8 math.conj() ========

math.conj(0) .. 0
math.conj(3) .. 3
math.conj(4j) .. -4j
math.conj(-4j) .. 4j
math.conj(3 + 4j) .. 3-4j
math.conj(3 - 4j) .. 3+4j
math.conj(array { 0, 3 }) .. {0, 3}

======== #9 math.cos() ========

math.cos(0) .. 1
math.cos(math.pi / 2) .. 6.12323e-17
math.cos(math.pi) .. -1
math.cos(0):deg .. 1
math.cos(90):deg .. 6.12323e-17
math.cos(180):deg .. -1
math.cos(array { 0, math.pi / 2, math.pi }) .. {          1, 6.12323e-17,          -1}

======== #10 math.cosh() ========

math.cosh(0) .. 1
math.cosh(1) .. 1.54308
(math.exp(1) + math.exp(-1)) / 2 .. 1.54308
math.cosh(array { 0, 1 }) .. {      1, 1.54308}

======== #11 math.cross() ========

math.cross([1, 2], [2, 3]) .. -1
math.cross([1, 2, 3], [2, 3, 4]) .. [-1, 2, -1]
math.cross([1, 2, 3], [2, 3]) .. ValueError: different length of lists
math.cross([1, 2, 3, 2], [2, 3, 4, 5]) .. ValueError: only support two or three dimension vector for cross product

======== #12 math.delta() ========

math.delta(-2) .. 0
math.delta(-1) .. 0
math.delta(0) .. 1
math.delta(1) .. 0
math.delta(2) .. 0
math.delta(array { -2, -1, 0, 1, 2 }) .. {0, 0, 1, 0, 0}

======== #13 math.dot() ========

math.dot([1, 2], [2, 3]) .. 8
math.dot([1, 2, 3], [2, 3, 4]) .. 20
math.dot([1, 2, 3], [2, 3]) .. ValueError: different length of lists
math.dot([1, 2, 3, 2], [2, 3, 4, 5]) .. 30

======== #14 math.exp() ========

math.exp(0) .. 1
math.exp(1) .. 2.71828
math.exp(-1) .. 0.367879
math.exp(math.pi * 1j) .. -1+1.22465e-16j
math.exp(array { 0, 1, -1 }) .. {       1,  2.71828, 0.367879}

======== #15 math.floor() ========

math.floor(0) .. 0
math.floor(.1) .. 0
math.floor(.9) .. 0
math.floor(1) .. 1
math.floor(1.5) .. 1
math.floor(3.5) .. 3
math.floor(-.1) .. -1
math.floor(-.9) .. -1
math.floor(-1) .. -1
math.floor(-1.5) .. -2
math.floor(-3.5) .. -4
math.floor(3.1 + 2.3j) .. 3+2j
math.floor(array { 0, .1, .9, 1, 1.5, 3.5, -.1, -.9, -1, -1.5, -3.5 }) .. { 0,  0,  0,  1,  1,  3, -1, -1, -1, -2, -4}

======== #16 math.hypot() ========

math.hypot(0, 0) .. 0
math.hypot(3, 4) .. 5
math.hypot(-3, -4) .. 5

======== #17 math.imag() ========

math.imag(0) .. 0
math.imag(3) .. 0
math.imag(4j) .. 4
math.imag(3 + 4j) .. 4
math.imag(array { 0, 3 }) .. {0, 0}

======== #18 math.log() ========

math.log(1) .. 0
math.log(3) .. 1.09861
math.log(math.e) .. 1
math.log(2 + 3j) .. 1.28247+0.982794j
math.log(-3) .. 1.09861+3.14159j
math.log(0) .. MathError: can't calculate a logarithm of zero
math.log(array { 1, 3, math.e }) .. {      0, 1.09861,       1}
math.log(array { 1, 3, 0, math.e }) .. MathError: the array contains zero as its element

======== #19 math.log10() ========

math.log10(1) .. 0
math.log10(3) .. 0.477121
math.log10(10) .. 1
math.log10(2 + 3j) .. 0.556972+0.426822j
math.log10(-3) .. 0.477121+1.36438j
math.log10(0) .. MathError: can't calculate a logarithm of zero
math.log10(array { 1, 3, 10 }) .. {       0, 0.477121,        1}
math.log10(array { 1, 3, 0, 10 }) .. MathError: the array contains zero as its element

======== #20 math.norm() ========

math.norm(0) .. 0
math.norm(3) .. 9
math.norm(4j) .. 16
math.norm(3 + 4j) .. 25
math.norm(array { 0, 3 }) .. {0, 9}

======== #21 math.ramp() ========

math.ramp(-2) .. 0
math.ramp(-1) .. 0
math.ramp(0) .. 0
math.ramp(1) .. 1
math.ramp(2) .. 2
math.ramp(array { -2, -1, 0, 1, 2 }) .. {0, 0, 0, 1, 2}

======== #22 math.real() ========

math.real(0) .. 0
math.real(3) .. 3
math.real(4j) .. 0
math.real(3 + 4j) .. 3
math.real(array { 0, 3 }) .. {0, 3}

======== #23 math.sigmoid() ========

math.sigmoid(0) .. 0.5
math.sigmoid(1) .. 0.731059
math.sigmoid(-1) .. 0.268941
math.sigmoid(array { 0, 1, -1 }) .. {     0.5, 0.731059, 0.268941}

======== #24 math.sin() ========

math.sin(0) .. 0
math.sin(math.pi / 2) .. 1
math.sin(math.pi) .. 1.22465e-16
math.sin(0):deg .. 0
math.sin(90):deg .. 1
math.sin(180):deg .. 1.22465e-16
math.sin(array { 0, math.pi / 2, math.pi }) .. {          0,           1, 1.22465e-16}

======== #25 math.sinh() ========

math.sinh(0) .. 0
math.sinh(1) .. 1.1752
(math.exp(1) - math.exp(-1)) / 2 .. 1.1752
math.sinh(array { 0, 1 }) .. {     0, 1.1752}

======== #26 math.sqrt() ========

math.sqrt(0) .. 0
math.sqrt(1) .. 1
math.sqrt(2) .. 1.41421
math.sqrt(3) .. 1.73205
math.sqrt(-1) .. 1j
math.sqrt(-2) .. 1.41421j
math.sqrt(-3) .. 1.73205j
math.sqrt(2j) .. 1+1j
math.sqrt(3j) .. 1.22474+1.22474j
math.sqrt(array { 0, 1, 2, 3 }) .. {      0,       1, 1.41421, 1.73205}

======== #27 math.tan() ========

math.tan(0) .. 0
math.tan(math.pi / 4) .. 1
math.tan(math.pi / 2) .. 1.63312e+16
math.tan(math.pi) .. -1.22465e-16
math.tan(0):deg .. 0
math.tan(45):deg .. 1
math.tan(90):deg .. 1.63312e+16
math.tan(180):deg .. -1.22465e-16
math.tan(array { 0, math.pi / 4, math.pi / 2, math.pi }) .. {           0,            1,  1.63312e+16, -1.22465e-16}

======== #28 math.tanh() ========

math.tanh(0) .. 0
math.tanh(1) .. 0.761594
(math.exp(1) - math.exp(-1)) / (math.exp(1) + math.exp(-1)) .. 0.761594
math.tanh(array { 0, 1 }) .. {       0, 0.761594}

======== #29 math.unitstep() ========

math.unitstep(-2) .. 0
math.unitstep(-1) .. 0
math.unitstep(0) .. 1
math.unitstep(1) .. 1
math.unitstep(2) .. 1
math.unitstep(array { -2, -1, 0, 1, 2 }) .. {0, 0, 1, 1, 1}

======== #30 ========

rational(260, 364).reduce() .. 5/7r

======== #31 ========

math.hypot(3, 4) .. 5

======== #32 ========

6   3   .. GCD:3   LCM:6  
3   6   .. GCD:3   LCM:6  
2   3   .. GCD:1   LCM:6  
4   6   .. GCD:2   LCM:12 
9   6   .. GCD:3   LCM:18 
16  40  .. GCD:8   LCM:80 
24  18  .. GCD:6   LCM:72 
48  72  .. GCD:24  LCM:144
924 360 .. GCD:12  LCM:27720
255  459  1122 .. GCD:51  LCM:50490
255  1122 459  .. GCD:51  LCM:50490
459  255  1122 .. GCD:51  LCM:50490
459  1122 255  .. GCD:51  LCM:50490
1122 255  459  .. GCD:51  LCM:50490
1122 459  255  .. GCD:51  LCM:50490
84   36   60   .. GCD:12  LCM:1260
84   60   36   .. GCD:12  LCM:1260
36   84   60   .. GCD:12  LCM:1260
36   60   84   .. GCD:12  LCM:1260
60   84   36   .. GCD:12  LCM:1260
60   36   84   .. GCD:12  LCM:1260

======== #33 ========

math.cross([1, 2], [3, 1]) .. -5
math.cross([3, 1], [1, 2]) .. 5
math.cross([1, 2, 3], [-1, 1, 2]) .. [1, -5, 3]
math.cross([-1, 1, 2], [1, 2, 3]) .. [-1, 5, -3]
math.cross([-1, -3], [2, 2, 3]) .. ValueError: different length of lists
math.cross([-1, -3, 2, 1], [2, 2, 3, 1]) .. ValueError: only support two or three dimension vector for cross product
math.dot([-1, -3], [2, 2]) .. -8
math.dot([-1, -3, 3], [2, 2, -1]) .. -11
math.dot([-1, -3], [2, 2, 3]) .. ValueError: different length of lists

======== #34 ========

f2_x(t:number):map = { a + b * t + c * t * t + d * t * t * t }
f2_y(t:number):map = { a + b * t + c * t * t + d * t * t * t }
         f_x,        f1_x,        f2_x,          f_y,        f1_y,        f2_y
    6.000000,    6.000000,    6.000000,    12.000000,   12.000000,   12.000000
    7.401920,    7.401920,    7.401920,     9.692730,    9.692730,    9.692730
    8.919067,    8.919067,    8.919067,     8.060357,    8.060357,    8.060357
   10.518519,   10.518519,   10.518519,     7.037037,    7.037037,    7.037037
   12.167353,   12.167353,   12.167353,     6.556927,    6.556927,    6.556927
   13.832647,   13.832647,   13.832647,     6.554184,    6.554184,    6.554184
   15.481481,   15.481481,   15.481481,     6.962963,    6.962963,    6.962963
   17.080933,   17.080933,   17.080933,     7.717421,    7.717421,    7.717421
   18.598080,   18.598080,   18.598080,     8.751715,    8.751715,    8.751715
   20.000000,   20.000000,   20.000000,    10.000000,   10.000000,   10.000000

======== #35 ========

f(x:number):map = 3.55 + 0.35 * x
g(temp:number):map = 2.94286 + 0.707143 * temp + (-0.0357143) * temp ** 2
h(hoge:number):map = (-0.619643) + 4.54464 * hoge + (-0.973214) * hoge ** 2 + 0.0625 * hoge ** 3

======== #36 ========

f(x:number):map = 1.00714 + 5.10714 * x

======== #37 ramp, unitstep and delta ========

math.ramp([(-5) .. 5]) .. [0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 5]
math.unitstep([(-5) .. 5]) .. [0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1]
math.delta([(-5) .. 5]) .. [0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0]

======== #38 random ========

rand() .. 0.030581
rand(100) .. 3
rand@normal() .. 2.57046
rand@normal(50, 30) .. 127.114
rands(num => 10):list .. [0.030581, 0.21314, 0.299003, 0.381139, 0.863488, 0.133443, 0.0734653, 0.924736, 0.642876, 0.135658]
rands(100, num => 10):list .. [3, 21, 29, 38, 86, 13, 7, 92, 64, 13]
rands@normal(num => 10):list .. [2.57046, 1.05559, 0.402888, -1.04081, 0.707671, -0.985925, 0.944053, 0.0503091, 0.556569, -0.0726323]
rands@normal(50, 30, num => 10):list .. [127.114, 81.6676, 62.0866, 18.7756, 71.2301, 20.4222, 78.3216, 51.5093, 66.6971, 47.821]
sigma = 3, number of samples = 300
 -7:***
 -6:*
 -5:**
 -4:*************
 -3:***************************
 -2:********************************
 -1:**************************************
  0:*****************************************************************
  1:************************************
  2:****************************************
  3:********************
  4:****************
  5:**
  6:*
  7:**
  8:*
  9:*
sigma = 5, number of samples = 300
-13:*
-12:**
-11:
-10:*
 -9:
 -8:****
 -7:********
 -6:***************
 -5:***************
 -4:*****************
 -3:****************************
 -2:******************
 -1:************************
  0:**************************************
  1:*****************
  2:*******************
  3:********************************
  4:******************
  5:*****************
  6:*********
  7:********
  8:****
  9:
 10:
 11:*
 12:**
 13:*
 14:
 15:
 16:*
sigma = 7, number of samples = 300
-18:*
-17:**
-16:
-15:*
-14:
-13:
-12:
-11:******
-10:*****
 -9:**********
 -8:*************
 -7:********
 -6:*********
 -5:******************
 -4:*******************
 -3:*********
 -2:*********************
 -1:***************
  0:******************************
  1:************
  2:**************
  3:************
  4:*********************
  5:*******************
  6:************
  7:**********
  8:*********
  9:********
 10:******
 11:****
 12:*
 13:
 14:
 15:*
 16:*
 17:*
 18:*
 19:
 20:
 21:
 22:
 23:*
