<commit_before><commit_msg>SICP exercise 1.7<commit_after>(define (square x) (* x x))

(define (average x y)
  (/ (+ x y) 2))

(define (abs x)
  (if (< x 0)
	(- x)
	x))

(define (sqrt x)
  (define (improve guess)
	(average guess (/ x guess)))

  (define (good-enough? guess previous-guess)
	(< (abs (- guess previous-guess)) .001))

  (define (sqrt-iter guess previous-guess)
	(if (good-enough? guess previous-guess)
	  guess
	  (sqrt-iter (improve guess) guess)))

  (sqrt-iter 1.0 0))
{'fraction_non_alphanumeric': 0.18106995884773663, 'fraction_numerical': 0.0205761316872428, 'mean_word_length': 3.467889908256881, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4083457', 'n_tokens_mistral': 208, 'n_tokens_neox': 184, 'n_words': 56}