lib/dydx/algebra/operator/parts/general.rb in dydx-0.1.2 vs lib/dydx/algebra/operator/parts/general.rb in dydx-0.1.3
- old
+ new
@@ -41,11 +41,11 @@
elsif combinable?(x.x.g, operator)
send(operator, inverse(x.x.g, operator)).send(operator, inverse(x.x.f, operator))
else
super(x)
end
- elsif [:*].include?(operator) && x.inverse?(:+)
- inverse(::Algebra::Formula.new(self, x.x, operator.to_sym), :+)
+ elsif operator == :* && x.inverse?(:+)
+ -(self * x.x)
else
super(x)
end
end
end