Module: CAS::AutoDiff

Defined in:
lib/Mr.CAS/auto-diff.rb

Defined Under Namespace

Classes: DualNumber

Constant Summary collapse

Zero =
self.const 0
One =
self.const 1
Two =
self.const 2
E =
self.const Math::E
Pi =
self.const Math::PI

Class Method Summary collapse

Class Method Details

.const(x) ⇒ Object

DualNumbers



72
73
74
# File 'lib/Mr.CAS/auto-diff.rb', line 72

def self.const(x)
  DualNumber.new x, 0
end

.vars(x) ⇒ Object



76
77
78
# File 'lib/Mr.CAS/auto-diff.rb', line 76

def self.vars(x)
  DualNumber.new x, 1
end