z_seuil.py

Created by cent20

Created on April 27, 2022

213 Bytes

un calcul de seuil


# https://tiplanet.org/forum/viewtopic.php?f=49&t=25137&p=263026#p263026

def seuil(d):
  n = 0
  u = 2.
  d = d**2
  while (u-1)**2 >= d:
    u = 1 + 1/((1-u) * (n+1))
    n = n + 1
  return [n, u]