From 0079221776106e3ca91076938e80d37e38eacc29 Mon Sep 17 00:00:00 2001
From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de>
Date: Fri, 17 Oct 2025 07:01:14 +0200
Subject: [PATCH] 1. Vorlesung

---
 textbased-programms/newton-method-sqrt.js |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/textbased-programms/newton-method-sqrt.js b/textbased-programms/newton-method-sqrt.js
index e9c8eaf..da7d931 100644
--- a/textbased-programms/newton-method-sqrt.js
+++ b/textbased-programms/newton-method-sqrt.js
@@ -5,7 +5,7 @@
 
 import {terminal} from "./dfhi.js";
 
-window.main = function(...argv) {
+window.main = (...argv) => {
 	const testData = [0, 1.25, 3.758, 4.229, 6.735, 123456.789, (1<<30) + 1];
 	for(const c of testData) {
 		const cquad = c*c;
@@ -15,7 +15,7 @@
 	}
 };
 
-function sqrt(c) {
+const sqrt = (c) => {
 	const EPSILON = 1E-16;
 	let xn = c;
 	let q = c/xn; // auxiliary variable to avoid multiple division c/xn

--
Gitblit v1.10.0