Commit 6c58a89d4fea545819904524c92746473bda04e7

Thomas de Grivel 2024-03-04T20:27:09

tag_sqrt

diff --git a/.ic3_history b/.ic3_history
index 56c52c6..8a760a8 100644
--- a/.ic3_history
+++ b/.ic3_history
@@ -1,10 +1,3 @@
-m = macro (name) { quote "Hello, " + (unquote name) + " !" }
-m("Patrice")
-variable = "Patrice"
-m(variable)
-quote "Hello, " + (unquote name) + " !"
-name = quote n; quote "Hello, " + (unquote name) + " !"
-name = quote n ; quote "Hello, " + (unquote name) + " !"
 name = quote n
 quote "Hello, " + (unquote name) + " !"
 m = macro (name) { quote "Hello, " + (unquote name) + " !" }
@@ -97,3 +90,10 @@ end
 2/3 * 2/6
 2/3 * 5/6
 2/3 / 5/6
+sqrt(42)
+sqrt(41)
+sqrt(8)
+sqrt(4)
+sqrt(9)
+sqrt(16)
+sqrt(-1)
diff --git a/lib/c3/0.1/c3.facts b/lib/c3/0.1/c3.facts
index 1e2320a..ec7ca76 100644
--- a/lib/c3/0.1/c3.facts
+++ b/lib/c3/0.1/c3.facts
@@ -203,3 +203,5 @@ add {C3, :symbol, C3.if_then_else}
 replace {C3.if_then_else, :arity, 3}
 replace {C3.if_then_else, :is_a, :special_operator}
 replace {C3.if_then_else, :cfn, cfn Tag "c3_if_then_else" (Tag, Tag, Tag, Result)}
+add {C3, :symbol, C3.sqrt}
+replace {C3.sqrt, :cfn, cfn Tag "tag_sqrt" (Tag, Result)}