Class: AppMath::Erf

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

Instance Method Summary collapse

Constructor Details

#initialize(n = R.prec) ⇒ Erf

Returns a new instance of Erf.



391
392
393
394
# File 'lib/graph.rb', line 391

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

Instance Method Details

#at(x) ⇒ Object



395
396
397
398
399
# File 'lib/graph.rb', line 395

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