Permalink
Browse files

Fix auto promotion, and test it.

  • Loading branch information...
mythmon committed Mar 12, 2012
1 parent 85a139d commit cc1f52252ff059268364369a12c6e5f9bebd23f0
@@ -0,0 +1 @@
+4.
@@ -0,0 +1 @@
+(println (+ 2 2.0))
View
@@ -106,7 +106,7 @@ def auto_promote(*args)
for arg in args
if arg.tag == :int
- new_args << OutputToken.new(:real, "#{to_gforth arg} d>f")
+ new_args << OutputToken.new(:real, "#{to_gforth arg} 0 d>f")
else
new_args << arg
end
@@ -155,7 +155,7 @@ def ibtl_eq(arg0, arg1)
def ibtl_exp(arg0)
arg0 = to_gforth arg0
- OutputToken.new(:real, "#{arg0} fexp")
+ OutputToken.new(:int, "#{arg0} fexp")
end
def ibtl_fcos(arg)

0 comments on commit cc1f522

Please sign in to comment.