Sha256: c79adb1a0cd652bcf73b9643859f0342a9f36b130c03db27dc407f5cbe3657b2

Contents?: true

Size: 497 Bytes

Versions: 4

Compression:

Stored size: 497 Bytes

Contents

module Dydx
  module Algebra
    module Operator
      module Parts
        module Symbol
          def *(x)
            if x.exponentiation? &&
              self == x.f

              self ^ (1 + x.g)
            else
              super(x)
            end
          end

          def /(x)
            if x.exponentiation? &&
              self == x.f

              self ^ (1 - x.g)
            else
              super(x)
            end
          end
        end
      end
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
dydx-0.0.4 lib/dydx/algebra/operator/parts/symbol.rb
dydx-0.0.3 lib/dydx/algebra/operator/parts/symbol.rb
dydx-0.0.2 lib/dydx/algebra/operator/parts/symbol.rb
dydx-0.0.1 lib/dydx/algebra/operator/parts/symbol.rb