From 2889de7f0c2d587a17fbd322af57c29e84238620 Mon Sep 17 00:00:00 2001
From: Hong-Phuc Bui <hong-phuc.bui@htwsaar.de>
Date: Thu, 16 Jan 2025 12:22:14 +0100
Subject: [PATCH] update parcel
---
textbased-programms/newton-method-sqrt.js | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/textbased-programms/newton-method-sqrt.js b/textbased-programms/newton-method-sqrt.js
index 83f6a9a..e9c8eaf 100644
--- a/textbased-programms/newton-method-sqrt.js
+++ b/textbased-programms/newton-method-sqrt.js
@@ -6,11 +6,11 @@
import {terminal} from "./dfhi.js";
window.main = function(...argv) {
- let testData = [0, 1.25, 3.758, 4.229, 6.735, 123456.789, (1<<30) + 1];
- for(let c of testData) {
- let cquad = c*c;
- let csqrt = sqrt(cquad);
- let msqrt = Math.sqrt(cquad);
+ 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;
+ const csqrt = sqrt(cquad);
+ const msqrt = Math.sqrt(cquad);
terminal.printl({"quadrat": cquad, "sqrt":csqrt, "Math.sqrt":msqrt, "expected": c})
}
};
--
Gitblit v1.10.0