Sha256: a632c622cf40c4f447ecd2330ebf616dbef41c2c3afc4afc0916c6d3e4270c88
Contents?: true
Size: 453 Bytes
Versions: 5
Compression:
Stored size: 453 Bytes
Contents
require 'spec_helper' describe Dydx::Algebra::Operator::Parts::Inverse do it { expect(inverse(x, :+).to_s).to eq('( - x )') } it { expect(inverse(x, :*).to_s).to eq('( 1 / x )') } it { expect(inverse(x, :+)).to eq(inverse(x, :+)) } it { expect(inverse(x, :*)).to eq(inverse(x, :*)) } it { expect(x - x).to eq(0) } it { expect(x / x).to eq(1) } it { expect(inverse(x, :+) + x).to eq(0) } it { expect(inverse(x, :*) * x).to eq(1) } end
Version data entries
5 entries across 5 versions & 1 rubygems