This is a note for the book Population Genetics: A Concise Guide (Second Edition).
Page 28
Problem 2.5 Graph simultaneously both Formula 2.4 and Formula 2.5 as a function of N for N from 1 to 100. Is the approximation to your liking?
Formula 2.4
Formula 2.5
Code:
import numpy as np
from matplotlib import pyplot as plt
import math
def f(t):
return (-math.log(2))/(math.log(1-1/(2*t)))
def g(t):
return 2*t*math.log(2)
fig = plt.figure(figsize=(24, 12))
f2 = np.vectorize(f)
plt.plot(t, f2(t) , color='red')
plt.plot(t, g(t) , color='green')
plt.xlabel('population size')
plt.ylabel('t1/2')
plt.show()
Output:

So we can trust that Formula 2.5 can be seen as an approximation of Formula 2.4.