Sha256: a8ec4cccbd5be0eb74f04180e885f5f8a9d64fe321fe08ced9b152524226d666

Contents?: true

Size: 358 Bytes

Versions: 1

Compression:

Stored size: 358 Bytes

Contents

module Dydx
  module Algebra
    module Set
      class Log2 < Base
        attr_accessor :f

        def initialize(f)
          @f = f
        end

        def to_s
          "log2( #{f.to_s} )"
        end

        def differentiate(sym=:x)
          f.d(sym) / (f * log(2))
        end
        alias_method :d, :differentiate
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dydx-0.1.31 lib/dydx/algebra/set/log2.rb