Skip to content

Instantly share code, notes, and snippets.

View RedGl0w's full-sized avatar
💻

Joachim LF RedGl0w

💻
View GitHub Profile
@RedGl0w
RedGl0w / Q_rsqrt.py
Created June 9, 2022 13:05
Grand oral
import matplotlib.pyplot as plt
import math
import struct
import statistics
def float_to_bin(num): return struct.unpack('!I', struct.pack('!f', num))[0]
def bin_to_float(num): return struct.unpack('!f', struct.pack('!I', num))[0]
def Q_rsqrt(number,interation):
x2 = number * 0.5
@RedGl0w
RedGl0w / Lentille.cpp
Created October 1, 2020 09:50
Physique chimie
#include <iostream>
class lentille{
public:
float gamma() { return m_oaprime / m_oa; }
private:
float calculateOAPrime() { return 1/((1/m_fprime) + (1/m_oa)); }
float calculateABPrime() { return gamma() * m_ab;}
public:
lentille(float fprime, float oa, float ab)
@RedGl0w
RedGl0w / main.py
Last active September 12, 2020 08:03
pgcd
from kandinsky import *
size = 10
def pgcd(a,b) :
while a%b != 0 :
a, b = b, a%b
return b
def fill(x,y):
@RedGl0w
RedGl0w / Make flags list.md
Last active November 3, 2023 19:28
Some numworks' epsilon things

Some flags aren't described here, because they're not used at all (ex : QUIZ_USE_CONSOLE and POINCARE_TESTS_PRINT_EXPRESSIONS).

Flag Description
PLATFORM The plat