           when 0 then b
           else 
             # Number must not be integers (bitwise op converts operand to integer)
-            "#{if (a | 0) == a then (a + '.0') else a} + #{b}"
+            "#{glsl.floatLit a} + #{b}"
       else if typeof b == 'number'
         glsl.add b, a
       else 

          when 0 then 0
          else 
            # Number must not be integers (bitwise op converts operand to integer)
            "#{if (a | 0) == a then (a + '.0') else a} / #{b}"
      else if typeof b == 'number'
        switch b
          when 0 then "#{a} / 0.0" # infinity
          else 
            # Number must not be integers (bitwise op converts operand to integer)
            "#{a} / #{if (b | 0) == b then (b + '.0') else b}"
      else 
        "#{a} / #{b}"
      # TODO: handle vectors

      else if Array.isArray a and Array.isArray b
        if a.length != b.length
          throw "Cannot perform operation with arrays of different lengths"
        if (isArrayType a, 'number') and (isArrayType b, 'number')
          (Math.max a[i], b[i]) for i in [0...a.length]
        else 
          "max(vec3(#{a}), vec3(#{b}))"
