R/potence.R

Defines functions potence

Documented in potence

potence <-
function(a, b) {
  c = a
  if(b < 0 || a < 0)
    stop("invalid input")
    if( b == 0) return(1)
      while(b > 1) {
        c = c*a
        b = b-1
      }
  return(c)
}

Try the FractalParameterEstimation package in your browser

Any scripts or data that you put into this service are public.

FractalParameterEstimation documentation built on July 10, 2019, 5:05 p.m.