about summary refs log tree commit diff stats
path: root/js
diff options
context:
space:
mode:
authorelioat <{ID}+{username}@users.noreply.github.com>2024-06-13 15:58:39 -0400
committerelioat <{ID}+{username}@users.noreply.github.com>2024-06-13 15:58:39 -0400
commit4b1fb59f84a586cab926dec491e75e3174bae541 (patch)
tree84f0743bf8c652d0e7088b3081f83ecfa45e1f1a /js
parent7bc40a35ef259798c9e76b1cf084f5b52b4ec64a (diff)
downloadtour-4b1fb59f84a586cab926dec491e75e3174bae541.tar.gz
*
Diffstat (limited to 'js')
-rw-r--r--js/pi.js14
1 files changed, 14 insertions, 0 deletions
diff --git a/js/pi.js b/js/pi.js
new file mode 100644
index 0000000..b15e62f
--- /dev/null
+++ b/js/pi.js
@@ -0,0 +1,14 @@
+// read in pi, ../10000.pi.txt
+
+const fs = require('fs');
+
+fs.readFile('../10000.pi.txt', 'utf8', (err, data) => {
+  if (err) {
+    console.error(err);
+    return;
+  }
+  const string_pi = data;
+  const big_pi = parseFloat(data);
+  console.log(big_pi);
+});
+