File: A1inv.R

package info (click to toggle)
r-cran-circular 0.5-1-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,492 kB
  • sloc: ansic: 464; fortran: 69; sh: 13; makefile: 2
file content (13 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
###############################################################
#                                                             #
#       R port: Claudio Agostinelli  <claudio@unive.it>       #
#                                                             #
#       Date: January, 14, 2003                               #
#       Version: 0.1-1                                        #
#                                                             #
###############################################################

A1inv <- function(x) {
   ifelse (0 <= x & x < 0.53, 2 * x + x^3 + (5 * x^5)/6,
           ifelse (x < 0.85, -0.4 + 1.39 * x + 0.43/(1 - x), 1/(x^3 - 4 * x^2 + 3 * x)))
}