From dee0ca5343f31d2fd0480f515a07665c1a6c8951 Mon Sep 17 00:00:00 2001
From: Tim Vaughan <tgvaughan@gmail.com>
Date: Sun, 13 Nov 2016 23:45:11 +1300
Subject: [PATCH] Added some more float words.

---
 src/float.4th  | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++
 src/scheme.4th |  1 +
 2 files changed, 51 insertions(+)

diff --git a/src/float.4th b/src/float.4th
index 74a4f08..bdedd92 100644
--- a/src/float.4th
+++ b/src/float.4th
@@ -29,3 +29,53 @@ CODE f/
     a = reinterpret(Float64, popPS())
     pushPS(reinterpret(Int64, a/b))
 END-CODE
+
+CODE f^
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a^b))
+END-CODE
+
+CODE f>
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a>b))
+END-CODE
+
+CODE f<
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a<b))
+END-CODE
+
+CODE f=
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a=b))
+END-CODE
+
+CODE f<=
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a<=b))
+END-CODE
+
+CODE f>=
+    b = reinterpret(Float64, popPS())
+    a = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, a>=b))
+END-CODE
+
+CODE flog
+    b = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, log(a)))
+END-CODE
+
+CODE fexp
+    b = reinterpret(Float64, popPS())
+    pushPS(reinterpret(Int64, exp(a)))
+END-CODE
+
+CODE i->f
+    pushPS(reinterpret(Int64, Float64(popPS())))
+END-CODE
diff --git a/src/scheme.4th b/src/scheme.4th
index 165d88f..c1d42e8 100644
--- a/src/scheme.4th
+++ b/src/scheme.4th
@@ -24,6 +24,7 @@ variable nexttype
     does> @ ;
 
 make-type fixnum-type
+make-type flonum-type
 make-type boolean-type
 make-type character-type
 make-type string-type
-- 
2.20.1