Class: AppMath::Erfc

Inherits:
Object
  • Object
show all
Defined in:
lib/graph.rb

Instance Method Summary collapse

Constructor Details

#initialize(n = R.prec) ⇒ Erfc

Returns a new instance of Erfc.



403
404
405
406
# File 'lib/graph.rb', line 403

def initialize(n = R.prec)
  @precMem = R.prec
  @precLoc = n
end

Instance Method Details

#at(x) ⇒ Object



407
408
409
410
411
# File 'lib/graph.rb', line 407

def at(x)
  R.prec = @precLoc
  y = R.c(x).erfc
  R.prec = @precMem; y
end