aboutsummaryrefslogtreecommitdiffhomepage
path: root/std/Math/Complex.bruijn
diff options
context:
space:
mode:
authorMarvin Borner2024-04-24 01:13:49 +0200
committerMarvin Borner2024-04-24 01:13:49 +0200
commitc8245b83c88dfb551556d2029d435bf5eb00d71b (patch)
tree1d3482664e893a6a18af30f4eedcf02a117246f9 /std/Math/Complex.bruijn
parentbfdd0ef6897e42e03cefa4d43c8757ef09d96de2 (diff)
More tests
Diffstat (limited to 'std/Math/Complex.bruijn')
-rw-r--r--std/Math/Complex.bruijn6
1 files changed, 6 insertions, 0 deletions
diff --git a/std/Math/Complex.bruijn b/std/Math/Complex.bruijn
index ec83462..a20717f 100644
--- a/std/Math/Complex.bruijn
+++ b/std/Math/Complex.bruijn
@@ -7,6 +7,12 @@
ι (+0.0r) : (+1.0r)
+# returns true of two complex numbers are equal approximately
+approx-eq? [[[R.approx-eq? 2 (1 2) (0 2)]]] ⧗ Number → Complex → Complex → Boolean
+
+# TODO: bigger value (higher performance first!)
+…≈?… approx-eq? (+1000)
+
# adds two complex numbers
add &[[&[[(R.add 3 1) : (R.add 2 0)]]]] ⧗ Complex → Complex → Complex