Sha256: 0d1013b2d2d8392e0df12a40035ca6cb860d7c60d44a42e78b7303a5a68a76f4

Contents?: true

Size: 265 Bytes

Versions: 3

Compression:

Stored size: 265 Bytes

Contents

module Danica
  class Exponential < Operator
    variables :exponent

    def to_f
      Math.exp(exponent.to_f)
    end

    private

    def tex_string
      "e^{#{exponent.to_tex}}"
    end

    def gnu_string
      "exp(#{exponent.to_gnu})"
    end
  end
end


Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
danica-2.0.4 lib/danica/exponential.rb
danica-2.0.3 lib/danica/exponential.rb
danica-2.0.2 lib/danica/exponential.rb