#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1046
Task: Write a Python function that implements Newton's method to find square root of 2 to 15 decimal places
Generated: 2026-02-12T18:08:06.072716
"""

import math

def newton_sqrt_2(iterations=100, precision=1e-15):
    # Initial guess
    guess = 1.0
    for _ in range(iterations):
        guess = (guess + 2 / guess) / 2
        if abs(guess * guess - 2) < precision:
            break
    return guess

if __name__ == '__main__':
    result = newton_sqrt_2()
    print(f"Square root of 2 using Newton's method: {result:.15f}")