Sha256: 725e718c1336f70c458d7e605a2dc3201ff0d5fc5103afe0f1131b86e3b9de60

Contents?: true

Size: 466 Bytes

Versions: 1

Compression:

Stored size: 466 Bytes

Contents

require 'spec_helper'

describe Dydx do
  it 'has a version number' do
    expect(Dydx::VERSION).not_to be nil
  end

  it 'demo' do
    f(x, y) <= x + x*y + y
    expect(f(x, y)).to eq(x * (1 + y) + y)
    expect(f(a, 2)).to eq(3*a + 2)
    expect(f(1, a + b)).to eq(1 + 2 * ( a + b ))
    expect(f(1, 2)).to eq(5)
    expect(d/dx(f(x, y))).to eq(1 + y)

    g(x) <= sin(x)
    expect(d/dx(g(x))).to eq(cos(x))
    expect(S(g(x), dx)[0, pi/2]).to eq(1.0)
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
dydx-0.1.314 spec/dydx_spec.rb