Skip to content

Instantly share code, notes, and snippets.

View AppleVegas's full-sized avatar
🏌️
ikr

AppleVegas

🏌️
ikr
View GitHub Profile
@AppleVegas
AppleVegas / poly_galois_div_mod.py
Last active November 28, 2024 15:30
Divide polynomials in pre-defined GF(16), output remainder and result
A = [1, 2, 4, 8, 3, 6, 12, 11, 5, 10, 7, 14, 15, 13, 9]
LOG_A = [None] * 16
for i in range(0, len(A)):
LOG_A[A[i]] = i
#print(LOG_A[A[9]^A[9]^A[7]^A[6]])
#quit()
import numpy as np
import matplotlib.pyplot as plt
import random
from scipy.optimize import fmin
idealspeed = 3*(10**8) # meters в секунду
sigma = 10 * 10**-9 # +- 10 nanoseconds
class vec2:
def __init__(self, x: float, y: float) -> None: