// Fibonacci
const fib = n => n <= 1 ? n : fib(n-1) + fib(n-2);
// Euler's formula: e^(i*pi) + 1 = 0
const euler = () => Math.cos(Math.PI) + Math.sin(Math.PI) * 1i + 1;
import numpy as np
def dot_product(v1, v2):
return np.dot(v1, v2)
def cross_product(v1, v2):
return np.cross(v1, v2)
def mat_mul(m1, m2):
return np.matmul(m1, m2)