ChatGPT で調べながら 3 の平方根を求めるプログラムを decimal モジュールを使うように書き直しました。 import decimal # Decimalコンテキストの設定 decimal.getcontext().prec = 21 # 精度を21桁に設定 def UnfoldL(next, init): src = init while True: dd, src = next(src) yield dd def take_generator(count, seq): for e in range(count): yield next(seq) def take(count,…