mathematical functions in R language