Objets/Documentation
fusion16.py
Je calcule les profils et les fractions atteintes par les deux calendriers.
Télécharger ↓"""Reproduce the Gaussian boundary example. Standard library, Python 3.9+."""
import json
from fractions import Fraction as F
from itertools import product
from math import comb, erf, exp, expm1, fsum, log1p, prod, sqrt
ORDERS = {"like": "HHLL", "mixed": "LHLH"}
def block(steps):
total = sum(steps, F())
squares = sum((p * p for p in steps), F())
survival = prod((1 - p for p in steps), start=F(1))
return total, squares, survival