<jupyter_start><jupyter_text>Xを区間型とする。  $X = [1,2]$  $f(X) = X^2  - 2 = 0$をnewton法で解く  $f'(X) = 2X$<jupyter_code>for i in range(0,5):
    xs = X.mid()
    Xnew = xs - (xs**2 - 2) / (2 * X)
    X = Xnew
X<jupyter_output><empty_output><jupyter_text>フォーマット整えると<jupyter_code>Xsup = format(X.sup,'.64f')
Xinf = format(X.inf,'.64f')
print(str(Xsup) + "\n" + str(Xinf))<jupyter_output>1.4142135623730951454746218587388284504413604736328125000000000000
1.4142135623730949234300169337075203657150268554687500000000000000
{'fraction_non_alphanumeric': 0.16829745596868884, 'fraction_numerical': 0.2837573385518591, 'mean_word_length': 5.918918918918919, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '463412', 'license': 'MIT', 'n_tokens_mistral': 351, 'n_tokens_neox': 262, 'n_words': 30, 'path': '2016-02-03/rumpssqrt.ipynb', 'repo_name': 'o108minmin/blogcodes', 'size': '511'}