lib/dydx/algebra.rb in dydx-0.0.2 vs lib/dydx/algebra.rb in dydx-0.0.3

- old
+ new

@@ -18,9 +18,13 @@ if g.is_a?(Symbol) || g.is_a?(Formula) || g.is_a?(Base) Num.new(self).send(operator.to_sym, g) + elsif operator == '^' && g.is_a?(Fixnum) + result = 1 + g.times{ result *= self } + result else (to_f.send(operator.to_sym, g)).to_i end end end