gsl/0000755000176200001440000000000015104334772011045 5ustar liggesusersgsl/MD50000644000176200001440000001252515104334772011362 0ustar liggesusersf0e941cd4acf0891cfb8a4b03c01204f *DESCRIPTION 02c2928aafd9e8f046903630110e2185 *INSTALL ec67552702abab9a4659ee613d367980 *NAMESPACE d98a08effc8390607ea9337bd4b3ddbb *NEWS.md 49451ef3da39ad3348db4efb9897229d *R/aaa.R 03ae4d3fba892312f51e5a3ffc7c0fb8 *R/airy.R fe8b740941ba5d4db46c06d91d2ea184 *R/bessel.R 61255f0011b035b698429c8da5141340 *R/clausen.R de72c950c76e237e2fd95d3e106479b3 *R/coulomb.R efda650f9c08a18868753656bbbc5f0b *R/coupling.R 94cb908c3c33996631a6f45b922a03d0 *R/dawson.R 4a6908299abee1012008c12ebdc78405 *R/debye.R 86c73ed966d517db954648f3af722988 *R/dilog.R 475580f14fd9545f05d696c380ae9c12 *R/ellint.R cc8b5050e1462ac3110d9f2d0a77b8a7 *R/elljac.R e387ea917edc9ce5dbf7fcd3d59fc3ee *R/error.R 90d4e6fe350e81ea1cbe11d34ad9325f *R/expint.R 52a98ad52b5f6afa08b023eb5d31af23 *R/fermi_dirac.R 92b6a84fdd23cbbe7635f6a323671109 *R/gamma.R f9d7db5fa4d762593d8ad45588db054f *R/gegenbauer.R f4d90b1eaed0d5431fb72f7cd017ccbb *R/hyperg.R 30d4268d469da729d11365cdc884ed8f *R/laguerre.R 91b6b722747196034cbd2a190c1a6282 *R/lambert.R 41075a8683d6bc3ed1ac78aef384bd70 *R/legendre.R 7ab481dd8fe0647da9d8094073e20203 *R/log.R 7366f85a711ffe092742b3afce23dd42 *R/multimin.R e173f4cb4f3c07696d5249c5f9727906 *R/poly.R af87996572694b59ae73f4481c37ced6 *R/pow_int.R f2606a5708629a1b4ebc401b857ba00d *R/psi.R 4e229aa5ab820bf6425a7edcbec4fa7f *R/qrng.R 9fc85ca081cf5f3bce21eb6e9caaef3d *R/rng.R 2b2d469586da281ae2782b18f48ed6c0 *R/synchrotron.R 5552758765d21274f3928f649090c79e *R/transport.R 699c11587bc6e03c24f909f22cf36a83 *R/trig.R 81e928a7d5059c7af5ac33ffb1a15184 *R/zeta.R db9a953c82fb5bcad9aee1bc7c6c053a *R/zzz.R cc7836d36bd29996be0e9f25e061e3c6 *README.md 57747de3b6b7fd061c04834ef2182968 *build/partial.rdb 8341e52658860277a1fca047d7173de8 *build/vignette.rds 8cdf4486bcfedc4dd9a99f91911d61f8 *cleanup c0c47048a54c7ea6a825d9ff88e5c52c *configure 792f356071ae1597660f670d2c713677 *configure.ac 23fe1f2d8c1e2b032482c51f0a2cdafa *inst/CITATION 2b4d7f6ad967e84d04e83aa2e06cf5fb *inst/doc/gsl.R 88a4f0b7bc76e5fbc1f0e9bad3493340 *inst/doc/gsl.Rnw f62f1ba8c28a56e8570b900896c1b0ba *inst/doc/gsl.pdf 183649ed6684b79e5cdfaf65c8d02030 *man/Airy.Rd 26236ecc930d700f58b5ead19a73da06 *man/Bessel.Rd f5e6ea1426b0e9f4c5c475072411e19d *man/Clausen.Rd 08e7103e795b27a2aa94921426243805 *man/Coulomb.Rd 943aa7a6edf3fbece5b382a85b80ed34 *man/Coupling.Rd e3ef5a84ec234d399151e0c65dcb4d26 *man/Dawson.Rd a18825ff6b88a468a3ae8dea1f3c39d2 *man/Debye.Rd 3353f6429ad721ca8af53edbe78a4438 *man/Dilog.Rd 46e504f0fb37a98c90df8d20c84db613 *man/Ellint.Rd 8c27ef50fe9f5810a53fbc4ccb463c40 *man/Elljac.Rd b8a2683677be8f85de6c886f4c7b8b9d *man/Error.Rd a2d5be9cf907d6eb4aa531549c690668 *man/Expint.Rd b73a38feaaab87506a9b10b25f7f978a *man/Fermi-Dirac.Rd 3df9baf6cd0f1f730c4aa71010030b26 *man/Gamma.Rd 0812a1ffb72ad39a28ea9b4b527b9342 *man/Gegenbauer.Rd 18dfc09197c77c82ad4c0c8f9072e2cc *man/Hyperg.Rd 795d32cd8ed78cf0b3f69277299ea029 *man/Laguerre.Rd 973b8905a68a3f159d6ccea938560679 *man/Lambert.Rd 43ea4346387087dfe2c0e17939765f8b *man/Legendre.Rd 01587e662e99e921f9cbfd47e7bb96c5 *man/Log.Rd 9ffa34c7edcbe3e8e23b3432aeb01f0c *man/Misc.Rd 775b3df52d2cd186b3d60f68f081d948 *man/Multimin.Rd 14fefe21c0d4ad4db139c2ce2e26e0b7 *man/Poly.Rd a90af37ca73a915b2b254cbf1107d6ab *man/Pow_int.Rd 8503eab21ff4ebb097e5d2bc76399c3c *man/Psi.Rd 7699376e01c16493cd238722107a1ec4 *man/Qrng.Rd 98716f1ece2ab70b0c869120ed590e51 *man/Rng.Rd 3aa9bebddffb9ebb60599b323dcbfaf1 *man/Synchrotron.Rd e8724512c35e636d574c8811337759c5 *man/Transport.Rd af73a5da2c75e3bd6120a3681d322843 *man/Trig.Rd a0caef8b67b40520f05ac99f982f521c *man/Zeta.Rd d30b183aaabd8a4f681f1c0c375c86e0 *man/figures/gsl.png 51f6ec6a093b45bc4226b96e59bdd122 *man/gsl-deprecated.Rd 6660099b2bbd2f1a77996aca6e02df0a *man/gsl-package.Rd 417be231e3b2ad76fb58f63e6282a843 *src/Makevars.in 3f7c071f1a65529da9c401162d49a54a *src/Makevars.win d3d81b3b8812de332f9ca2256ec35c60 *src/airy.c 7604a6ee8ac13f0cc2a75ad3ece65bda *src/bessel.c aa0315936933b9c23ad7aceccebca9e9 *src/clausen.c a48435626cff7f5e673d8e74c55086c0 *src/coulomb.c a0f8436540668edc1eebf7d90ac561fb *src/coupling.c 79a5b954466be25ed10afadeaebe2186 *src/dawson.c 348e4834165e442fb6be7355dd4af1da *src/debye.c c8b861498b3837da259d8ddd1ab782a0 *src/dilog.c fe09d8852d449ab25a03e57b93d3a766 *src/ellint.c 9eacff2997558f2810c2d7711b0ecade *src/elljac.c 954a9f1a7f5bb332f97a1ed9eed53e68 *src/error.c 73afce7b8dd97edc8a9816613c55688f *src/expint.c ec31473b1e14580d10a190b0f58b491a *src/fermi_dirac.c 6726e36122403c2317b79f2f0b081aca *src/gamma.c f2fb1a5af376fe1cd75078eadbc02d15 *src/gegenbauer.c 2152f80c0bbd879134c8fd56f9ae50fa *src/hyperg.c e024911ad413adf68e6b441588b03c7d *src/init.c 892000e15e29220ee82b7d9075500c4e *src/laguerre.c cc1b1448fd81ea0a5e1be7d6993ab630 *src/lambert.c 0c17ca1e2f0056dc8a46caf73aaf2979 *src/legendre.c b02fed23a674a60be08a6e2036580ddd *src/log.c 5a89fb1b136c3dcbef79e74677081cc8 *src/poly.c 58d4765885884c1c4df37ed9c2171037 *src/pow_int.c 709817127e20690a234e5cca6337a3ae *src/psi.c d08dd7bd114a1880bfd037deaacf19a5 *src/qrng.c d8830bb1c0eea900dea04efacf968352 *src/rng.c e5bff4e4f34b161c5614cfcd0f80d705 *src/synchrotron.c 3d930d3d06dc965f4a07c64195ad9b0a *src/transport.c eaa60b954d9f69a70e558f17c0d9d86e *src/trig.c 58ad72acc96459be2e809ba64f4a5331 *src/vector.c 0597d273827001e0b130065ead9c76b4 *src/vector.h e5230800b5a109e8f97b72df7395d56b *src/zeta.c 88a4f0b7bc76e5fbc1f0e9bad3493340 *vignettes/gsl.Rnw b286369517c69cf5356b20fce49019ba *vignettes/gsl.bib gsl/R/0000755000176200001440000000000015103324656011245 5ustar liggesusersgsl/R/rng.R0000644000176200001440000000264215103324656012162 0ustar liggesusers"rng_alloc" <- function(type = c("mt19937", "ranlxs0", "ranlxs1", "ranlxs2", "ranlxd1", "ranlxd2", "ranlux", "ranlux389", "cmrg", "mrg", "taus", "taus2", "gfsr4", "minstd")) { type <- switch( match.arg(type), mt19937 = 0, ranlxs0 = 1, ranlxs1 = 2, ranlxs2 = 3, ranlxd1 = 4, ranlxd2 = 5, ranlux = 6, ranlux389 = 7, cmrg = 8, mrg = 9, taus = 10, taus2 = 11, gfsr4 = 12, minstd = 13 ) retval <- .Call("rng_alloc", type, PACKAGE = "gsl") class(retval) <- c("gsl_rng", class(retval)) retval } "rng_set" <- function(r, seed) { .Call("rng_set", r, seed, PACKAGE = "gsl") } "rng_clone" <- function(r) { retval <- .Call("rng_clone", r, PACKAGE = "gsl") class(retval) <- "gsl_rng" retval } "rng_name" <- function(r) { .Call("rng_name", r, PACKAGE = "gsl") } "rng_min" <- function(r) { .Call("rng_min", r, PACKAGE = "gsl") } "rng_max" <- function(r) { .Call("rng_max", r, PACKAGE = "gsl") } "rng_get" <- function(r, length) { .Call("rng_get", r, length, PACKAGE = "gsl") } "rng_uniform" <- function(r, length) { .Call("rng_uniform", r, length, PACKAGE = "gsl") } "rng_uniform_pos" <- function(r, length) { .Call("rng_uniform_pos", r, length, PACKAGE = "gsl") } "rng_uniform_int" <- function(r, N, length) { if( ! (N > 0) ) stop("N needs to be positive") .Call("rng_uniform_int", r, N, length, PACKAGE = "gsl") } gsl/R/debye.R0000644000176200001440000000466015103324656012466 0ustar liggesusers"debye_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_3", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "debye_4" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("debye_4", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/fermi_dirac.R0000644000176200001440000001337515103324656013645 0ustar liggesusers"fermi_dirac_m1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_m1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_0" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_0", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_int" <- function(j, x, give=FALSE, strict=TRUE){ jj <- process.args(j, x) j.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("fermi_dirac_int", as.integer(j.vec), as.double(x.vec), as.integer(length(j.vec)), val=as.double(j.vec), err=as.double(j.vec), status=as.integer(0*j.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_mhalf" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_mhalf", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_half" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_half", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_3half" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("fermi_dirac_3half", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fermi_dirac_inc_0" <- function(x, b, give=FALSE, strict=TRUE){ jj <- process.args(x,b) x.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("fermi_dirac_inc_0", as.double(x.vec), as.double(b.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/synchrotron.R0000644000176200001440000000236315103324656013764 0ustar liggesusers"synchrotron_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("synchrotron_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "synchrotron_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("synchrotron_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/transport.R0000644000176200001440000000472415103324656013433 0ustar liggesusers"transport_2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_2", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_3", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_4" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_4", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "transport_5" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("transport_5", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/aaa.R0000644000176200001440000000335215103324656012115 0ustar liggesusers"process.args" <- function(...){ a <- list(...) attr <- attributes(a[[which.max(unlist(lapply(a,length)))]]) a <- lapply(a,as.vector) out <- do.call("rbind",a) out <- split(out,row(out)) names(out) <- paste("arg",1:length(a),sep="") return(c(out,attr=list(attr))) } #"process.2.args" <- function(a1,a2){ # lens <- c(length(a1),length(a2)) # attributes.list <- list(attributes(a1),attributes(a2)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # attr=attributes.wanted # ) # ) #} # #process.3.args <- function(a1,a2,a3){ # lens <- c(length(a1),length(a2),length(a3)) # attributes.list <- list(attributes(a1),attributes(a2),attributes(a3)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2),as.vector(a3)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # arg3=as.vector(jj[3,]), # attr=attributes.wanted # ) # ) #} #process.4.args <- function(a1,a2,a3,a4){ # lens <- c(length(a1),length(a2),length(a3),length(a4)) # attributes.list <- list(attributes(a1),attributes(a2),attributes(a3),attributes(a4)) # attributes.wanted <- attributes.list[[which.max(lens)]] # # jj <- rbind(as.vector(a1),as.vector(a2),as.vector(a3),as.vector(a4)) # return(list(arg1=as.vector(jj[1,]), # arg2=as.vector(jj[2,]), # arg3=as.vector(jj[3,]), # arg4=as.vector(jj[4,]), # attr=attributes.wanted # ) # ) #} # # strictify <- function(val,status) { val[status>0] <- NaN return(val) } gsl/R/legendre.R0000644000176200001440000004671615103324656013173 0ustar liggesusers"legendre_P1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_P2" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_P3" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_P3_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Pl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_Pl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Pl_array" <- function(lmax, x, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} attr <- attributes(x) lmax.single <- lmax x.vec <- as.vector(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("legendre_Pl_array", as.integer(lmax.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax.single+1 , length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "legendre_Q0" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_Q0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Q1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("legendre_Q1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_Ql" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_Ql_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } ## put legendre_array_n() and legendre_array_index() first [even ## though they appear in the manual later] for ease of ## understanding */ "legendre_array_n" <- function(lmax){ stopifnot(length(lmax)==1) ans <- 1L jj <- .C("legendre_array_n", as.integer(lmax), as.integer(ans), PACKAGE="gsl" ) return(jj[[2]]) } "legendre_array_index" <- function(l,m){ stopifnot(length(l)==1) stopifnot(length(m)==1) ans <- 1L jj <- .C("legendre_array_index", as.integer(l), as.integer(m), as.integer(ans), PACKAGE = "gsl" ) return(jj[[3]]) } legendre_check_args <- function(x,lmax,norm,csphase){ stopifnot(length(x)==1) # avoids misunderstandings re vectorization stopifnot(length(lmax)==1) stopifnot(lmax>=0) # lmax=0 is OK stopifnot(length(norm)==1) stopifnot(norm %in% 1:4) stopifnot(length(csphase)==1) stopifnot(csphase %in% c(-1,1)) return(TRUE) } "legendre_array" <- function(x, lmax, norm=1, csphase= -1){ # canonical use: legendre_array(0.4,5) ## note re-ordering of arguments ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_array", as.double(x), as.integer(lmax), as.integer(norm-1), # NB off-by-one error; norm=1 -> none, norm=1 -> Schmidt-semi, etc as.double(csphase), result_array = double(n), # scratch space out=double((lmax+1)*(lmax+1)) # also off-by-one; need 0,1,2,...,lmax ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv_alt_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv_alt_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv2_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv2_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), result_deriv2_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_deriv2_alt_array" <- function(x, lmax, norm=1, csphase= -1){ ignore <- legendre_check_args(x,lmax,norm,csphase) n <- legendre_array_n(lmax) jj <- .C("legendre_deriv2_alt_array", as.double(x), as.integer(lmax), as.integer(norm-1), as.double(csphase), result_array = double(n), result_deriv_array = double(n), result_deriv2_array = double(n), out=double((lmax+1)*(lmax+1)) ) return(matrix(jj$out,lmax+1,lmax+1)) } "legendre_Plm" <- function(l, m, x, give=FALSE, strict=TRUE){ jj <- process.args(l,m,x) l.vec <- jj$arg1 m.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_Plm_e", as.integer(l.vec), as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } deprecated_legendre <- function(...){ .Deprecated(new = "legendre_array", msg = "As of version 2.1, the GSL library has deprecated the following functions: gsl_sf_legendre_Plm_array gsl_sf_legendre_Plm_deriv_array gsl_sf_legendre_sphPlm_array gsl_sf_legendre_sphPlm_deriv_array gsl_sf_legendre_array_size The functionality is provided in GSL by the gsl_sf_legendre_array suite of functions; in R, use one of: legendre_array() legendre_deriv_array() legendre_deriv_alt_array() legendre_deriv2_array() legendre_deriv2_altarray() " ) } "legendre_Plm_array" <- deprecated_legendre "legendre_Plm_deriv_array" <- deprecated_legendre "legendre_sphPlm_array" <- deprecated_legendre "legendre_sphPlm_deriv_array" <- deprecated_legendre "legendre_array_size" <- deprecated_legendre "legendre_sphPlm" <- function(l, m, x, give=FALSE, strict=TRUE){ jj <- process.args(l,m,x) l.vec <- jj$arg1 m.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_sphPlm_e", as.integer(l.vec), as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } # "legendre_sphPlm_array" <- function(lmax, m, x, give=FALSE, strict=TRUE){ # if(length(lmax)>1){stop("lmax should be of length 1")} # if(length(m)>1){stop("m should be of length 1")} # lmax.single <- lmax # m.single <- m # x.vec <- as.vector(x) # x.out <- rep(x.vec,(lmax.single - m.single +1)) # jj <- .C("legendre_sphPlm_array", # as.integer(lmax.single), # as.integer(m.single), # as.double(x.vec), # as.integer(length(x.vec)), # val=as.double(x.out), # status=as.integer(x.vec), # PACKAGE="gsl" # ) # val <- jj$val # dim(val) <- c(lmax.single-m.single+1 , length(x.vec)) # status <- jj$status # attributes(status) <- attributes(x) # # if(strict){ # val <- strictify(val,status) # } # # if(give){ # return(list(val=val,status=status)) # } else { # return(val) # } # } "conicalP_half" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_half_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_mhalf" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_mhalf_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_0" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_0_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_1" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("conicalP_1_e", as.double(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_sph_reg" <- function(l, lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(l, lambda,x) l.vec <- jj$arg1 lam.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("conicalP_sph_reg_e", as.integer(l.vec), as.double(lam.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "conicalP_cyl_reg" <- function(m, lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(m,lambda,x) m.vec <- jj$arg1 lam.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("conicalP_cyl_reg_e", as.integer(m.vec), as.double(lam.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_0" <- function(lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_H3d_0_e", as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_1" <- function(lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("legendre_H3d_1_e", as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d" <- function(l, lambda, eta, give=FALSE, strict=TRUE){ jj <- process.args(l, lambda, eta) l.vec <- jj$arg1 lam.vec <- jj$arg2 eta.vec <- jj$arg3 attr <- jj$attr jj <- .C("legendre_H3d_e", as.integer(l.vec), as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.vec), err=as.double(lam.vec), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "legendre_H3d_array" <- function(lmax, lambda, eta, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} lmax.single <- lmax jj <- process.args(lambda,eta) lam.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr lam.out <- rep(lam.vec,(lmax+1)) jj <- .C("legendre_H3d_array", as.integer(lmax.single), as.double(lam.vec), as.double(eta.vec), as.integer(length(lam.vec)), val=as.double(lam.out), status=as.integer(lam.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax.single+1 , length(lam.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } gsl/R/trig.R0000644000176200001440000002076615103324656012350 0ustar liggesusers"gsl_sf_sin" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("sin_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_cos" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("cos_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hypot" <- function(x, y, give=FALSE, strict=TRUE){ jj <- process.args(x,y) x.vec <- jj$arg1 y.vec <- jj$arg2 attr <- jj$attr jj <- .C("hypot_e", as.double(x.vec), as.double(y.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "sinc" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("sinc_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_sin" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_sin_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "complex_cos" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_cos_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "complex_logsin" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_logsin_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "lnsinh" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("lnsinh_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lncosh" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("lncosh_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val attributes(val) <- attr err <- jj$err status <- jj$status attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/poly.R0000644000176200001440000000056215103324656012356 0ustar liggesusers"gsl_poly" <- function(c_gsl, x){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gsl_poly", as.double(c_gsl), as.integer(length(c_gsl)), as.double(x.vec), as.integer(length(x.vec)), ans=as.double(x.vec), PACKAGE="gsl" ) ans <- jj$ans attributes(ans) <- attr return(ans) } gsl/R/expint.R0000644000176200001440000001414615103324656012705 0ustar liggesusers"expint_E1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_E1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_E2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_E2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_En" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("expint_En_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_Ei" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_Ei_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Shi" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Shi_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Chi" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Chi_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "expint_3" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("expint_3_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Si" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Si_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "Ci" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("Ci_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "atanint" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) jj <- .C("atanint_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(x) attributes(err) <- attributes(x) attributes(status) <- attributes(x) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/bessel.R0000644000176200001440000011307315103324656012652 0ustar liggesusers"bessel_J0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_J0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_J1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_J1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Jn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Jn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Jn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Jn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_Y0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_Y0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Y1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_Y1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Yn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Yn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Yn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Yn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_I0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_I1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_In_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_In_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_I0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_I1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_I1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_scaled" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_In_scaled_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_In_scaled_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_In_scaled_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_K0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_K1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Kn_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Kn_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_K0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_K1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_K1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_scaled" <- function(n, x, give=FALSE, strict=TRUE){ jj <- process.args(n, x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Kn_scaled_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_Kn_scaled_array" <- function(nmin,nmax, x, give=FALSE,strict=TRUE){ if(length(nmin)>1){stop("nmin should be of length 1")} if(length(nmax)>1){stop("nmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) nmin <- as.integer(nmin) nmax <- as.integer(nmax) x.out <- rep(x.vec,(nmax-nmin+1)) jj <- .C("bessel_Kn_scaled_array_e", as.integer(nmin), as.integer(nmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax-nmin+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_j0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_j1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_j2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_j2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_jl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_jl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_jl_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_jl_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_jl_steed_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_jl_steed_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_y0" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y0_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_y1" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y1_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_y2" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_y2_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_yl" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$arg3 jj <- .C("bessel_yl_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_yl_array" <- function(lmax, x, give=FALSE, strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_yl_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_i0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_i1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_i2_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_i2_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_il_scaled" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_il_scaled_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_il_scaled_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec,(lmax+1)) jj <- .C("bessel_il_scaled_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_k0_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k0_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_k1_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k1_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_k2_scaled" <- function(x, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("bessel_k2_scaled_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_kl_scaled" <- function(l, x, give=FALSE, strict=TRUE){ jj <- process.args(l, x) l.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_kl_scaled_e", as.integer(l.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "bessel_kl_scaled_array" <- function(lmax, x, give=FALSE,strict=TRUE){ if(length(lmax)>1){stop("lmax should be of length 1")} x.vec <- as.vector(x) attr <- attributes(x) x.out <- rep(x.vec, (lmax+1)) jj <- .C("bessel_kl_scaled_array_e", as.integer(lmax), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(lmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,status=status)) } else { return(val) } } "bessel_Jnu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Jnu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_sequence_Jnu" <- function (nu, v, mode = 0, give = FALSE, strict=TRUE){ if (length(nu) > 1 ) { stop("nu should be of length 1") } if (length(mode) > 1 ) { stop("mode should be of length 1") } v.vec <- as.vector(v) if(any(v.vec<0)){stop("all elements of v must be positive")} if( !all(diff(v.vec)>0) ){stop("elements of v must be sorted in increasing order")} jj <- .C("bessel_sequence_Jnu_e", as.double(nu), val=as.double(v.vec), as.integer(length(v.vec)), as.integer(mode), status=as.integer(nu), PACKAGE = "gsl" ) val <- jj$val status <- jj$status attributes(val) <- attributes(v) attributes(status) <- attributes(v) if(strict){ if(status>0){val[] <- NA} } if(give){ return(list(val=val, status=status)) } else { return(val) } } "bessel_Ynu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Ynu_e", as.double(nu), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Inu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Inu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Inu_scaled" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Inu_scaled_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Knu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Knu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_lnKnu" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_lnKnu_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_Knu_scaled" <- function (nu, x, give = FALSE, strict = TRUE){ jj <- process.args(nu, x) nu.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_Knu_scaled_e", as.double(nu.vec), as.double(x.vec), as.integer(length(x.vec)), val = as.double(x.vec), err = as.double(x.vec), status = as.integer(0*x.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_J0" <- function (s, give = FALSE, strict = TRUE){ s.vec <- as.vector(s) attr <- attributes(s) jj <- .C("bessel_zero_J0_e", as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_J1" <- function (s, give = FALSE, strict = TRUE){ s.vec <- as.vector(s) attr <- attributes(s) jj <- .C("bessel_zero_J1_e", as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } "bessel_zero_Jnu" <- function (nu, s, give = FALSE, strict = TRUE){ jj <- process.args(nu,s) nu.vec <- jj$arg1 s.vec <- jj$arg2 attr <- jj$attr jj <- .C("bessel_zero_Jnu_e", as.double(nu.vec), as.integer(s.vec), as.integer(length(s.vec)), val = as.double(s.vec), err = as.double(s.vec), status = as.integer(s.vec), PACKAGE = "gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if (strict) { val <- strictify(val, status) } if (give) { return(list(val = val, err = err, status = status)) } else { return(val) } } gsl/R/gegenbauer.R0000644000176200001440000000730615103324656013502 0ustar liggesusers"gegenpoly_1" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_1_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_2" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_2_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_3" <- function(lambda, x, give=FALSE, strict=TRUE){ jj <- process.args(lambda,x) lambda.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_3_e", as.double(lambda.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_n" <- function(n, lambda, x, give=FALSE, strict=TRUE){ if(length(n)>1){stop("length of n should be 1")} jj <- process.args(lambda,x) lambda.single <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gegenpoly_n_e", as.integer(n), as.double(lambda.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gegenpoly_array" <- function(nmax, lambda, x, give=FALSE,strict=TRUE){ if(length(nmax)>1){stop("nmax should be of length 1")} jj <- process.args(lambda,x) lambda.single <- jj$arg1 x.vec<- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(nmax+1)) jj <- .C("gegenpoly_array", as.integer(nmax), as.double(lambda.single), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(nmax+1 , length(x.vec)) status <- jj$status attributes(status) <- attr err <- jj$err attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/log.R0000644000176200001440000001013715103324656012153 0ustar liggesusers"gsl_sf_log" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_abs" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_abs_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_log" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("complex_log_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "log_1plusx" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_1plusx_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_1plusx_mx" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("log_1plusx_mx_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/gamma.R0000644000176200001440000004035215103324656012456 0ustar liggesusers"gsl_sf_gamma" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("gamma_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lngamma_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma_sgn" <- function(x, give=FALSE,strict=TRUE){ jj <- process.args(x) x.vec <- jj$arg1 attr <- jj$attr jj <- .C("lngamma_sgn_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), sgn=as.double(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err sgn <- jj$sgn status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr attributes(sgn) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status,sgn=sgn)) } else { return(list(val=val,sgn=sgn)) } } "gammastar" <- function(x,give=FALSE,strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gammastar_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gammainv" <- function(x,give=FALSE,strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("gammainv_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lngamma_complex" <- function(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE){ attr <- attributes(zr) if(is.null(zi)){ zi <- as.vector(Im(zr)) zr <- as.vector(Re(zr)) } else { zi <- as.vector(zi) zr <- as.vector(zr) } if(length(zr) !=length(zi)){stop("zr and zi must be of the same dimensions")} jj <- .C("lngamma_complex_e", as.double(zr), as.double(zi), as.integer(length(zr)), val_lnr=as.double(zr), val_arg=as.double(zr), err_lnr=as.double(zr), err_arg=as.double(zr), status=as.integer(0*zr), PACKAGE="gsl" ) val_lnr <- jj$val_lnr val_arg <- jj$val_arg err_lnr <- jj$err_lnr err_arg <- jj$err_arg status <- jj$status attributes(status) <- attr if(r.and.i){ # val <- exp(val_lnr)*cos(val_arg) + 1i*exp(val_lnr)*sin(val_arg) # err <- exp(xerr_lnr)*cos(err_arg) + 1i*exp(err_lnr)*sin(err_arg) val <- val_lnr + 1i*val_arg err <- err_lnr + 1i*err_arg attributes(val) <- attr attributes(err) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } else { attributes(val_lnr) <- attr attributes(val_arg) <- attr attributes(err_lnr) <- attr attributes(err_arg) <- attr if(strict){ val_lnr <- strictify(val_lnr,status) val_arg <- strictify(val_arg,status) } if(give){ return(list(val_lnr=val_lnr, val_arg=val_arg, err_lnr=err_lnr,err_arg=err_arg, status=status)) } else { return(list(val_lnr=val_lnr, val_arg=val_arg)) } } } "taylorcoeff" <- function(n, x ,give=FALSE,strict=TRUE){ jj <- process.args(n,x) n.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("taylorcoeff_e", as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "fact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("fact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "doublefact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("doublefact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnfact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("lnfact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lndoublefact" <- function(n, give=FALSE,strict=TRUE){ n.vec <- as.vector(n) attr <- attributes(n) jj <- .C("lndoublefact_e", as.integer(n), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_choose" <- function(n, m, give=FALSE,strict=TRUE){ jj <- process.args(n,m) n.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("choose_e", as.integer(n.vec), as.integer(m.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnchoose" <- function(n, m, give=FALSE,strict=TRUE){ jj <- process.args(n,m) n.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnchoose_e", as.integer(n.vec), as.integer(m.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attributes(n) attributes(err) <- attributes(n) attributes(status) <- attributes(n) if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "poch" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("poch_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnpoch" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnpoch_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnpoch_sgn" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnpoch_sgn_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), sgn=as.double(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err sgn <- jj$sgn status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr attributes(sgn) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status,sgn=sgn)) } else { return(list(val=val,sgn=sgn)) } } "pochrel" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("pochrel_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc_Q" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_Q_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc_P" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_P_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gamma_inc" <- function(a, x, give=FALSE,strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("gamma_inc_e", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "gsl_sf_beta" <- function(a, b, give=FALSE,strict=TRUE){ jj <- process.args(a,b) a.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("beta_e", as.double(a.vec), as.double(b.vec), as.integer(length(b.vec)), val=as.double(b.vec), err=as.double(b.vec), status=as.integer(0*b.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lnbeta" <- function(a, b, give=FALSE,strict=TRUE){ jj <- process.args(a,b) a.vec <- jj$arg1 b.vec <- jj$arg2 attr <- jj$attr jj <- .C("lnbeta_e", as.double(a.vec), as.double(b.vec), as.integer(length(b.vec)), val=as.double(b.vec), err=as.double(b.vec), status=as.integer(0*b.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "beta_inc" <- function(a, b, x, give=FALSE,strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("beta_inc_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/coupling.R0000644000176200001440000000621515103324656013214 0ustar liggesusers"coupling_3j" <- function(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 ma.vec <- jj$arg4 mb.vec <- jj$arg5 mc.vec <- jj$arg6 attr <- jj$attr jj <- .C("coupling_3j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(ma.vec), as.integer(mb.vec), as.integer(mc.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coupling_6j" <- function(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_jd, two_je, two_jf) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 jd.vec <- jj$arg4 je.vec <- jj$arg5 jf.vec <- jj$arg6 attr <- jj$attr jj <- .C("coupling_6j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(jd.vec), as.integer(je.vec), as.integer(jf.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coupling_9j" <- function(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, give=FALSE, strict=TRUE){ jj <- process.args(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji) ja.vec <- jj$arg1 jb.vec <- jj$arg2 jc.vec <- jj$arg3 jd.vec <- jj$arg4 je.vec <- jj$arg5 jf.vec <- jj$arg6 jg.vec <- jj$arg7 jh.vec <- jj$arg8 ji.vec <- jj$arg9 attr <- jj$attr jj <- .C("coupling_9j", as.integer(ja.vec), as.integer(jb.vec), as.integer(jc.vec), as.integer(jd.vec), as.integer(je.vec), as.integer(jf.vec), as.integer(jg.vec), as.integer(jh.vec), as.integer(ji.vec), as.integer(length(ja.vec)), val=as.double(ja.vec), err=as.double(ja.vec), status=as.integer(0*ja.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/zzz.R0000644000176200001440000000021515103324656012223 0ustar liggesusers#.First.lib <- function(lib, pkg) { # library.dynam("gsl", pkg, lib) #} .onLoad <- function(lib, pkg) { library.dynam("gsl", pkg, lib) } gsl/R/clausen.R0000644000176200001440000000115715103324656013026 0ustar liggesusers"clausen" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("clausen_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/ellint.R0000644000176200001440000001751115103324656012664 0ustar liggesusers"ellint_Kcomp" <- function(k, mode=0, give=FALSE, strict=TRUE){ attr <- attributes(k) if(length(mode)>1){stop("length of mode must be 1")} k.vec <- as.vector(k) jj <- .C("ellint_Kcomp_e", as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_Ecomp" <- function(k, mode=0, give=FALSE, strict=TRUE){ attr <- attributes(k) if(length(mode)>1){stop("length of mode must be 1")} k.vec <- as.vector(k) jj <- .C("ellint_Ecomp_e", as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_F" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_F_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_E" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_E_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_P" <- function(phi, k, n, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k,n) phi.vec <- jj$arg1 k.vec <- jj$arg2 n.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_P_e", as.double(phi.vec), as.double(k.vec), as.double(n.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_D" <- function(phi, k, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(phi,k) phi.vec <- jj$arg1 k.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_D_e", as.double(phi.vec), as.double(k.vec), as.integer(length(k.vec)), as.integer(mode), val=as.double(k.vec), err=as.double(k.vec), status=as.integer(0*k.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RC" <- function(x, y, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y) x.vec <- jj$arg1 y.vec <- jj$arg2 attr <- jj$attr jj <- .C("ellint_RC_e", as.double(x.vec), as.double(y.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RD" <- function(x, y, z, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RD_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RF" <- function(x, y, z, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RF_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "ellint_RJ" <- function(x, y, z, p, mode=0, give=FALSE, strict=TRUE){ if(length(mode)>1){stop("length of mode must be 1")} if(length(p)>1){stop("length of p must be 1")} jj <- process.args(x,y,z) x.vec <- jj$arg1 y.vec <- jj$arg2 z.vec <- jj$arg3 attr <- jj$attr jj <- .C("ellint_RJ_e", as.double(x.vec), as.double(y.vec), as.double(z.vec), as.double(p), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/laguerre.R0000644000176200001440000000540615103324656013203 0ustar liggesusers"laguerre_1" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_1", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_2" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_2", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_3" <- function(a, x, give=FALSE, strict=TRUE){ jj <- process.args(a,x) a.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("laguerre_3", as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "laguerre_n" <- function(n, a, x, give=FALSE, strict=TRUE){ jj <- process.args(n,a,x) n.vec <- jj$arg1 a.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("laguerre_n", as.integer(n.vec), as.double(a.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/coulomb.R0000644000176200001440000002376615103324656013046 0ustar liggesusers"hydrogenicR_1" <- function(Z, r, give=FALSE, strict=TRUE){ jj <- process.args(Z,r) Z.vec <- jj$arg1 r.vec <- jj$arg2 attr <- jj$attr jj <- .C("hydrogenicR_1", as.double(Z.vec), as.double(r.vec), as.integer(length(Z.vec)), val=as.double(Z.vec), err=as.double(Z.vec), status=as.integer(0*Z.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hydrogenicR" <- function(n, l, Z, r, give=FALSE, strict=TRUE){ jj <- process.args(n,l,Z,r) n.vec <- jj$arg1 l.vec <- jj$arg2 Z.vec <- jj$arg3 r.vec <- jj$arg4 attr <- jj$attr jj <- .C("hydrogenicR", as.integer(n.vec), as.integer(l.vec), as.double(Z.vec), as.double(r.vec), as.integer(length(r.vec)), val=as.double(r.vec), err=as.double(r.vec), status=as.integer(0*r.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coulomb_wave_FG" <- function(eta, x, L_F, k, give=FALSE, strict=TRUE){ jj <- process.args(eta, x, L_F, k) eta.vec <- jj$arg1 x.vec <- jj$arg2 L_F.vec <- jj$arg3 k.vec <- jj$arg4 attr <- jj$attr jj <- .C("coulomb_wave_FG", as.double(eta.vec), as.double(x.vec), as.double(L_F.vec), as.integer(k.vec), as.integer(length(eta.vec)), val_F=as.double(0*eta.vec), err_F=as.double(0*eta.vec), val_Fp=as.double(0*eta.vec), err_Fp=as.double(0*eta.vec), val_G=as.double(0*eta.vec), err_G=as.double(0*eta.vec), val_Gp=as.double(0*eta.vec), err_Gp=as.double(0*eta.vec), exp_F=as.double(0*eta.vec), exp_G=as.double(0*eta.vec), status=as.integer(0*eta.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_Fp <- jj$val_Fp val_G <- jj$val_G val_Gp <- jj$val_Gp err_F <- jj$err_F err_Fp <- jj$err_Fp err_G <- jj$err_Gp err_Gp <- jj$err_Gp status <- jj$status exp_F <- jj$exp_F exp_G <- jj$exp_G attributes(val_F) <- attr attributes(val_Fp) <- attr attributes(val_G) <- attr attributes(val_Gp) <- attr attributes(err_F) <- attr attributes(err_Fp) <- attr attributes(err_G) <- attr attributes(err_Gp) <- attr attributes(exp_F) <- attr attributes(exp_G) <- attr attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_Fp <- strictify(val_Fp,status) val_G <- strictify(val_G,status) val_Gp <- strictify(val_Gp,status) err_F <- strictify(err_F,status) err_Fp <- strictify(err_Fp,status) err_G <- strictify(err_G,status) err_Gp <- strictify(err_Gp,status) exp_F <- strictify(exp_F,status) exp_G <- strictify(exp_G,status) } if(give){ return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, err_F=err_F, err_Fp=err_Fp, err_G=err_G, err_Gp=err_Gp, exp_F=exp_F, exp_G=exp_G, status=status ) ) } else { return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, exp_F=exp_F, exp_G=exp_G ) ) } } "coulomb_wave_F_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_F_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), F_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(x.vec)) rownames(val) <- L_min:(L_min+kmax) colnames(val) <- names(x) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, F_exp=jj$F_exp, status=status)) } else { return(val) } } "coulomb_wave_FG_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_FG_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val_F=as.double(x.out), val_G=as.double(x.out), F_exp=as.double(x.vec), G_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_G <- jj$val_G F_exp <- jj$F_exp G_exp <- jj$G_exp dim(val_F) <- c(kmax+1, length(x.vec)) dim(val_G) <- c(kmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_G <- strictify(val_G,status) } if(give){ return(list(val_F=val_F, val_G=val_G, F_exp=F_exp, status=status)) } else { return(list(val_F=val_F, val_G=val_G)) } } "coulomb_wave_FGp_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_FGp_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val_F=as.double(x.out), val_Fp=as.double(x.out), val_G=as.double(x.out), val_Gp=as.double(x.out), F_exp=as.double(x.vec), G_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val_F <- jj$val_F val_Fp <- jj$val_Fp val_G <- jj$val_G val_Gp <- jj$val_Gp F_exp <- jj$F_exp G_exp <- jj$G_exp dim(val_F) <- c(kmax+1, length(x.vec)) dim(val_Fp) <- c(kmax+1, length(x.vec)) dim(val_G) <- c(kmax+1, length(x.vec)) dim(val_Gp) <- c(kmax+1, length(x.vec)) status <- jj$status attributes(status) <- attr if(strict){ val_F <- strictify(val_F,status) val_Fp <- strictify(val_Fp,status) val_G <- strictify(val_G,status) val_Gp <- strictify(val_Gp,status) } if(give){ return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp, F_exp=F_exp, status=status)) } else { return(list(val_F=val_F, val_Fp=val_Fp, val_G=val_G, val_Gp=val_Gp)) } } "coulomb_wave_sphF_array" <- function(L_min, kmax, eta, x, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta,x) eta.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr x.out <- rep(x.vec,(kmax+1)) jj <- .C("coulomb_wave_sphF_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.out), F_exp=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(x.vec)) rownames(val) <- L_min:(L_min+kmax) colnames(val) <- names(x) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, F_exp=jj$F_exp, status=status)) } else { return(val) } } "coulomb_CL" <- function(L, eta, give=FALSE, strict=TRUE){ jj <- process.args(L,eta) L.vec <- jj$arg1 eta.vec <- jj$arg2 attr <- jj$attr jj <- .C("coulomb_CL", as.double(L.vec), as.double(eta.vec), as.integer(length(L.vec)), val=as.double(L.vec), err=as.double(L.vec), status=as.integer(0*L.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "coulomb_CL_array" <- function(L_min, kmax, eta, give=FALSE,strict=TRUE){ if(length(L_min)>1){stop("L_min should be of length 1")} if(length(kmax)>1){stop("kmax should be of length 1")} jj <- process.args(eta) eta.vec <- jj$arg1 attr <- jj$attr eta.out <- rep(eta.vec,(kmax+1)) jj <- .C("coulomb_CL_array", as.double(L_min), as.integer(kmax), as.double(eta.vec), as.integer(length(eta.vec)), val=as.double(eta.out), status=as.integer(0*eta.vec), PACKAGE="gsl" ) val <- jj$val dim(val) <- c(kmax+1, length(eta.vec)) rownames(val) <- L_min:(L_min+kmax) status <- jj$status attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val, status=status)) } else { return(val) } } gsl/R/airy.R0000644000176200001440000001751315103324656012343 0ustar liggesusers"airy_Ai" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_deriv" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_deriv_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_deriv" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_deriv_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Ai_deriv_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Ai_deriv_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_Bi_deriv_scaled" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("airy_Bi_deriv_scaled_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Ai" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Ai_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Bi" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Bi_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Ai_deriv" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Ai_deriv_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "airy_zero_Bi_deriv" <- function(n, give=FALSE, strict=TRUE){ n.vec <- as.vector(pmax(n,1)) attr <- attributes(n) jj <- .C("airy_zero_Bi_deriv_e", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } val[n<1] <- NA if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/psi.R0000644000176200001440000000726415103324656012174 0ustar liggesusers"psi_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("psi_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("psi", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1piy" <- function(y, give=FALSE, strict=TRUE){ attr <- attributes(y) y.vec <- as.vector(y) jj <- .C("psi_1piy", as.double(y.vec), as.integer(length(y.vec)), val=as.double(y.vec), err=as.double(y.vec), status=as.integer(0*y.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("psi_1_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_1" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("psi_1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "psi_n" <- function(m, x, give=FALSE, strict=TRUE){ jj <- process.args(m,x) m.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("psi_n", as.integer(m.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/multimin.R0000644000176200001440000001142415103324656013230 0ustar liggesusers# An R wrapper for GSL's multimin family of functions for minimizing functions. # # Written in 2007 by Andrew Clausen # - Added Nelder-Mead convergence interface in 2010. #dyn.load("gsl.so") # These functions have been temporarily removed pending a permanent fix multimin <- function(..., prec=0.0001) {stop("These functions have been temporarily removed pending a permanent fix") # is.converged <- function(state, old.x) # { # if (state$method == "nm") # return(multimin.fminimizer.size(state) < prec) # # convergence <- ifelse(state$is.fdf, state$df, old.x - state$x) # return (sum(abs(convergence)) < prec) # } # # state <- multimin.init(...) # old.x <- state$x # while (TRUE) # { # state <- multimin.iterate(state) # if (is.converged(state, old.x)) # break # old.x <- state$x # } # state } multimin.init <- function(x, f, df=NA, fdf=NA, method=NA, step.size=NA, tol=NA) {stop("These functions have been temporarily removed pending a permanent fix") # multimin.method.names <- # list( # "conjugate-fr", # fletcher-reeves # "conjugate-pr", # polak-ribiere # "bfgs", # broyden-fletcher-goldfarb-shanno # "steepest-descent", # "nm" # nelder-mead # ) # # multimin.method.f <- c(FALSE, FALSE, FALSE, FALSE, TRUE) # multimin.method.fdf <- c(TRUE, TRUE, TRUE, TRUE, FALSE) # # stopifnot(length(formals(f)) == 1) # stopifnot(is.numeric(x)) # # n <- length(x) # # is.fdf = !missing(df) # if (is.fdf) { # stopifnot(length(formals(df)) == 1) # if (is.na(fdf)) # fdf <- function(x) list(f=f(x), df=df(x)) # stopifnot(length(formals(fdf)) == 1) # fdf_ <- function(x) { # result <- new.env() # vals <- fdf(x) # result$f <- vals$f # result$df <- vals$df # result # } # # if (missing(method)) # method <- "bfgs" # if (missing(step.size)) # step.size <- 1 # if (missing(tol)) # tol <- 1 # stopifnot(is.numeric(tol)) # } else { # if (missing(step.size)) # step.size <- rep(1, n) # if (missing(method)) # method <- "nm" # } # # stopifnot(is.numeric(step.size)) # # if (is.character(method)) { # method.name <- method # method <- match(method, multimin.method.names) # if (is.na(method)) # stop(paste(c( # "The optimization method '", method.name, # "' is not an option. Try one of these:\n", # paste(multimin.method.names, collapse=", "), # ".", # sep=""))) # } # method <- as.integer(method) # stopifnot(1 <= method && method <= 5) # if (!is.fdf && !multimin.method.f[[method]]) # stop(paste( # "The optimization method '", multimin.method.names[[method]], # "' needs a derivative function.\nIf you don't want to provide ", # "one, these methods don't need derivatives:\n", # paste(subset(multimin.method.names, multimin.method.f), # collapse=", "), # ".", # sep="")) # if (is.fdf && !multimin.method.fdf[[method]]) # stop(paste( # "The optimization method '", multimin.method.names[[method]], # "' doesn't use derivatives.\nIf you want to exploit a ", # "derivative, use one of these methods:\n", # paste(subset(multimin.method.names, multimin.method.fdf), # collapse=", "), # ".", # sep="")) # # internal.state <- new.env() # internal.state$f <- body(function(x) f(x)) # internal.state$n <- n # internal.state$rho <- new.env() # if (is.fdf) { # internal.state$df <- body(function(x) df(x)) # internal.state$fdf <- body(fdf_) # } # # if (is.fdf) { # .Call("multimin_fdf_new", internal.state, x, method, step.size, # tol) # } else { # .Call("multimin_f_new", internal.state, x, method, step.size) # } # # list(internal.state = internal.state, x=x, f=NA, df=rep(NA, n), # is.fdf=is.fdf, method=multimin.method.names[[method]]) } multimin.iterate <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # internal.state <- state$internal.state # if (state$is.fdf) { # state$code <- .Call("multimin_fdf_iterate", internal.state) # state$x <- .Call("multimin_fdf_state_argmin", internal.state) # state$f <- .Call("multimin_fdf_state_min", internal.state) # state$df <- .Call("multimin_fdf_state_grad", internal.state) # } else { # state$code <- .Call("multimin_f_iterate", internal.state) # state$x <- .Call("multimin_f_state_argmin", internal.state) # state$f <- .Call("multimin_f_state_min", internal.state) # } # state } multimin.restart <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # if (state$is.fdf) # .Call("multimin_restart", state$internal.state) # state } ## Convergence criterion for Nelder-Mead multimin.fminimizer.size <- function(state) {stop("These functions have been temporarily removed pending a permanent fix") # stopifnot(!state$is.fdf) # .Call("multimin_fminimizer_size", state$internal.state) } gsl/R/dilog.R0000644000176200001440000000304615103324656012471 0ustar liggesusers"dilog" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("dilog_e", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "complex_dilog" <- function(r, theta=NULL, give=FALSE, strict=TRUE){ if(is.null(theta)){ attr <- attributes(r) r.vec <- as.vector(Mod(r)) theta.vec <- as.vector(Arg(r)) } else { jj <- process.args(r,theta) r.vec <- jj$arg1 theta.vec <- jj$arg2 attr <- jj$attr } jj <- .C("complex_dilog_e", as.double(r.vec), as.double(theta.vec), # sharp-eyed bug report from Glenn Davis as.integer(length(r)), val_re=as.double(r.vec), val_im=as.double(r.vec), err_re=as.double(r.vec), err_im=as.double(r.vec), status=as.integer(0*r.vec), PACKAGE="gsl" ) val <- jj$val_re + 1i*jj$val_im err <- jj$err_re + 1i*jj$err_im status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(give){ return(list(val=val, err=err, status=status)) } else { return(val) } } gsl/R/error.R0000644000176200001440000000752015103324656012525 0ustar liggesusers"erf" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erfc" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erfc_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "log_erfc" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("log_erfc_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erf_Z" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_Z_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "erf_Q" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("erf_Q_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hazard" <- function(x, mode=0, give=FALSE, strict=TRUE){ x.vec <- as.vector(x) attr <- attributes(x) jj <- .C("hazard_e", as.double(x.vec), as.integer(length(x.vec)), as.integer(mode), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/pow_int.R0000644000176200001440000000126515103324656013053 0ustar liggesusers"pow_int" <- function(x, n, give=FALSE, strict=TRUE){ jj <- process.args(x,n) x.vec <- jj$arg1 n.vec <- jj$arg2 attr <- jj$attr jj <- .C("pow_int", as.double(x.vec), as.integer(n.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/lambert.R0000644000176200001440000000233315103324656013017 0ustar liggesusers"lambert_W0" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lambert_W0", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "lambert_Wm1" <- function(x,give=FALSE,strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("lambert_Wm1", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/elljac.R0000644000176200001440000000417115103324656012625 0ustar liggesusers"elljac" <- function(u, m, give=FALSE, strict=TRUE){ jj <- process.args(u, m) u.vec <- jj$arg1 m.vec <- jj$arg2 attr <- jj$attr jj <- .C("elljac_e", as.double(u.vec), as.double(m.vec), as.integer(length(u.vec)), sn=as.double(u.vec), cn=as.double(u.vec), dn=as.double(u.vec), status=as.integer(0*u.vec), PACKAGE="gsl" ) sn <- jj$sn cn <- jj$cn dn <- jj$dn attributes(sn) <- attr attributes(cn) <- attr attributes(dn) <- attr status <- jj$status attributes(status) <- attr if(strict){ sn <- strictify(sn,status) cn <- strictify(cn,status) dn <- strictify(dn,status) } if(give){ return(list(list(sn=sn,cn=cn,dn=dn),status=status)) } else { return(list(sn=sn,cn=cn,dn=dn)) } } "sn_cn_dn" <- function(z,m,thing){ # complex case jj.r <- elljac(Re(z),m) s <- jj.r$sn c <- jj.r$cn d <- jj.r$dn if(is.complex(z)){ jj.i <- elljac(Im(z),1-m) s1 <- jj.i$sn c1 <- jj.i$cn d1 <- jj.i$dn out <- switch(thing, sn = (s*d1 +1i*c*d*s1*c1)/(c1^2+m*s^2*s1^2), cn = (c*c1 -1i*s*d*s1*d1)/(c1^2+m*s^2*s1^2), dn = (d*c1*d1-1i*m*s*c*s1 )/(c1^2+m*s^2*s1^2), stop('argument "thing" should be one of sn, cn, dn') ) } else { out <- switch(thing, sn = s, cn = c, dn = d, stop('argument "thing" should be one of sn, cn, dn') ) } return(out) } gsl_sn <- function(z,m){sn_cn_dn(z,m,thing="sn")} gsl_cn <- function(z,m){sn_cn_dn(z,m,thing="cn")} gsl_dn <- function(z,m){sn_cn_dn(z,m,thing="dn")} gsl_ns <- function(z,m){1/gsl_sn(z,m)} gsl_nc <- function(z,m){1/gsl_cn(z,m)} gsl_nd <- function(z,m){1/gsl_dn(z,m)} gsl_sc <- function(z,m){gsl_sn(z,m)/gsl_cn(z,m)} gsl_sd <- function(z,m){gsl_sn(z,m)/gsl_dn(z,m)} gsl_cs <- function(z,m){gsl_cn(z,m)/gsl_sn(z,m)} gsl_cd <- function(z,m){gsl_cn(z,m)/gsl_dn(z,m)} gsl_ds <- function(z,m){gsl_dn(z,m)/gsl_sn(z,m)} gsl_dc <- function(z,m){gsl_dn(z,m)/gsl_cn(z,m)} gsl/R/zeta.R0000644000176200001440000001046715103324656012343 0ustar liggesusers"zeta_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("zeta_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zeta" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("zeta", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zetam1_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("zetam1_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "zetam1" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("zetam1", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hzeta" <- function(s, q, give=FALSE, strict=TRUE){ jj <- process.args(s,q) s.vec <- jj$arg1 q.vec <- jj$arg2 attr <- jj$attr jj <- .C("hzeta", as.double(s.vec), as.double(q.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "eta_int" <- function(n, give=FALSE, strict=TRUE){ attr <- attributes(n) n.vec <- as.vector(n) jj <- .C("eta_int", as.integer(n.vec), as.integer(length(n.vec)), val=as.double(n.vec), err=as.double(n.vec), status=as.integer(0*n.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "eta" <- function(s, give=FALSE, strict=TRUE){ attr <- attributes(s) s.vec <- as.vector(s) jj <- .C("eta", as.double(s.vec), as.integer(length(s.vec)), val=as.double(s.vec), err=as.double(s.vec), status=as.integer(0*s.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/hyperg.R0000644000176200001440000001705715103324656012700 0ustar liggesusers"hyperg_0F1" <- function(c, x, give=FALSE, strict=TRUE){ jj <- process.args(c,x) c.vec <- jj$arg1 x.vec <- jj$arg2 attr <- jj$attr jj <- .C("hyperg_0F1_e", as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_1F1_int" <- function(m, n, x, give=FALSE, strict=TRUE){ jj <- process.args(m,n,x) m.vec <- jj$arg1 n.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_1F1_int_e", as.integer(m.vec), as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_1F1" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_1F1_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_U_int" <- function(m, n, x, give=FALSE, strict=TRUE){ jj <- process.args(m,n,x) m.vec <- jj$arg1 n.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_U_int_e", as.integer(m.vec), as.integer(n.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_U" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_U_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1" <- function(a, b, c, x, give=FALSE, strict=TRUE){ jj <- process.args(a, b, c, x) a.vec <- jj$arg1 b.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_e", as.double(a.vec), as.double(b.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_conj" <- function(aR, aI, c, x, give=FALSE, strict=TRUE){ jj <- process.args(aR,aI,c,x) aR.vec <- jj$arg1 aI.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_conj_e", as.double(aR.vec), as.double(aI.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_renorm" <- function(a, b, c, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,c,x) a.vec <- jj$arg1 b.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_renorm_e", as.double(a.vec), as.double(b.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F1_conj_renorm" <- function(aR, aI, c, x, give=FALSE, strict=TRUE){ jj <- process.args(aR,aI,c,x) aR.vec <- jj$arg1 aI.vec <- jj$arg2 c.vec <- jj$arg3 x.vec <- jj$arg4 attr <- jj$attr jj <- .C("hyperg_2F1_conj_renorm_e", as.double(aR.vec), as.double(aI.vec), as.double(c.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } "hyperg_2F0" <- function(a, b, x, give=FALSE, strict=TRUE){ jj <- process.args(a,b,x) a.vec <- jj$arg1 b.vec <- jj$arg2 x.vec <- jj$arg3 attr <- jj$attr jj <- .C("hyperg_2F0_e", as.double(a.vec), as.double(b.vec), as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/dawson.R0000644000176200001440000000115315103324656012663 0ustar liggesusers"dawson" <- function(x, give=FALSE, strict=TRUE){ attr <- attributes(x) x.vec <- as.vector(x) jj <- .C("dawson", as.double(x.vec), as.integer(length(x.vec)), val=as.double(x.vec), err=as.double(x.vec), status=as.integer(0*x.vec), PACKAGE="gsl" ) val <- jj$val err <- jj$err status <- jj$status attributes(val) <- attr attributes(err) <- attr attributes(status) <- attr if(strict){ val <- strictify(val,status) } if(give){ return(list(val=val,err=err,status=status)) } else { return(val) } } gsl/R/qrng.R0000644000176200001440000000107615103324656012343 0ustar liggesusersqrng_alloc <- function(type = c("niederreiter_2", "sobol"), dim) { type <- switch(match.arg(type), niederreiter_2 = 0, sobol = 1) .Call("qrng_alloc", type, dim, PACKAGE = "gsl") } qrng_clone <- function(q) .Call("qrng_clone", q, PACKAGE = "gsl") qrng_init <- function(q) .Call("qrng_init", q, PACKAGE = "gsl") qrng_name <- function(q) .Call("qrng_name", q, PACKAGE = "gsl") qrng_size <- function(q) .Call("qrng_size", q, PACKAGE = "gsl") qrng_get <- function(q, n = 1) matrix(.Call("get_n", q, n, PACKAGE = "gsl"), nrow = n, byrow = TRUE) gsl/cleanup0000755000176200001440000000017615104317412012416 0ustar liggesusers#! /bin/sh for f in ./config.* autom4te.cache/; do rm -rf $f done if [ -e src/Makevars ]; then rm -f src/Makevars fi exit 0 gsl/vignettes/0000755000176200001440000000000015104317411013044 5ustar liggesusersgsl/vignettes/gsl.bib0000644000176200001440000000223415103324656014320 0ustar liggesusers @Manual{rcore2008, title = {\proglang{R}: A Language and Environment for Statistical Computing}, author = {{\proglang{R} Development Core Team}}, organization = {\proglang{R} Foundation for Statistical Computing}, address = {Vienna, Austria}, year = {2008}, note = {{ISBN} 3-900051-07-0}, url = {https://www.R-project.org}, } @Book{abramowitz1965, author = {M. Abramowitz and I. A. Stegun}, title = {Handbook of mathematical functions}, publisher = {New York: Dover}, year = {1965} } @Manual{galassi2005, title = {GNU Scientific Library}, author = {M. Galassi and others}, year = {2005}, note = {Reference Manual edition 1.7, for GSL version 1.7; 13 September 2005} } @Book{vallee2004, author = {O. Vall\'{e}e and M. Soares}, title = {{A}iry functions and applications to physics}, publisher = {World Scientific}, year = {2004}, } @Article{hankin2006, author = {R. K. S. Hankin}, title = {Special functions in \proglang{R}: introducing the \pkg{gsl} package}, journal = {\proglang{R} News}, year = {2006}, volume = {6}, number = {4}, pages = {24--26}, month = {October} } gsl/vignettes/gsl.Rnw0000644000176200001440000002503315103324656014334 0ustar liggesusers% -*- mode: noweb; noweb-default-code-mode: R-mode; -*- \documentclass[nojss]{jss} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% just as usual \author{Robin K. S. Hankin} \title{Special functions in \proglang{R}: introducing the \pkg{gsl} package} %\VignetteIndexEntry{A vignette for the gsl package} %% for pretty printing and a nice hypersummary also set: \Plaintitle{Special functions in R: introducing the gsl package} \Shorttitle{The \pkg{gsl} package} \Abstract{ This vignette introduces the \pkg{gsl} package of \proglang{R} utilities for accessing the functions of the Gnu Scientific Library. An earlier version of this document was published as~\cite{hankin2006}. } \Keywords{\proglang{R}, special functions} \Plainkeywords{R, special functions} \Address{ Robin K. S. Hankin\\ University of Stirling\\ Scotland\\ E-mail: \email{hankin.robin@gmail.com} } %% need no \usepackage{Sweave.sty} \SweaveOpts{echo=FALSE} \begin{document} \hfill\includegraphics[width=1in]{\Sexpr{system.file("help/figures/gsl.png",package="gsl")}} \section{Introduction} The Gnu Scientific Library (GSL) is a collection of numerical routines for scientific computing~\citep{galassi2005}. The routines are written in \proglang{C} and constitute a library for \proglang{C} programmers; the source code is distributed under the GNU General Public License. One stated aim of the GSL development effort is the development of wrappers for high level languages. The \proglang{R} programming language~\citep{rcore2008} is an environment for statistical computation and graphics. It consists of a language and a run-time environment with graphics and other features. Here I introduce \pkg{gsl}, an \proglang{R} package that allows direct access to many GSL functions, including all the special functions, from within an \proglang{R} session. The package is available on CRAN, \url{https://www.cran.r-project.org/} and github, \url{https://github.com/RobinHankin/gsl}; the GSL itself is available at \url{https://www.gnu.org/software/gsl/}. \section{Package design philosophy} The package splits into two parts: the special functions, written by the author; and the \pkg{rng} and \pkg{qrng} functionality, written by Duncan Murdoch. These two parts are very different in implementation, yet follow a common desideratum, namely that the package be a transparent port of the GSL library. The package thus has the advantage of being easy to compare with the GSL, and easy to update verifiably. In this paper, the Airy functions are used to illustrate the package. They are typical of the package's capabilities and coding, and are relatively simple to understand, having only a single real argument. A brief definition, and an application in physics, is given in the appendix. The package is organized into units that correspond to the GSL header file. Thus all the Airy functions are defined in a single header file, \code{gsl\_sf\_airy.h}. The package thus contains a corresponding \proglang{C} file, \code{airy.c}; an \proglang{R} file \code{airy.R}, and a documentation file \code{Airy.Rd}. These three files together encapsulate the functionality defined in \code{gsl\_sf\_airy.h} in the context of an \proglang{R} package. This structure makes it demonstrable that the GSL has been systematically and completely wrapped. Functions are named such that one can identify a function in the GSL manual, and the corresponding \proglang{R} command will be the same but with the prefix\footnote{Some functions, such as \code{gsl\_sf\_sin()}, retain the prefix to avoid conflicts. A full list is given in \code{Misc.Rd}.} and, if present, the ``\code{\_e}'' suffix, removed. In the case of the special functions, the prefix is ``\code{gsl\_sf\_}''. Thus, GSL function \code{gsl\_sf\_airy\_Ai\_e()} of header file \code{gsl\_sf\_airy.h} is called, via intermediate \proglang{C} routine \code{airy\_Ai\_e()}, by \proglang{R} function \code{airy\_Ai()}. Documentation is provided for every function defined in \code{gsl\_sf\_airy.h} under \code{Airy.Rd}. The \pkg{gsl} package is not intended to add any numerical functionality to the GSL, although here and there I have implemented slight extensions such as the Jacobian elliptic functions whose \proglang{R} ports take a complex argument. \subsection{Package documentation} The \pkg{gsl} package is unusual in that its documentation consists almost entirely of pointers to the GSL reference manual~\citep{galassi2005}, and~\citet{abramowitz1965}. This follows from the transparent wrapper philosophy. In any case, the GSL reference manual would strictly dominate the \code{Rd} files of the \pkg{gsl} package. \section[Package gsl in use]{Package \pkg{gsl} in use} <>= <>= library(gsl) @ Most functions in the package are straightforwardly and transparently executable: <>= airy_Ai(1:3) @ The online helpfiles include many examples that reproduce graphs and tables that appear in \citeauthor{abramowitz1965}. This constitutes a useful check on the routines. For example, figures~\ref{airyfig_A} and~\ref{airyfig_B} show an approximate reproduction of their figures~10.6 and~10.7 (page~446). \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") @ \caption{Functions~$\mathrm{Ai}(\pm x)$ \label{airyfig_A} and~$\mathrm{Ai}'(\pm x)$ as plotted in the helpfile for \code{airy\_Ai()} and appearing on page~446 of~\citet{abramowitz1965}} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") @ \caption{Functions~$\mathrm{Bi}(\pm x)$ \label{airyfig_B} and~$\mathrm{Bi}'(\pm x)$ \citep{abramowitz1965}} \end{center} \end{figure} \section{Summary} The \pkg{gsl} package is a transparent \proglang{R} wrapper for the Gnu Scientific Library. It gives access to all the special functions, and the quasi-random sequence generation routines. Notation follows the GSL as closely as reasonably practicable; many graphs and tables appearing in \citeauthor{abramowitz1965} are reproduced by the examples in the helpfiles. \subsubsection*{Acknowledgments} I would like to acknowledge the many stimulating and helpful comments made by the \proglang{R}-help list over the years. \bibliography{gsl} \section*{Appendix: The Airy function and an application in quantum mechanics} The Airy function may not be familiar to some readers; here, I give a brief introduction to it and illustrate the \pkg{gsl} package in use in a physical context. The standard reference is~\citet{vallee2004}. For real argument~$x$, the Airy function is defined by the integral \begin{equation} \mathrm{Ai}(x)=\frac{1}{\pi}\int_0^\infty \cos\left(t^3/3+xt\right)\,dt\end{equation} and obeys the differential equation~$y''=xy$ (the other solution is denoted~$\mathrm{Bi}(x)$). In the field of quantum mechanics, one often considers the problem of a particle confined to a potential well that has a well-specified form. Here, I consider a potential of the form \begin{equation}\label{potential} V(r) = \left\{\begin{array}{ll} r & \mbox{if~$r>0$}\\ \infty & \mbox{if~$r\leq 0$.}\\ \end{array} \right. \end{equation} Under such circumstances, the energy spectrum is discrete and the energy~$E_n$ corresponds to the $n^{\rm th}$ quantum state, denoted by $\psi_n$. If the mass of the particle is~$m$, it is governed by the Schr\"{o}dinger equation \begin{equation} \frac{d^2\psi_n(r)}{dr^2} + \frac{2m}{\hbar^2}\left(E_n-r\right)\psi_n(r)=0 \end{equation} Changing variables to $\xi=\left(E_n-e\right)\left(2m/\hbar\right)^{1/3}$ yields the Airy equation, viz \begin{equation} \frac{d^2\psi_n}{d\xi^2}+\xi\psi_n=0\end{equation} with solution \begin{equation} \psi_n(\xi)=N\mathrm{Ai}\left(-\xi\right) \end{equation} where $N$ is a normalizing constant (the~$\mathrm{Bi}\left(\cdot\right)$ term is omitted as it tends to infinity with increasing~$r$). Demanding that~$\psi_n(0)=0$ gives \[ E_n=-a_{n+1}\left(\hbar^2/2m\right)^{1/3} \] where~$a_n$ is the $n^{\rm th}$ root of the~$\mathrm{Ai}$ function [\code{Airy\_zero\_Ai()} in the package]; the off-by-one mismatch is due to the convention that the ground state is conventionally labelled state zero, not state~1. Thus, for example, $E_2=\mbox{\Sexpr{-round(airy_zero_Ai(3),4)}}\left(\hbar^2/2m\right)^{1/3}$. The normalization factor~$N$ is determined by requiring that $\int_0^\infty\psi^*\psi\,dr=1$ (physically, the particle is known to be somewhere with~$r>0$). It can be shown that \[ N=\frac{\left(2m/\hbar\right)^{1/6}}{\mathrm{Ai}'\left(a_n\right)}\] [the denominator is given by function \code{airy\_zero\_Ai\_deriv()} in the package] and the full solution is thus given by \begin{equation} \psi_n(r)=\frac{\left(2m/\hbar\right)^{1/6}} {\mathrm{Ai}'\left(a_n\right)} \mathrm{Ai}\left[ \left(\frac{2m}{\hbar}\right)^{1/3}\left(r-E_n\right)\right]. \end{equation} Figure~\ref{qm} shows the first six energy levels and the corresponding wave functions. \begin{figure}[htbp] \begin{center} <>= f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } @ \caption{First six energy levels of a particle\label{qm} in a potential well (diagonal line) given by equation~\ref{potential}} \end{center} \end{figure} \end{document} gsl/src/0000755000176200001440000000000015104317411011623 5ustar liggesusersgsl/src/dawson.c0000644000176200001440000000072015103324656013271 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void dawson(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_dawson_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/vector.c0000644000176200001440000000162415103324656013304 0ustar liggesusers/* Conversion between GSL vectors and R vectors. * * Written in 2007 by Andrew Clausen */ #include #include "vector.h" #include gsl_vector *vector_gsl_from_R(SEXP x) { int i, n; gsl_vector *result; double *x_; assert(isNumeric(x)); x_ = REAL(x); n = LENGTH(x); result = gsl_vector_alloc(n); assert(result != NULL); for (i = 0; i < n; i++) gsl_vector_set(result, i, x_[i]); return result; } SEXP vector_R_from_gsl(const gsl_vector *x) { SEXP result; double *x_; int i; int n = x->size; PROTECT(result = NEW_NUMERIC(n)); x_ = NUMERIC_POINTER(result); for (i = 0; i < n; i++) x_[i] = gsl_vector_get(x, i); UNPROTECT(1); return result; } void vector_assign_gsl_from_R(gsl_vector *x, SEXP y) { double *y_ = NUMERIC_POINTER(y); int i; int n = x->size; assert(LENGTH(y) == n); for (i = 0; i < n; i++) gsl_vector_set(x, i, y_[i]); } gsl/src/Makevars.win0000644000176200001440000000044315103324656014124 0ustar liggesusers# PKG_LIBS=-LF:/MinGW/usr/local/lib -lgsl -lgslcblas # CPPFLAGS=-I$(R_HOME)/include -IF:/MinGW/usr/local/include # PKG_CPPFLAGS=-IF:/MinGW/usr/local/include # lines below supplied by Brian Ripley and Uwe Ligges PKG_CPPFLAGS=-I$(LIB_GSL)/include PKG_LIBS=-L$(LIB_GSL)/lib -lgsl -lgslcblas gsl/src/trig.c0000644000176200001440000000607015103324656012747 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_sin_e goes to sin_e. */ void sin_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_sin_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void cos_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_cos_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void hypot_e(const double *x, double *y, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hypot_e(x[i], y[i], &result) ; val[i] = result.val; err[i] = result.err; } } void sinc_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_sinc_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_sin_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_sin_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void complex_cos_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_cos_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void complex_logsin_e(double *zr, double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_logsin_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void lnsinh_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnsinh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lncosh_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lncosh_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/log.c0000644000176200001440000000341515103324656012563 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning, of the name. Thus gsl_sf_log_e goes to log_e and gsl_sf_complex_log_e goes to complex_log_e. */ void log_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_abs_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_abs_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_log_e(const double *zr, const double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_log_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void log_1plusx_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_1plusx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void log_1plusx_mx_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_1plusx_mx_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/debye.c0000644000176200001440000000247315103324656013075 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_debye_1_e goes to debye_1. */ void debye_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_3(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void debye_4(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_debye_4_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/lambert.c0000644000176200001440000000143615103324656013431 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and the _e from the end. Thus gsl_sf_lambert_W0 goes to lambert_W0. */ void lambert_W0(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lambert_W0_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void lambert_Wm1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lambert_Wm1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/poly.c0000644000176200001440000000031215103324656012756 0ustar liggesusers#include void gsl_poly(const double *c, const int *len, double *x, const int *lenx, double *ans) { int i; for(i = 0; i< *lenx ; i++){ ans[i] = gsl_poly_eval(c, *len, x[i]); } } gsl/src/laguerre.c0000644000176200001440000000270215103324656013606 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and the _e from the end. Thus gsl_sf_laguerre_1_e goes to laguerre_1. */ void laguerre_1(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_1_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_2(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_2_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_3(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_3_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void laguerre_n(int *n, const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_laguerre_n_e(*n, a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/ellint.c0000644000176200001440000000750415103324656013274 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. See section 7.13 of the GSL manual for documentation */ const gsl_mode_t sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; void ellint_Kcomp_e(const double *k, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_ellint_Kcomp_e(k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_Ecomp_e(const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_Ecomp_e(k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_F_e(double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_F_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_E_e(double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_E_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_P_e(double *phi, const double *k, const double *n, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_P_e(phi[i], k[i], n[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_D_e(const double *phi, const double *k, const int *nk, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nk ; i++){ status[i] = gsl_sf_ellint_D_e(phi[i], k[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RC_e(const double *x, const double *y, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RC_e(x[i], y[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RD_e(const double *x, const double *y, double *z, int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RD_e(x[i], y[i], z[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RF_e(const double *x, const double *y, const double *z, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RF_e(x[i], y[i], z[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void ellint_RJ_e(const double *x, const double *y, const double *z, const double *p, const int *nx, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nx ; i++){ status[i] = gsl_sf_ellint_RJ_e(x[i], y[i], z[i], *p, sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/legendre.c0000644000176200001440000002634715103324656013600 0ustar liggesusers#include #include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_legendre_P1 goes to legendre_P1. */ /* following specifies the normalization mode for functions like gsl_sf_legendre_array(), as specified in the gsl-ref manual (currently 7.24.2, "Associated Legendre Polynomials and Spherical Harmonics") */ const gsl_sf_legendre_t legendre_norm[] = { GSL_SF_LEGENDRE_NONE , GSL_SF_LEGENDRE_SCHMIDT , GSL_SF_LEGENDRE_SPHARM , GSL_SF_LEGENDRE_FULL }; void legendre_P1(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P1(x[i]); } } void legendre_P1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P2(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P2(x[i]); } } void legendre_P2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_P3(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_P3(x[i]); } } void legendre_P3_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_P3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl(const int *l, const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Pl(*l, x[i]); } } void legendre_Pl_e(const int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Pl_e(*l, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Pl_array(const int *lmax, const double* x, const int* len, double* out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Pl_array(*lmax, x[i], out+i*(*lmax+1)); } } void legendre_Q0(const double *x, const int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Q0(x[i]); } } void legendre_Q0_e(double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Q0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Q1(double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Q1(x[i]); } } void legendre_Q1_e(double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Q1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_Ql(int *l, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Ql(*l, x[i]); } } void legendre_Ql_e(int *l, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Ql_e(*l, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* put legendre_array_n() and legendre_array_index() first [even though they appear in the manual later] for ease of understanding */ void legendre_array_n(const int *lmax, int *ans){ *ans = (int) gsl_sf_legendre_array_n((size_t) *lmax); } void legendre_array_index(const int *l, const int *m, int *ans){ *ans = gsl_sf_legendre_array_index( (size_t) *l, (size_t) *m); } void legendre_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv_alt_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv_alt_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv2_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *result_deriv2_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv2_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array, result_deriv2_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv2_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_deriv2_alt_array(const double *x, const int *lmax, const int *norm, const double *csphase, double *result_array, double *result_deriv_array, double *result_deriv2_array, double *out) { gsl_set_error_handler_off(); gsl_sf_legendre_deriv2_alt_array_e(legendre_norm[(size_t) *norm], (size_t) *lmax, *x, *csphase, result_array, result_deriv_array, result_deriv2_array); for(size_t l=0 ; l <= (*lmax) ; l++){ /*sic, need l=lmax */ for(size_t m=0 ; m <= l ; m++){ out[(*lmax+1)*m + l] = result_deriv2_array[gsl_sf_legendre_array_index(l, m)]; } } } void legendre_Plm(int *l, int *m, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_Plm(*l, *m, x[i]); } } void legendre_Plm_e(int *l, int *m, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_Plm_e(*l, *m, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* void legendre_Plm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) // deprecated { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Plm_array(*lmax, *m, x[i], out+i*(*lmax- *m +1)); } } */ void legendre_sphPlm(int *l, int *m, double *x, int *len, double *out) { int i; for(i = 0; i< *len ; i++){ out[i] = gsl_sf_legendre_sphPlm(*l, *m, x[i]); } } void legendre_sphPlm_e(int *l, int *m, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_sphPlm_e(*l, *m, x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* void legendre_sphPlm_array(int *lmax, int *m, double* x, int* len, double* out, int* status) //deprecated { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_Plm_array(*lmax, *m, x[i], out+i*(*lmax- *m +1)); } } */ void conicalP_half_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_half_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_mhalf_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_mhalf_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_0_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_0_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_1_e(double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_1_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_sph_reg_e(int *l, double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_sph_reg_e(l[i], lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void conicalP_cyl_reg_e(int *m, double *lambda, double *x, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_conicalP_sph_reg_e(m[i], lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_0_e(double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_0_e(lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_1_e(double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_1_e(lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_e(int *l, double *lambda, double *eta, int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_legendre_H3d_e(l[i], lambda[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void legendre_H3d_array(int *lmax, double *lambda, double *eta, int *len, double* out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++) { status[i] = gsl_sf_legendre_H3d_array(*lmax, lambda[i], eta[i], out+i*(*lmax+1)); } } gsl/src/init.c0000644000176200001440000010751015103324656012746 0ustar liggesusers#include #include #include // for NULL #include /* FIXME: Check these declarations against the C/Fortran source code. */ /* .C calls */ extern void airy_Ai_deriv_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_deriv_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_e(void *, void *, void *, void *, void *, void *); extern void airy_Ai_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_deriv_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_deriv_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_e(void *, void *, void *, void *, void *, void *); extern void airy_Bi_scaled_e(void *, void *, void *, void *, void *, void *); extern void airy_zero_Ai_deriv_e(void *, void *, void *, void *, void *); extern void airy_zero_Ai_e(void *, void *, void *, void *, void *); extern void airy_zero_Bi_deriv_e(void *, void *, void *, void *, void *); extern void airy_zero_Bi_e(void *, void *, void *, void *, void *); extern void atanint_e(void *, void *, void *, void *, void *); extern void bessel_I0_e(void *, void *, void *, void *, void *); extern void bessel_i0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I1_e(void *, void *, void *, void *, void *); extern void bessel_i1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_I1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_i2_scaled_e(void *, void *, void *, void *, void *); extern void bessel_il_scaled_array_e(void *, void *, void *, void *, void *); extern void bessel_il_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_scaled_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_In_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Inu_e(void *, void *, void *, void *, void *, void *); extern void bessel_Inu_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_j0_e(void *, void *, void *, void *, void *); extern void bessel_J0_e(void *, void *, void *, void *, void *); extern void bessel_j1_e(void *, void *, void *, void *, void *); extern void bessel_J1_e(void *, void *, void *, void *, void *); extern void bessel_j2_e(void *, void *, void *, void *, void *); extern void bessel_jl_array_e(void *, void *, void *, void *, void *); extern void bessel_jl_e(void *, void *, void *, void *, void *, void *); extern void bessel_jl_steed_array_e(void *, void *, void *, void *, void *); extern void bessel_Jn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Jn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Jnu_e(void *, void *, void *, void *, void *, void *); extern void bessel_K0_e(void *, void *, void *, void *, void *); extern void bessel_k0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K0_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K1_e(void *, void *, void *, void *, void *); extern void bessel_k1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_K1_scaled_e(void *, void *, void *, void *, void *); extern void bessel_k2_scaled_e(void *, void *, void *, void *, void *); extern void bessel_kl_scaled_array_e(void *, void *, void *, void *, void *); extern void bessel_kl_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_scaled_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Kn_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_Knu_e(void *, void *, void *, void *, void *, void *); extern void bessel_Knu_scaled_e(void *, void *, void *, void *, void *, void *); extern void bessel_lnKnu_e(void *, void *, void *, void *, void *, void *); extern void bessel_sequence_Jnu_e(void *, void *, void *, void *, void *); extern void bessel_y0_e(void *, void *, void *, void *, void *); extern void bessel_Y0_e(void *, void *, void *, void *, void *); extern void bessel_y1_e(void *, void *, void *, void *, void *); extern void bessel_Y1_e(void *, void *, void *, void *, void *); extern void bessel_y2_e(void *, void *, void *, void *, void *); extern void bessel_yl_array_e(void *, void *, void *, void *, void *); extern void bessel_yl_e(void *, void *, void *, void *, void *, void *); extern void bessel_Yn_array_e(void *, void *, void *, void *, void *, void *); extern void bessel_Yn_e(void *, void *, void *, void *, void *, void *); extern void bessel_Ynu_e(void *, void *, void *, void *, void *, void *); extern void bessel_zero_J0_e(void *, void *, void *, void *, void *); extern void bessel_zero_J1_e(void *, void *, void *, void *, void *); extern void bessel_zero_Jnu_e(void *, void *, void *, void *, void *, void *); extern void beta_e(void *, void *, void *, void *, void *, void *); extern void beta_inc_e(void *, void *, void *, void *, void *, void *, void *); extern void Chi_e(void *, void *, void *, void *, void *); extern void choose_e(void *, void *, void *, void *, void *, void *); extern void Ci_e(void *, void *, void *, void *, void *); extern void clausen_e(void *, void *, void *, void *, void *); extern void complex_cos_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_dilog_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_log_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_logsin_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void complex_sin_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void conicalP_0_e(void *, void *, void *, void *, void *, void *); extern void conicalP_1_e(void *, void *, void *, void *, void *, void *); extern void conicalP_cyl_reg_e(void *, void *, void *, void *, void *, void *, void *); extern void conicalP_half_e(void *, void *, void *, void *, void *, void *); extern void conicalP_mhalf_e(void *, void *, void *, void *, void *, void *); extern void conicalP_sph_reg_e(void *, void *, void *, void *, void *, void *, void *); extern void cos_e(void *, void *, void *, void *, void *); extern void coulomb_CL(void *, void *, void *, void *, void *, void *); extern void coulomb_CL_array(void *, void *, void *, void *, void *, void *); extern void coulomb_wave_F_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FG(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FG_array(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_FGp_array(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coulomb_wave_sphF_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_3j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_6j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void coupling_9j(void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void dawson(void *, void *, void *, void *, void *); extern void debye_1(void *, void *, void *, void *, void *); extern void debye_2(void *, void *, void *, void *, void *); extern void debye_3(void *, void *, void *, void *, void *); extern void debye_4(void *, void *, void *, void *, void *); extern void dilog_e(void *, void *, void *, void *, void *); extern void doublefact_e(void *, void *, void *, void *, void *); extern void ellint_D_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_E_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_Ecomp_e(void *, void *, void *, void *, void *, void *); extern void ellint_F_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_Kcomp_e(void *, void *, void *, void *, void *, void *); extern void ellint_P_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RC_e(void *, void *, void *, void *, void *, void *, void *); extern void ellint_RD_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RF_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void ellint_RJ_e(void *, void *, void *, void *, void *, void *, void *, void *, void *); extern void elljac_e(void *, void *, void *, void *, void *, void *, void *); extern void erf_e(void *, void *, void *, void *, void *, void *); extern void erf_Q_e(void *, void *, void *, void *, void *, void *); extern void erf_Z_e(void *, void *, void *, void *, void *, void *); extern void erfc_e(void *, void *, void *, void *, void *, void *); extern void eta(void *, void *, void *, void *, void *); extern void eta_int(void *, void *, void *, void *, void *); extern void expint_3_e(void *, void *, void *, void *, void *); extern void expint_E1_e(void *, void *, void *, void *, void *); extern void expint_E2_e(void *, void *, void *, void *, void *); extern void expint_Ei_e(void *, void *, void *, void *, void *); extern void expint_En_e(void *, void *, void *, void *, void *, void *); extern void fact_e(void *, void *, void *, void *, void *); extern void fermi_dirac_0(void *, void *, void *, void *, void *); extern void fermi_dirac_1(void *, void *, void *, void *, void *); extern void fermi_dirac_2(void *, void *, void *, void *, void *); extern void fermi_dirac_3half(void *, void *, void *, void *, void *); extern void fermi_dirac_half(void *, void *, void *, void *, void *); extern void fermi_dirac_inc_0(void *, void *, void *, void *, void *, void *); extern void fermi_dirac_int(void *, void *, void *, void *, void *, void *); extern void fermi_dirac_m1(void *, void *, void *, void *, void *); extern void fermi_dirac_mhalf(void *, void *, void *, void *, void *); extern void gamma_e(void *, void *, void *, void *, void *); extern void gamma_inc_e(void *, void *, void *, void *, void *, void *); extern void gamma_inc_P_e(void *, void *, void *, void *, void *, void *); extern void gamma_inc_Q_e(void *, void *, void *, void *, void *, void *); extern void gammainv_e(void *, void *, void *, void *, void *); extern void gammastar_e(void *, void *, void *, void *, void *); extern void gegenpoly_1_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_2_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_3_e(void *, void *, void *, void *, void *, void *); extern void gegenpoly_array(void *, void *, void *, void *, void *, void *); extern void gegenpoly_n_e(void *, void *, void *, void *, void *, void *, void *); extern void gsl_poly(void *, void *, void *, void *, void *); extern void hazard_e(void *, void *, void *, void *, void *, void *); extern void hydrogenicR(void *, void *, void *, void *, void *, void *, void *, void *); extern void hydrogenicR_1(void *, void *, void *, void *, void *, void *); extern void hyperg_0F1_e(void *, void *, void *, void *, void *, void *); extern void hyperg_1F1_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_1F1_int_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F0_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_conj_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_conj_renorm_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_2F1_renorm_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void hyperg_U_e(void *, void *, void *, void *, void *, void *, void *); extern void hyperg_U_int_e(void *, void *, void *, void *, void *, void *, void *); extern void hypot_e(void *, void *, void *, void *, void *, void *); extern void hzeta(void *, void *, void *, void *, void *, void *); extern void laguerre_1(void *, void *, void *, void *, void *, void *); extern void laguerre_2(void *, void *, void *, void *, void *, void *); extern void laguerre_3(void *, void *, void *, void *, void *, void *); extern void laguerre_n(void *, void *, void *, void *, void *, void *, void *); extern void lambert_W0(void *, void *, void *, void *, void *); extern void lambert_Wm1(void *, void *, void *, void *, void *); extern void legendre_array(void *, void *, void *, void *, void *, void *); extern void legendre_array_index(void *, void *, void *); extern void legendre_array_n(void *, void *); extern void legendre_deriv_alt_array(void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv_array(void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv2_alt_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void legendre_deriv2_array(void *, void *, void *, void *, void *, void *, void *, void *); extern void legendre_H3d_0_e(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_1_e(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_array(void *, void *, void *, void *, void *, void *); extern void legendre_H3d_e(void *, void *, void *, void *, void *, void *, void *); extern void legendre_P1_e(void *, void *, void *, void *, void *); extern void legendre_P2_e(void *, void *, void *, void *, void *); extern void legendre_P3_e(void *, void *, void *, void *, void *); extern void legendre_Pl_array(void *, void *, void *, void *, void *); extern void legendre_Pl_e(void *, void *, void *, void *, void *, void *); extern void legendre_Plm_e(void *, void *, void *, void *, void *, void *, void *); extern void legendre_Q0_e(void *, void *, void *, void *, void *); extern void legendre_Q1_e(void *, void *, void *, void *, void *); extern void legendre_Ql_e(void *, void *, void *, void *, void *, void *); extern void legendre_sphPlm_e(void *, void *, void *, void *, void *, void *, void *); extern void lnbeta_e(void *, void *, void *, void *, void *, void *); extern void lnchoose_e(void *, void *, void *, void *, void *, void *); extern void lncosh_e(void *, void *, void *, void *, void *); extern void lndoublefact_e(void *, void *, void *, void *, void *); extern void lnfact_e(void *, void *, void *, void *, void *); extern void lngamma_complex_e(void *, void *, void *, void *, void *, void *, void *, void *); extern void lngamma_e(void *, void *, void *, void *, void *); extern void lngamma_sgn_e(void *, void *, void *, void *, void *, void *); extern void lnpoch_e(void *, void *, void *, void *, void *, void *); extern void lnpoch_sgn_e(void *, void *, void *, void *, void *, void *, void *); extern void lnsinh_e(void *, void *, void *, void *, void *); extern void log_1plusx_e(void *, void *, void *, void *, void *); extern void log_1plusx_mx_e(void *, void *, void *, void *, void *); extern void log_abs_e(void *, void *, void *, void *, void *); extern void log_e(void *, void *, void *, void *, void *); extern void log_erfc_e(void *, void *, void *, void *, void *, void *); extern void poch_e(void *, void *, void *, void *, void *, void *); extern void pochrel_e(void *, void *, void *, void *, void *, void *); extern void pow_int(void *, void *, void *, void *, void *, void *); extern void psi(void *, void *, void *, void *, void *); extern void psi_1(void *, void *, void *, void *, void *); extern void psi_1_int(void *, void *, void *, void *, void *); extern void psi_1piy(void *, void *, void *, void *, void *); extern void psi_int(void *, void *, void *, void *, void *); extern void psi_n(void *, void *, void *, void *, void *, void *); extern void Shi_e(void *, void *, void *, void *, void *); extern void Si_e(void *, void *, void *, void *, void *); extern void sin_e(void *, void *, void *, void *, void *); extern void sinc_e(void *, void *, void *, void *, void *); extern void synchrotron_1(void *, void *, void *, void *, void *); extern void synchrotron_2(void *, void *, void *, void *, void *); extern void taylorcoeff_e(void *, void *, void *, void *, void *, void *); extern void transport_2(void *, void *, void *, void *, void *); extern void transport_3(void *, void *, void *, void *, void *); extern void transport_4(void *, void *, void *, void *, void *); extern void transport_5(void *, void *, void *, void *, void *); extern void zeta(void *, void *, void *, void *, void *); extern void zeta_int(void *, void *, void *, void *, void *); extern void zetam1(void *, void *, void *, void *, void *); extern void zetam1_int(void *, void *, void *, void *, void *); /* .Call calls */ extern SEXP get_n(SEXP, SEXP); extern SEXP qrng_alloc(SEXP, SEXP); extern SEXP qrng_clone(SEXP); extern SEXP qrng_init(SEXP); extern SEXP qrng_name(SEXP); extern SEXP qrng_size(SEXP); extern SEXP rng_alloc(SEXP); extern SEXP rng_clone(SEXP); extern SEXP rng_get(SEXP, SEXP); extern SEXP rng_max(SEXP); extern SEXP rng_min(SEXP); extern SEXP rng_name(SEXP); extern SEXP rng_set(SEXP, SEXP); extern SEXP rng_uniform(SEXP, SEXP); extern SEXP rng_uniform_int(SEXP, SEXP, SEXP); extern SEXP rng_uniform_pos(SEXP, SEXP); static const R_CMethodDef CEntries[] = { {"airy_Ai_deriv_e", (DL_FUNC) &airy_Ai_deriv_e, 6}, {"airy_Ai_deriv_scaled_e", (DL_FUNC) &airy_Ai_deriv_scaled_e, 6}, {"airy_Ai_e", (DL_FUNC) &airy_Ai_e, 6}, {"airy_Ai_scaled_e", (DL_FUNC) &airy_Ai_scaled_e, 6}, {"airy_Bi_deriv_e", (DL_FUNC) &airy_Bi_deriv_e, 6}, {"airy_Bi_deriv_scaled_e", (DL_FUNC) &airy_Bi_deriv_scaled_e, 6}, {"airy_Bi_e", (DL_FUNC) &airy_Bi_e, 6}, {"airy_Bi_scaled_e", (DL_FUNC) &airy_Bi_scaled_e, 6}, {"airy_zero_Ai_deriv_e", (DL_FUNC) &airy_zero_Ai_deriv_e, 5}, {"airy_zero_Ai_e", (DL_FUNC) &airy_zero_Ai_e, 5}, {"airy_zero_Bi_deriv_e", (DL_FUNC) &airy_zero_Bi_deriv_e, 5}, {"airy_zero_Bi_e", (DL_FUNC) &airy_zero_Bi_e, 5}, {"atanint_e", (DL_FUNC) &atanint_e, 5}, {"bessel_I0_e", (DL_FUNC) &bessel_I0_e, 5}, {"bessel_i0_scaled_e", (DL_FUNC) &bessel_i0_scaled_e, 5}, {"bessel_I0_scaled_e", (DL_FUNC) &bessel_I0_scaled_e, 5}, {"bessel_I1_e", (DL_FUNC) &bessel_I1_e, 5}, {"bessel_i1_scaled_e", (DL_FUNC) &bessel_i1_scaled_e, 5}, {"bessel_I1_scaled_e", (DL_FUNC) &bessel_I1_scaled_e, 5}, {"bessel_i2_scaled_e", (DL_FUNC) &bessel_i2_scaled_e, 5}, {"bessel_il_scaled_array_e", (DL_FUNC) &bessel_il_scaled_array_e, 5}, {"bessel_il_scaled_e", (DL_FUNC) &bessel_il_scaled_e, 6}, {"bessel_In_array_e", (DL_FUNC) &bessel_In_array_e, 6}, {"bessel_In_e", (DL_FUNC) &bessel_In_e, 6}, {"bessel_In_scaled_array_e", (DL_FUNC) &bessel_In_scaled_array_e, 6}, {"bessel_In_scaled_e", (DL_FUNC) &bessel_In_scaled_e, 6}, {"bessel_Inu_e", (DL_FUNC) &bessel_Inu_e, 6}, {"bessel_Inu_scaled_e", (DL_FUNC) &bessel_Inu_scaled_e, 6}, {"bessel_j0_e", (DL_FUNC) &bessel_j0_e, 5}, {"bessel_J0_e", (DL_FUNC) &bessel_J0_e, 5}, {"bessel_j1_e", (DL_FUNC) &bessel_j1_e, 5}, {"bessel_J1_e", (DL_FUNC) &bessel_J1_e, 5}, {"bessel_j2_e", (DL_FUNC) &bessel_j2_e, 5}, {"bessel_jl_array_e", (DL_FUNC) &bessel_jl_array_e, 5}, {"bessel_jl_e", (DL_FUNC) &bessel_jl_e, 6}, {"bessel_jl_steed_array_e", (DL_FUNC) &bessel_jl_steed_array_e, 5}, {"bessel_Jn_array_e", (DL_FUNC) &bessel_Jn_array_e, 6}, {"bessel_Jn_e", (DL_FUNC) &bessel_Jn_e, 6}, {"bessel_Jnu_e", (DL_FUNC) &bessel_Jnu_e, 6}, {"bessel_K0_e", (DL_FUNC) &bessel_K0_e, 5}, {"bessel_k0_scaled_e", (DL_FUNC) &bessel_k0_scaled_e, 5}, {"bessel_K0_scaled_e", (DL_FUNC) &bessel_K0_scaled_e, 5}, {"bessel_K1_e", (DL_FUNC) &bessel_K1_e, 5}, {"bessel_k1_scaled_e", (DL_FUNC) &bessel_k1_scaled_e, 5}, {"bessel_K1_scaled_e", (DL_FUNC) &bessel_K1_scaled_e, 5}, {"bessel_k2_scaled_e", (DL_FUNC) &bessel_k2_scaled_e, 5}, {"bessel_kl_scaled_array_e", (DL_FUNC) &bessel_kl_scaled_array_e, 5}, {"bessel_kl_scaled_e", (DL_FUNC) &bessel_kl_scaled_e, 6}, {"bessel_Kn_array_e", (DL_FUNC) &bessel_Kn_array_e, 6}, {"bessel_Kn_e", (DL_FUNC) &bessel_Kn_e, 6}, {"bessel_Kn_scaled_array_e", (DL_FUNC) &bessel_Kn_scaled_array_e, 6}, {"bessel_Kn_scaled_e", (DL_FUNC) &bessel_Kn_scaled_e, 6}, {"bessel_Knu_e", (DL_FUNC) &bessel_Knu_e, 6}, {"bessel_Knu_scaled_e", (DL_FUNC) &bessel_Knu_scaled_e, 6}, {"bessel_lnKnu_e", (DL_FUNC) &bessel_lnKnu_e, 6}, {"bessel_sequence_Jnu_e", (DL_FUNC) &bessel_sequence_Jnu_e, 5}, {"bessel_y0_e", (DL_FUNC) &bessel_y0_e, 5}, {"bessel_Y0_e", (DL_FUNC) &bessel_Y0_e, 5}, {"bessel_y1_e", (DL_FUNC) &bessel_y1_e, 5}, {"bessel_Y1_e", (DL_FUNC) &bessel_Y1_e, 5}, {"bessel_y2_e", (DL_FUNC) &bessel_y2_e, 5}, {"bessel_yl_array_e", (DL_FUNC) &bessel_yl_array_e, 5}, {"bessel_yl_e", (DL_FUNC) &bessel_yl_e, 6}, {"bessel_Yn_array_e", (DL_FUNC) &bessel_Yn_array_e, 6}, {"bessel_Yn_e", (DL_FUNC) &bessel_Yn_e, 6}, {"bessel_Ynu_e", (DL_FUNC) &bessel_Ynu_e, 6}, {"bessel_zero_J0_e", (DL_FUNC) &bessel_zero_J0_e, 5}, {"bessel_zero_J1_e", (DL_FUNC) &bessel_zero_J1_e, 5}, {"bessel_zero_Jnu_e", (DL_FUNC) &bessel_zero_Jnu_e, 6}, {"beta_e", (DL_FUNC) &beta_e, 6}, {"beta_inc_e", (DL_FUNC) &beta_inc_e, 7}, {"Chi_e", (DL_FUNC) &Chi_e, 5}, {"choose_e", (DL_FUNC) &choose_e, 6}, {"Ci_e", (DL_FUNC) &Ci_e, 5}, {"clausen_e", (DL_FUNC) &clausen_e, 5}, {"complex_cos_e", (DL_FUNC) &complex_cos_e, 8}, {"complex_dilog_e", (DL_FUNC) &complex_dilog_e, 8}, {"complex_log_e", (DL_FUNC) &complex_log_e, 8}, {"complex_logsin_e", (DL_FUNC) &complex_logsin_e, 8}, {"complex_sin_e", (DL_FUNC) &complex_sin_e, 8}, {"conicalP_0_e", (DL_FUNC) &conicalP_0_e, 6}, {"conicalP_1_e", (DL_FUNC) &conicalP_1_e, 6}, {"conicalP_cyl_reg_e", (DL_FUNC) &conicalP_cyl_reg_e, 7}, {"conicalP_half_e", (DL_FUNC) &conicalP_half_e, 6}, {"conicalP_mhalf_e", (DL_FUNC) &conicalP_mhalf_e, 6}, {"conicalP_sph_reg_e", (DL_FUNC) &conicalP_sph_reg_e, 7}, {"cos_e", (DL_FUNC) &cos_e, 5}, {"coulomb_CL", (DL_FUNC) &coulomb_CL, 6}, {"coulomb_CL_array", (DL_FUNC) &coulomb_CL_array, 6}, {"coulomb_wave_F_array", (DL_FUNC) &coulomb_wave_F_array, 8}, {"coulomb_wave_FG", (DL_FUNC) &coulomb_wave_FG, 16}, {"coulomb_wave_FG_array", (DL_FUNC) &coulomb_wave_FG_array, 10}, {"coulomb_wave_FGp_array", (DL_FUNC) &coulomb_wave_FGp_array, 12}, {"coulomb_wave_sphF_array", (DL_FUNC) &coulomb_wave_sphF_array, 8}, {"coupling_3j", (DL_FUNC) &coupling_3j, 10}, {"coupling_6j", (DL_FUNC) &coupling_6j, 10}, {"coupling_9j", (DL_FUNC) &coupling_9j, 13}, {"dawson", (DL_FUNC) &dawson, 5}, {"debye_1", (DL_FUNC) &debye_1, 5}, {"debye_2", (DL_FUNC) &debye_2, 5}, {"debye_3", (DL_FUNC) &debye_3, 5}, {"debye_4", (DL_FUNC) &debye_4, 5}, {"dilog_e", (DL_FUNC) &dilog_e, 5}, {"doublefact_e", (DL_FUNC) &doublefact_e, 5}, {"ellint_D_e", (DL_FUNC) &ellint_D_e, 7}, {"ellint_E_e", (DL_FUNC) &ellint_E_e, 7}, {"ellint_Ecomp_e", (DL_FUNC) &ellint_Ecomp_e, 6}, {"ellint_F_e", (DL_FUNC) &ellint_F_e, 7}, {"ellint_Kcomp_e", (DL_FUNC) &ellint_Kcomp_e, 6}, {"ellint_P_e", (DL_FUNC) &ellint_P_e, 8}, {"ellint_RC_e", (DL_FUNC) &ellint_RC_e, 7}, {"ellint_RD_e", (DL_FUNC) &ellint_RD_e, 8}, {"ellint_RF_e", (DL_FUNC) &ellint_RF_e, 8}, {"ellint_RJ_e", (DL_FUNC) &ellint_RJ_e, 9}, {"elljac_e", (DL_FUNC) &elljac_e, 7}, {"erf_e", (DL_FUNC) &erf_e, 6}, {"erf_Q_e", (DL_FUNC) &erf_Q_e, 6}, {"erf_Z_e", (DL_FUNC) &erf_Z_e, 6}, {"erfc_e", (DL_FUNC) &erfc_e, 6}, {"eta", (DL_FUNC) &eta, 5}, {"eta_int", (DL_FUNC) &eta_int, 5}, {"expint_3_e", (DL_FUNC) &expint_3_e, 5}, {"expint_E1_e", (DL_FUNC) &expint_E1_e, 5}, {"expint_E2_e", (DL_FUNC) &expint_E2_e, 5}, {"expint_Ei_e", (DL_FUNC) &expint_Ei_e, 5}, {"expint_En_e", (DL_FUNC) &expint_En_e, 6}, {"fact_e", (DL_FUNC) &fact_e, 5}, {"fermi_dirac_0", (DL_FUNC) &fermi_dirac_0, 5}, {"fermi_dirac_1", (DL_FUNC) &fermi_dirac_1, 5}, {"fermi_dirac_2", (DL_FUNC) &fermi_dirac_2, 5}, {"fermi_dirac_3half", (DL_FUNC) &fermi_dirac_3half, 5}, {"fermi_dirac_half", (DL_FUNC) &fermi_dirac_half, 5}, {"fermi_dirac_inc_0", (DL_FUNC) &fermi_dirac_inc_0, 6}, {"fermi_dirac_int", (DL_FUNC) &fermi_dirac_int, 6}, {"fermi_dirac_m1", (DL_FUNC) &fermi_dirac_m1, 5}, {"fermi_dirac_mhalf", (DL_FUNC) &fermi_dirac_mhalf, 5}, {"gamma_e", (DL_FUNC) &gamma_e, 5}, {"gamma_inc_e", (DL_FUNC) &gamma_inc_e, 6}, {"gamma_inc_P_e", (DL_FUNC) &gamma_inc_P_e, 6}, {"gamma_inc_Q_e", (DL_FUNC) &gamma_inc_Q_e, 6}, {"gammainv_e", (DL_FUNC) &gammainv_e, 5}, {"gammastar_e", (DL_FUNC) &gammastar_e, 5}, {"gegenpoly_1_e", (DL_FUNC) &gegenpoly_1_e, 6}, {"gegenpoly_2_e", (DL_FUNC) &gegenpoly_2_e, 6}, {"gegenpoly_3_e", (DL_FUNC) &gegenpoly_3_e, 6}, {"gegenpoly_array", (DL_FUNC) &gegenpoly_array, 6}, {"gegenpoly_n_e", (DL_FUNC) &gegenpoly_n_e, 7}, {"gsl_poly", (DL_FUNC) &gsl_poly, 5}, {"hazard_e", (DL_FUNC) &hazard_e, 6}, {"hydrogenicR", (DL_FUNC) &hydrogenicR, 8}, {"hydrogenicR_1", (DL_FUNC) &hydrogenicR_1, 6}, {"hyperg_0F1_e", (DL_FUNC) &hyperg_0F1_e, 6}, {"hyperg_1F1_e", (DL_FUNC) &hyperg_1F1_e, 7}, {"hyperg_1F1_int_e", (DL_FUNC) &hyperg_1F1_int_e, 7}, {"hyperg_2F0_e", (DL_FUNC) &hyperg_2F0_e, 7}, {"hyperg_2F1_conj_e", (DL_FUNC) &hyperg_2F1_conj_e, 8}, {"hyperg_2F1_conj_renorm_e", (DL_FUNC) &hyperg_2F1_conj_renorm_e, 8}, {"hyperg_2F1_e", (DL_FUNC) &hyperg_2F1_e, 8}, {"hyperg_2F1_renorm_e", (DL_FUNC) &hyperg_2F1_renorm_e, 8}, {"hyperg_U_e", (DL_FUNC) &hyperg_U_e, 7}, {"hyperg_U_int_e", (DL_FUNC) &hyperg_U_int_e, 7}, {"hypot_e", (DL_FUNC) &hypot_e, 6}, {"hzeta", (DL_FUNC) &hzeta, 6}, {"laguerre_1", (DL_FUNC) &laguerre_1, 6}, {"laguerre_2", (DL_FUNC) &laguerre_2, 6}, {"laguerre_3", (DL_FUNC) &laguerre_3, 6}, {"laguerre_n", (DL_FUNC) &laguerre_n, 7}, {"lambert_W0", (DL_FUNC) &lambert_W0, 5}, {"lambert_Wm1", (DL_FUNC) &lambert_Wm1, 5}, {"legendre_array", (DL_FUNC) &legendre_array, 6}, {"legendre_array_index", (DL_FUNC) &legendre_array_index, 3}, {"legendre_array_n", (DL_FUNC) &legendre_array_n, 2}, {"legendre_deriv_alt_array", (DL_FUNC) &legendre_deriv_alt_array, 7}, {"legendre_deriv_array", (DL_FUNC) &legendre_deriv_array, 7}, {"legendre_deriv2_alt_array", (DL_FUNC) &legendre_deriv2_alt_array, 8}, {"legendre_deriv2_array", (DL_FUNC) &legendre_deriv2_array, 8}, {"legendre_H3d_0_e", (DL_FUNC) &legendre_H3d_0_e, 6}, {"legendre_H3d_1_e", (DL_FUNC) &legendre_H3d_1_e, 6}, {"legendre_H3d_array", (DL_FUNC) &legendre_H3d_array, 6}, {"legendre_H3d_e", (DL_FUNC) &legendre_H3d_e, 7}, {"legendre_P1_e", (DL_FUNC) &legendre_P1_e, 5}, {"legendre_P2_e", (DL_FUNC) &legendre_P2_e, 5}, {"legendre_P3_e", (DL_FUNC) &legendre_P3_e, 5}, {"legendre_Pl_array", (DL_FUNC) &legendre_Pl_array, 5}, {"legendre_Pl_e", (DL_FUNC) &legendre_Pl_e, 6}, {"legendre_Plm_e", (DL_FUNC) &legendre_Plm_e, 7}, {"legendre_Q0_e", (DL_FUNC) &legendre_Q0_e, 5}, {"legendre_Q1_e", (DL_FUNC) &legendre_Q1_e, 5}, {"legendre_Ql_e", (DL_FUNC) &legendre_Ql_e, 6}, {"legendre_sphPlm_e", (DL_FUNC) &legendre_sphPlm_e, 7}, {"lnbeta_e", (DL_FUNC) &lnbeta_e, 6}, {"lnchoose_e", (DL_FUNC) &lnchoose_e, 6}, {"lncosh_e", (DL_FUNC) &lncosh_e, 5}, {"lndoublefact_e", (DL_FUNC) &lndoublefact_e, 5}, {"lnfact_e", (DL_FUNC) &lnfact_e, 5}, {"lngamma_complex_e", (DL_FUNC) &lngamma_complex_e, 8}, {"lngamma_e", (DL_FUNC) &lngamma_e, 5}, {"lngamma_sgn_e", (DL_FUNC) &lngamma_sgn_e, 6}, {"lnpoch_e", (DL_FUNC) &lnpoch_e, 6}, {"lnpoch_sgn_e", (DL_FUNC) &lnpoch_sgn_e, 7}, {"lnsinh_e", (DL_FUNC) &lnsinh_e, 5}, {"log_1plusx_e", (DL_FUNC) &log_1plusx_e, 5}, {"log_1plusx_mx_e", (DL_FUNC) &log_1plusx_mx_e, 5}, {"log_abs_e", (DL_FUNC) &log_abs_e, 5}, {"log_e", (DL_FUNC) &log_e, 5}, {"log_erfc_e", (DL_FUNC) &log_erfc_e, 6}, {"poch_e", (DL_FUNC) &poch_e, 6}, {"pochrel_e", (DL_FUNC) &pochrel_e, 6}, {"pow_int", (DL_FUNC) &pow_int, 6}, {"psi", (DL_FUNC) &psi, 5}, {"psi_1", (DL_FUNC) &psi_1, 5}, {"psi_1_int", (DL_FUNC) &psi_1_int, 5}, {"psi_1piy", (DL_FUNC) &psi_1piy, 5}, {"psi_int", (DL_FUNC) &psi_int, 5}, {"psi_n", (DL_FUNC) &psi_n, 6}, {"Shi_e", (DL_FUNC) &Shi_e, 5}, {"Si_e", (DL_FUNC) &Si_e, 5}, {"sin_e", (DL_FUNC) &sin_e, 5}, {"sinc_e", (DL_FUNC) &sinc_e, 5}, {"synchrotron_1", (DL_FUNC) &synchrotron_1, 5}, {"synchrotron_2", (DL_FUNC) &synchrotron_2, 5}, {"taylorcoeff_e", (DL_FUNC) &taylorcoeff_e, 6}, {"transport_2", (DL_FUNC) &transport_2, 5}, {"transport_3", (DL_FUNC) &transport_3, 5}, {"transport_4", (DL_FUNC) &transport_4, 5}, {"transport_5", (DL_FUNC) &transport_5, 5}, {"zeta", (DL_FUNC) &zeta, 5}, {"zeta_int", (DL_FUNC) &zeta_int, 5}, {"zetam1", (DL_FUNC) &zetam1, 5}, {"zetam1_int", (DL_FUNC) &zetam1_int, 5}, {NULL, NULL, 0} }; static const R_CallMethodDef CallEntries[] = { {"get_n", (DL_FUNC) &get_n, 2}, {"qrng_alloc", (DL_FUNC) &qrng_alloc, 2}, {"qrng_clone", (DL_FUNC) &qrng_clone, 1}, {"qrng_init", (DL_FUNC) &qrng_init, 1}, {"qrng_name", (DL_FUNC) &qrng_name, 1}, {"qrng_size", (DL_FUNC) &qrng_size, 1}, {"rng_alloc", (DL_FUNC) &rng_alloc, 1}, {"rng_clone", (DL_FUNC) &rng_clone, 1}, {"rng_get", (DL_FUNC) &rng_get, 2}, {"rng_max", (DL_FUNC) &rng_max, 1}, {"rng_min", (DL_FUNC) &rng_min, 1}, {"rng_name", (DL_FUNC) &rng_name, 1}, {"rng_set", (DL_FUNC) &rng_set, 2}, {"rng_uniform", (DL_FUNC) &rng_uniform, 2}, {"rng_uniform_int", (DL_FUNC) &rng_uniform_int, 3}, {"rng_uniform_pos", (DL_FUNC) &rng_uniform_pos, 2}, {NULL, NULL, 0} }; void R_init_gsl(DllInfo *dll) { R_registerRoutines(dll, CEntries, CallEntries, NULL, NULL); R_useDynamicSymbols(dll, FALSE); } gsl/src/vector.h0000644000176200001440000000062115103324656013305 0ustar liggesusers/* Conversion between GSL vectors and R vectors. * * Written in 2007 by Andrew Clausen */ #ifndef RGSL_VECTOR_H #define RGSL_VECTOR_H #include #include #include extern gsl_vector *vector_gsl_from_R(SEXP x); extern SEXP vector_R_from_gsl(const gsl_vector *x); extern void vector_assign_gsl_from_R(gsl_vector *x, SEXP y); #endif gsl/src/bessel.c0000644000176200001440000004112315103324656013255 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_bessel_J0 goes to bessel_J0. */ static int sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; /* J series begins*/ void bessel_J0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_J0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_J1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_J1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Jn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* J series ends*/ /* Y series begins*/ void bessel_Y0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Y1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Yn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Yn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i=0 ; i< *len ; i++){ status[i] = gsl_sf_bessel_Yn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* Y series ends*/ /* I series begins*/ void bessel_I0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_I1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /*I series ends*/ /* I_scaled series begins*/ void bessel_I0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } /* J series begins*/ /* J series begins*/ void bessel_I1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_I1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_In_scaled_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_In_scaled_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* I_scaled series begins*/ /* K series begins*/ void bessel_K0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* K series ends*/ /* K_scaled series begins*/ void bessel_K0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_K1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_K1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_e(int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_scaled_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Kn_scaled_array_e(const int *nmin, const int *nmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Kn_scaled_array(*nmin, *nmax, x[i], out+i*(*nmax - *nmin +1)); } } /* K_scaled series ends */ /* j0 series begins */ void bessel_j0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_j2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_j2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_jl_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_array(*lmax, x[i], out+i*(*lmax+1)); } } void bessel_jl_steed_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_jl_steed_array(*lmax, x[i], out+i*(*lmax+1)); } } void bessel_y0_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_y2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_y2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_yl_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_yl_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_yl_array(*lmax, x[i], out+i*(*lmax+1)); } } /* yl series ends */ /* i_scaled series starts */ void bessel_i0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_i2_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_i2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_il_scaled_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_il_scaled_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_il_scaled_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_il_scaled_array(*lmax, x[i], out+i*(*lmax +1)); } } /* i_scaled series ends */ /* k_scaled series starts */ void bessel_k0_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k0_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k1_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k1_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_k2_scaled_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_k2_scaled_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_kl_scaled_e(int *l, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_kl_scaled_e(l[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_kl_scaled_array_e(int *lmax, const double *x, const int *len, double *out, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_kl_scaled_array(*lmax, x[i], out+i*(*lmax +1)); } } /*k_scaled series ends */ /*Jnu series starts */ void bessel_Jnu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Jnu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_sequence_Jnu_e(double *nu, double *v, int *nv, int *mode, int *status) { gsl_set_error_handler_off(); *status=gsl_sf_bessel_sequence_Jnu_e(*nu, sf_mode[*mode], (size_t) *nv, v); } void bessel_Ynu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Ynu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Inu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Inu_scaled_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Inu_scaled_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Knu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_lnKnu_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_lnKnu_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_Knu_scaled_e(double *nu, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_Knu_scaled_e(nu[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_J0_e(unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_J0_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_J1_e(unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_J1_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void bessel_zero_Jnu_e(double *nu, unsigned int *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_bessel_zero_Jnu_e(nu[i], s[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/fermi_dirac.c0000644000176200001440000000553215103324656014250 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_fermi_dirac_m1_e goes to fermi_dirac_m1. */ void fermi_dirac_m1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_m1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_0(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_0_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_int(const int *j, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_int_e(j[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_mhalf(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_mhalf_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_half(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_3half(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_3half_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fermi_dirac_inc_0(const double *x, double *b, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fermi_dirac_inc_0_e(x[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/zeta.c0000644000176200001440000000414415103324656012745 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_zeta_int_e goes to zeta. */ void zeta_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zeta_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zeta(double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zeta_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zetam1_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zetam1_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void zetam1(const double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_zetam1_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hzeta(const double *s, const double *q, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hzeta_e(s[i], q[i], &result) ; val[i] = result.val; err[i] = result.err; } } void eta_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_eta_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void eta(const double *s, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_eta_e(s[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/Makevars.in0000644000176200001440000000031615103324656013734 0ustar liggesusers# Kindly supplied by Dirk Eddelbuettel # set by configure GSL_CFLAGS = @GSL_CFLAGS@ GSL_LIBS = @GSL_LIBS@ # combine to standard arguments for R PKG_CPPFLAGS = $(GSL_CFLAGS) -I. PKG_LIBS = $(GSL_LIBS) gsl/src/coupling.c0000644000176200001440000000315015103324656013616 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_debye_1_e goes to debye_1. */ void coupling_3j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_ma, const int *two_mb, const int *two_mc, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_3j_e(two_ja[i], two_jb[i], two_jc[i], two_ma[i], two_mb[i], two_mc[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coupling_6j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_jd, const int *two_je, const int *two_jf, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_6j_e(two_ja[i], two_jb[i], two_jc[i], two_jd[i], two_je[i], two_jf[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coupling_9j(const int *two_ja, const int *two_jb, const int *two_jc, const int *two_jd, const int *two_je, const int *two_jf, const int *two_jg, const int *two_jh, const int *two_ji, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coupling_9j_e(two_ja[i], two_jb[i], two_jc[i], two_jd[i], two_je[i], two_jf[i], two_jg[i], two_jh[i], two_ji[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/synchrotron.c0000644000176200001440000000142415103324656014370 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_synchrotron goes to synchrotron. */ void synchrotron_1(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_synchrotron_1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void synchrotron_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_synchrotron_2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/qrng.c0000644000176200001440000000552315103324656012753 0ustar liggesusers#include #include #include /* function names generated by removing "gsl_" from the beginning of the name. Thus gsl_qrng_alloc goes to qrng_alloc. */ /* type 0 is gsl_qrng_niederreiter_2, type 1 is gsl_qrng_sobol */ static void cleanup(SEXP r) { gsl_qrng_free((gsl_qrng*)R_ExternalPtrAddr(r)); } SEXP qrng_alloc(SEXP type, SEXP dimension) { const gsl_qrng_type * T = NULL; SEXP result; switch(asInteger(type)) { case 0: T = gsl_qrng_niederreiter_2; break; case 1: T = gsl_qrng_sobol; break; default: error("unknown QRNG type"); }; PROTECT(dimension = AS_INTEGER(dimension)); result = R_MakeExternalPtr(gsl_qrng_alloc(T, (unsigned int)asInteger(dimension)), dimension, R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, cleanup); return result; } SEXP qrng_clone(SEXP r) { SEXP result; gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); result = R_MakeExternalPtr(gsl_qrng_clone(gen), PROTECT(duplicate(R_ExternalPtrTag(r))), R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, cleanup); return result; } SEXP qrng_init(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); gsl_qrng_init(gen); return r; } SEXP qrng_name(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); return mkString(gsl_qrng_name(gen)); } SEXP qrng_size(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); return ScalarInteger(gsl_qrng_size(gen)); } SEXP qrng_state(SEXP r) { gsl_qrng *gen = NULL; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); return R_MakeExternalPtr(gsl_qrng_state(gen), R_NilValue, R_NilValue); } SEXP qrng_get(SEXP r) { SEXP result; gsl_qrng *gen = NULL; int dim; if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); dim = asInteger(R_ExternalPtrTag(r)); result = PROTECT(NEW_NUMERIC(dim)); if (gsl_qrng_get(gen, REAL(result)) != GSL_SUCCESS) error("QRNG generator failed"); UNPROTECT(1); return result; } SEXP get_n(SEXP r, SEXP n) { SEXP result; gsl_qrng *gen = NULL; double *value; int i, dim, num = asInteger(n); if (TYPEOF(r) != EXTPTRSXP || !(gen = (gsl_qrng*)R_ExternalPtrAddr(r))) error("not a QRNG generator"); dim = asInteger(R_ExternalPtrTag(r)); result = PROTECT(NEW_NUMERIC(dim*num)); value = REAL(result); for (i=0; i #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_gamma_e goes to gamma_e. */ void gamma_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_sgn_e(const double *x, const int *len, double *val, double *err, int *status, double *sgn) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_sgn_e(x[i], &result, sgn+i) ; val[i] = result.val; err[i] = result.err; } } void gammastar_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gammastar_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gammainv_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gammainv_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lngamma_complex_e(const double *zr, const double *zi, const int *len, double *val_lnr, double *val_arg, double *err_lnr, double *err_arg, int *status) { int i; gsl_sf_result lnr; gsl_sf_result arg; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lngamma_complex_e(zr[i], zi[i], &lnr, &arg) ; val_lnr[i] = lnr.val; val_arg[i] = arg.val; err_lnr[i] = lnr.err; err_arg[i] = arg.err; } } void taylorcoeff_e(const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_taylorcoeff_e(n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void fact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_fact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void doublefact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_doublefact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnfact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnfact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lndoublefact_e(const unsigned int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lndoublefact_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void choose_e(const unsigned int *n, unsigned int *m, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_choose_e(n[i], m[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnchoose_e(const unsigned int *n, unsigned int *m, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_choose_e(n[i], m[i], &result) ; val[i] = result.val; err[i] = result.err; } } void poch_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_poch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnpoch_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnpoch_sgn_e(const double *a, const double *x, const int *len, double *val, double *err, int *status, double *sgn) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnpoch_sgn_e(a[i], x[i], &result, sgn+i) ; val[i] = result.val; err[i] = result.err; } } void pochrel_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_pochrel_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_P_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_P_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_Q_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_Q_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gamma_inc_e(const double *a, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gamma_inc_e(a[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void beta_e(const double *a, const double *b, int *nb, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *nb ; i++){ status[i] = gsl_sf_beta_e(a[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } void lnbeta_e(const double *a, const double *b, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_lnbeta_e(a[i], b[i], &result) ; val[i] = result.val; err[i] = result.err; } } void beta_inc_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_beta_inc_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/gegenbauer.c0000644000176200001440000000340215103324656014102 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_gegenpoly_1_e goes to gegenpoly_1_e. */ void gegenpoly_1_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_1_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_2_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_2_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_3_e(const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_3_e(lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_n_e(const int *n, const double *lambda, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_n_e(*n, lambda[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void gegenpoly_array(const int *nmax, const double *lambda, const double *x, const int *len, double *out, int *status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_gegenpoly_array(*nmax, lambda[i], x[i], out+i*(*nmax+1) ) ; } } gsl/src/elljac.c0000644000176200001440000000067315103324656013237 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void elljac_e(const double *u, const double *m, const int *len, double *sn, double *cn, double *dn, int *status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_elljac_e(u[i], m[i], sn+i, cn+i, dn+i); } } gsl/src/rng.c0000644000176200001440000001006115103324656012563 0ustar liggesusers#include #include #include #include static void rng_cleanup(SEXP r) { gsl_rng_free((gsl_rng*)R_ExternalPtrAddr(r)); } gsl_rng* get_rng_from_sexp(SEXP rng) { gsl_rng* gen = NULL; if (TYPEOF(rng) != EXTPTRSXP || !(gen = (gsl_rng*)R_ExternalPtrAddr(rng))) { error("not a random number generator"); } /* if gen is NULL here, this will probably cause a segfault */ return gen; } SEXP rng_alloc(SEXP type) { const gsl_rng_type * T = NULL; SEXP result; switch(asInteger(type)) { case 0: T = gsl_rng_mt19937; break; case 1: T = gsl_rng_ranlxs0; break; case 2: T = gsl_rng_ranlxs1; break; case 3: T = gsl_rng_ranlxs2; break; case 4: T = gsl_rng_ranlxd1; break; case 5: T = gsl_rng_ranlxd2; break; case 6: T = gsl_rng_ranlux; break; case 7: T = gsl_rng_ranlux389; break; case 8: T = gsl_rng_cmrg; break; case 9: T = gsl_rng_mrg; break; case 10: T = gsl_rng_taus; break; case 11: T = gsl_rng_taus2; break; case 12: T = gsl_rng_gfsr4; break; case 13: T = gsl_rng_minstd; break; default: error("unknown random number generator type"); }; result = R_MakeExternalPtr(gsl_rng_alloc(T), R_NilValue, R_NilValue) ; R_RegisterCFinalizer(result, rng_cleanup); return result; } SEXP rng_set(SEXP r, SEXP sseed) { unsigned long int seed; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(sseed = AS_NUMERIC(sseed)); seed = *(NUMERIC_POINTER(sseed)); UNPROTECT(1); gsl_rng_set(gen, seed); return sseed; } SEXP rng_clone(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); result = R_MakeExternalPtr(gsl_rng_clone(gen), PROTECT(duplicate(R_ExternalPtrTag(r))), R_NilValue); UNPROTECT(1); R_RegisterCFinalizer(result, rng_cleanup); return result; } SEXP rng_name(SEXP r) { gsl_rng* gen; gen = get_rng_from_sexp(r); return mkString(gsl_rng_name(gen)); } SEXP rng_min(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(result = NEW_NUMERIC(1)); NUMERIC_POINTER(result)[0] = gsl_rng_min(gen); UNPROTECT(1); return result; } SEXP rng_max(SEXP r) { SEXP result; gsl_rng* gen; gen = get_rng_from_sexp(r); PROTECT(result = NEW_NUMERIC(1)); NUMERIC_POINTER(result)[0] = gsl_rng_max(gen); UNPROTECT(1); return result; } SEXP rng_get(SEXP r, SEXP slength) { SEXP result; gsl_rng* gen; int length, i; /* parse args */ gen = get_rng_from_sexp(r); PROTECT(slength = AS_NUMERIC(slength)); length = (int)*(NUMERIC_POINTER(slength)); UNPROTECT(1); /* get draws */ PROTECT(result = NEW_NUMERIC(length)); for(i = 0; i #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. */ static int sf_mode[] = { GSL_PREC_DOUBLE, GSL_PREC_SINGLE, GSL_PREC_APPROX } ; void airy_Ai_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_deriv_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_deriv_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_deriv_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_deriv_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Ai_deriv_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Ai_deriv_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_Bi_deriv_scaled_e(const double *x, const int *len, const int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ status[i] = gsl_sf_airy_Bi_deriv_scaled_e(x[i], sf_mode[*mode], &result) ; val[i] = result.val; err[i] = result.err; } } void airy_zero_Ai_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Ai_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Bi_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Bi_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Ai_deriv_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Ai_deriv_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } void airy_zero_Bi_deriv_e(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; for(i = 0; i< *len ; i++){ if(n[i]>0){ status[i] = gsl_sf_airy_zero_Bi_deriv_e(n[i], &result) ; } else { result.val=0.0; result.err=GSL_EDOM; } val[i] = result.val; err[i] = result.err; } } gsl/src/transport.c0000644000176200001440000000250615103324656014036 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_transport goes to transport. */ void transport_2(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_2_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_3(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_3_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_4(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_4_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void transport_5(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_transport_5_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/coulomb.c0000644000176200001440000000737015103324656013446 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. */ void hydrogenicR_1(const double *Z, const double *r, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hydrogenicR_1_e(Z[i], r[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hydrogenicR(const int *n, const int *l, const double *Z, const double *r, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hydrogenicR_e(n[i], l[i], Z[i], r[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coulomb_wave_FG(const double *eta, const double *x, const double *L_F, const int *k, const int *len, double *val_F , double *err_F , double *val_Fp , double *err_Fp , double *val_G , double *err_G , double *val_Gp , double *err_Gp , double *exp_F , double *exp_G , int *status) { int i; gsl_sf_result F; gsl_sf_result Fp; gsl_sf_result G; gsl_sf_result Gp; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FG_e(eta[i], x[i], L_F[i], k[i], &F, &Fp, &G, &Gp, exp_F+i, exp_G+i); val_F[i] = F.val; err_F[i] = F.err; val_Fp[i] = Fp.val; err_Fp[i] = Fp.err; val_G[i] = G.val; err_G[i] = G.err; val_Gp[i] = Gp.val; err_Gp[i] = Gp.err; } } void coulomb_wave_F_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *F_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_F_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), F_exponent+i); } } void coulomb_wave_FG_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *gc_array, double *F_exponent, double *G_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FG_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), gc_array+i*(*kmax+1), F_exponent+i, G_exponent+i); } } void coulomb_wave_FGp_array(const double *L_min, const int *kmax, const double *eta, const double *x, const int *len, double *fc_array, double *fcp_array, double *gc_array, double *gcp_array, double *F_exponent, double *G_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_FGp_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), fcp_array+i*(*kmax+1), gc_array+i*(*kmax+1), gcp_array+i*(*kmax+1), F_exponent+i, G_exponent+i); } } void coulomb_wave_sphF_array(const double *L_min, const int *kmax, const double *eta, double *x, const int *len, double *fc_array, double *F_exponent, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_wave_sphF_array(*L_min, *kmax, eta[i], x[i], fc_array+i*(*kmax+1), F_exponent+i); } } void coulomb_CL(const double *L, const double *eta, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_CL_e(L[i], eta[i], &result) ; val[i] = result.val; err[i] = result.err; } } void coulomb_CL_array(const double *L_min, const int *kmax, const double *eta, const int *len, double *cl, int* status) { int i; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_coulomb_CL_array(*L_min, *kmax, eta[i], cl+i*(*kmax+1)); } } gsl/src/error.c0000644000176200001440000000360515103324656013134 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_airy_Ai goes to airy_Ai. */ void erf_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erfc_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erfc_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void log_erfc_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_log_erfc_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erf_Z_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_Z_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void erf_Q_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_erf_Q_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hazard_e(const double *x, const int *len, int *mode, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hazard_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/psi.c0000644000176200001440000000351515103324656012576 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name and _e from the end. Thus gsl_sf_psi_1_e goes to psi_1. */ void psi_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi(double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1piy(double *y, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1piy_e(y[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1_int(const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1_int_e(n[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_1(double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_1_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void psi_n(int *m, double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_psi_n_e(m[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/dilog.c0000644000176200001440000000157215103324656013102 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dilog_e goes to dilog_e. */ void dilog_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_dilog_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void complex_dilog_e(const double *r, const double *theta, const int *len, double *val_re, double *val_im, double *err_re, double *err_im, int *status) { int i; gsl_sf_result re; gsl_sf_result im; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_complex_dilog_e(r[i], theta[i], &re, &im) ; val_re[i] = re.val; val_im[i] = im.val; err_re[i] = re.err; err_im[i] = im.err; } } gsl/src/expint.c0000644000176200001440000000607115103324656013312 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_expint_W0 goes to expint_W0. */ void expint_E1_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_E1_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_E2_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_E2_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_En_e(const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_En_e(n[i], x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_Ei_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_Ei_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Shi_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Shi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Chi_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Chi_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void expint_3_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_expint_3_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Si_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Si_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void Ci_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_Ci_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } void atanint_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_atanint_e(x[i] , &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/pow_int.c0000644000176200001440000000101015103324656013446 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name, and stripping the _e. Thus gsl_sf_laguerre_1_e goes to laguerre_1. */ void pow_int(const double *x, const int *n, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_pow_int_e(x[i], n[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/clausen.c0000644000176200001440000000072515103324656013435 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void clausen_e(const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_clausen_e(x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/src/hyperg.c0000644000176200001440000000705515103324656013304 0ustar liggesusers#include #include /* function names generated by removing "gsl_sf" from the beginning of the name. Thus gsl_sf_dawson goes to dawson. */ void hyperg_0F1_e(const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_0F1_e(c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_int_e(const int *m, const int *n, double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_1F1_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_1F1_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_1F1_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_int_e(const int *m, const int *n, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_U_int_e(m[i], n[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_U_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_U_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_e(const double *a, const double *b, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_e(a[i], b[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_conj_e(const double *aR, const double *aI, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_conj_e(aR[i], aI[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_renorm_e(const double *a, const double *b, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_renorm_e(a[i], b[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F1_conj_renorm_e(const double *aR, const double *aI, const double *c, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F1_conj_renorm_e(aR[i], aI[i], c[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } void hyperg_2F0_e(const double *a, const double *b, const double *x, const int *len, double *val, double *err, int *status) { int i; gsl_sf_result result; gsl_set_error_handler_off(); for(i = 0; i< *len ; i++){ status[i] = gsl_sf_hyperg_2F0_e(a[i], b[i], x[i], &result) ; val[i] = result.val; err[i] = result.err; } } gsl/NAMESPACE0000644000176200001440000001377215103324656012275 0ustar liggesusersexport("airy_Ai") export("airy_Ai_deriv") export("airy_Ai_deriv_scaled") export("airy_Ai_scaled") export("airy_Bi") export("airy_Bi_deriv") export("airy_Bi_deriv_scaled") export("airy_Bi_scaled") export("airy_zero_Ai") export("airy_zero_Ai_deriv") export("airy_zero_Bi") export("airy_zero_Bi_deriv") export("atanint") export("bessel_I0") export("bessel_i0_scaled") export("bessel_I0_scaled") export("bessel_I1") export("bessel_i1_scaled") export("bessel_I1_scaled") export("bessel_i2_scaled") export("bessel_il_scaled") export("bessel_il_scaled_array") export("bessel_In") export("bessel_In_array") export("bessel_In_scaled") export("bessel_In_scaled_array") export("bessel_Inu") export("bessel_Inu_scaled") export("bessel_j0") export("bessel_J0") export("bessel_j1") export("bessel_J1") export("bessel_j2") export("bessel_jl") export("bessel_jl_array") export("bessel_jl_steed_array") export("bessel_Jn") export("bessel_Jn_array") export("bessel_Jnu") export("bessel_K0") export("bessel_k0_scaled") export("bessel_K0_scaled") export("bessel_K1") export("bessel_k1_scaled") export("bessel_K1_scaled") export("bessel_k2_scaled") export("bessel_kl_scaled") export("bessel_kl_scaled_array") export("bessel_Kn") export("bessel_Kn_array") export("bessel_Kn_scaled") export("bessel_Kn_scaled_array") export("bessel_Knu") export("bessel_Knu_scaled") export("bessel_lnKnu") export("bessel_sequence_Jnu") export("bessel_y0") export("bessel_Y0") export("bessel_y1") export("bessel_Y1") export("bessel_y2") export("bessel_yl") export("bessel_yl_array") export("bessel_Yn") export("bessel_Yn_array") export("bessel_Ynu") export("bessel_zero_J0") export("bessel_zero_J1") export("bessel_zero_Jnu") export("beta_inc") export("Chi") export("Ci") export("clausen") export("complex_cos") export("complex_dilog") export("complex_log") export("complex_logsin") export("complex_sin") export("conicalP_0") export("conicalP_1") export("conicalP_cyl_reg") export("conicalP_half") export("conicalP_mhalf") export("conicalP_sph_reg") export("coulomb_CL") export("coulomb_CL_array") export("coulomb_wave_F_array") export("coulomb_wave_FG") export("coulomb_wave_FG_array") export("coulomb_wave_FGp_array") export("coulomb_wave_sphF_array") export("coupling_3j") export("coupling_6j") export("coupling_9j") export("dawson") export("debye_1") export("debye_2") export("debye_3") export("debye_4") export("deprecated_legendre") export("dilog") export("doublefact") export("ellint_D") export("ellint_E") export("ellint_Ecomp") export("ellint_F") export("ellint_Kcomp") export("ellint_P") export("ellint_RC") export("ellint_RD") export("ellint_RF") export("ellint_RJ") export("elljac") export("erf") export("erf_Q") export("erf_Z") export("erfc") export("eta") export("eta_int") export("expint_3") export("expint_E1") export("expint_E2") export("expint_Ei") export("expint_En") export("fact") export("fermi_dirac_0") export("fermi_dirac_1") export("fermi_dirac_2") export("fermi_dirac_3half") export("fermi_dirac_half") export("fermi_dirac_inc_0") export("fermi_dirac_int") export("fermi_dirac_m1") export("fermi_dirac_mhalf") export("gamma_inc") export("gamma_inc_P") export("gamma_inc_Q") export("gammainv") export("gammastar") export("gegenpoly_1") export("gegenpoly_2") export("gegenpoly_3") export("gegenpoly_array") export("gegenpoly_n") export("gsl_cd") export("gsl_cn") export("gsl_cs") export("gsl_dc") export("gsl_dn") export("gsl_ds") export("gsl_nc") export("gsl_nd") export("gsl_ns") export("gsl_poly") export("gsl_sc") export("gsl_sd") export("gsl_sf_beta") export("gsl_sf_choose") export("gsl_sf_cos") export("gsl_sf_gamma") export("gsl_sf_log") export("gsl_sf_sin") export("gsl_sn") export("hazard") export("hydrogenicR") export("hydrogenicR_1") export("hyperg_0F1") export("hyperg_1F1") export("hyperg_1F1_int") export("hyperg_2F0") export("hyperg_2F1") export("hyperg_2F1_conj") export("hyperg_2F1_conj_renorm") export("hyperg_2F1_renorm") export("hyperg_U") export("hyperg_U_int") export("hypot") export("hzeta") export("laguerre_1") export("laguerre_2") export("laguerre_3") export("laguerre_n") export("lambert_W0") export("lambert_Wm1") export("legendre_array") export("legendre_array_index") export("legendre_array_n") export("legendre_array_size") export("legendre_check_args") export("legendre_deriv_alt_array") export("legendre_deriv_array") export("legendre_deriv2_alt_array") export("legendre_deriv2_array") export("legendre_H3d") export("legendre_H3d_0") export("legendre_H3d_1") export("legendre_H3d_array") export("legendre_P1") export("legendre_P2") export("legendre_P3") export("legendre_Pl") export("legendre_Pl_array") export("legendre_Plm") export("legendre_Plm_array") export("legendre_Plm_deriv_array") export("legendre_Q0") export("legendre_Q1") export("legendre_Ql") export("legendre_sphPlm") export("legendre_sphPlm_array") export("legendre_sphPlm_deriv_array") export("lnbeta") export("lnchoose") export("lncosh") export("lndoublefact") export("lnfact") export("lngamma") export("lngamma_complex") export("lngamma_sgn") export("lnpoch") export("lnpoch_sgn") export("lnsinh") export("log_1plusx") export("log_1plusx_mx") export("log_abs") export("log_erfc") export("multimin") export("multimin.fminimizer.size") export("multimin.init") export("multimin.iterate") export("poch") export("pochrel") export("pow_int") export("process.args") export("psi") export("psi_1") export("psi_1_int") export("psi_1piy") export("psi_int") export("psi_n") export("qrng_alloc") export("qrng_clone") export("qrng_get") export("qrng_init") export("qrng_name") export("qrng_size") export("rng_alloc") export("rng_clone") export("rng_get") export("rng_max") export("rng_min") export("rng_name") export("rng_set") export("rng_uniform") export("rng_uniform_int") export("rng_uniform_pos") export("Shi") export("Si") export("sinc") export("sn_cn_dn") export("strictify") export("synchrotron_1") export("synchrotron_2") export("taylorcoeff") export("transport_2") export("transport_3") export("transport_4") export("transport_5") export("zeta") export("zeta_int") export("zetam1") export("zetam1_int") useDynLib(gsl, .registration = TRUE, .fixes= "C_") gsl/NEWS.md0000644000176200001440000000030215103324656012135 0ustar liggesusers# gsl 2.1-9 * replace EXTPTR_PTR with R_ExternalPtrAddr * replace EXTPTR_TAG with R_ExternalPtrTag # gsl 2.1-8 * Corrections to `configure` and `configure.ac` kindly provided by Kurt Hornik gsl/configure.ac0000644000176200001440000000346215103324656013337 0ustar liggesusers AC_INIT # Ensure C++ is set up as R expects : ${R_HOME=`R RHOME`} if test -z "${R_HOME}"; then AC_MSG_ERROR([Could not determine R_HOME.]) fi CC=`"${R_HOME}/bin/R" CMD config CC` CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` AC_PROG_CC AC_CONFIG_SRCDIR([src/airy.c]) #AC_CHECK_LIB(gsl, gsl_sf_airy_Ai_e, # [LIBS="${LIBS} -lgsl -lgslcblas"], # [AC_MSG_ERROR([Cannot find Gnu Scientific Library.])], # [-lgslcblas]) #AC_CHECK_HEADER([gsl/gsl_version.h], , # [AC_MSG_ERROR([Cannot find GSL headers.])]) # Following lines kindly supplied by Dirk Eddelbuettel ## Use gsl-config to find arguments for compiler and linker flags ## ## Check for non-standard programs: gsl-config(1) AC_PATH_PROG([GSL_CONFIG], [gsl-config]) ## If gsl-config was found, let's use it if test "${GSL_CONFIG}" != ""; then # Use gsl-config for header and linker arguments GSL_CFLAGS=`${GSL_CONFIG} --cflags` GSL_LIBS=`${GSL_CONFIG} --libs` CFLAGS="$CFLAGS $GSL_CFLAGS" # kindly supplied by Ray Brownrigg else AC_MSG_ERROR([gsl-config not found, is GSL installed?]) fi AC_MSG_CHECKING([if GSL version >= 2.5]) AC_RUN_IFELSE([AC_LANG_SOURCE([[ #include #include #include #include int main() { #ifdef GSL_VERSION int major, minor; char *gslv = GSL_VERSION; if ((sscanf(gslv, "%d.%d", &major, &minor)) != 2) { exit (1); } exit (minor < 5); exit (major < 2); #else exit(1); #endif } ]])], [gsl_version_ok=yes], [gsl_version_ok=no], [gsl_version_ok=yes]) if test "${gsl_version_ok}" = no; then AC_MSG_ERROR([Need GSL version >= 2.5]) else AC_MSG_RESULT([yes]) fi # Now substitute these variables in src/Makevars.in to create src/Makevars AC_SUBST(GSL_CFLAGS) AC_SUBST(GSL_LIBS) AC_CONFIG_FILES([src/Makevars]) AC_OUTPUT gsl/inst/0000755000176200001440000000000015104317411012011 5ustar liggesusersgsl/inst/CITATION0000644000176200001440000000077515103324656013167 0ustar liggesuserscitHeader("To cite the gsl package in publications use:") bibentry(bibtype = "Article", title = "{Special functions in R: introducing the gsl package}", author = person("Robin", "K. S. Hankin"), journal = "R News", year = "2006", month = "October", volume = "6", issue = "4", textVersion = { paste("R. K. S. Hankin", "2006.", "Special functions in R: introducing the gsl package. ", "R News", "6(4)" ) }) gsl/inst/doc/0000755000176200001440000000000015104317411012556 5ustar liggesusersgsl/inst/doc/gsl.R0000644000176200001440000000460615104317411013474 0ustar liggesusers### R code from vignette source 'gsl.Rnw' ################################################### ### code chunk number 1: gsl.Rnw:118-118 ################################################### ################################################### ### code chunk number 2: gsl.Rnw:119-120 ################################################### library(gsl) ################################################### ### code chunk number 3: gsl.Rnw:125-126 ################################################### airy_Ai(1:3) ################################################### ### code chunk number 4: gsl.Rnw:139-153 ################################################### x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") ################################################### ### code chunk number 5: gsl.Rnw:164-178 ################################################### x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") ################################################### ### code chunk number 6: gsl.Rnw:276-289 ################################################### f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } gsl/inst/doc/gsl.Rnw0000644000176200001440000002503315103324656014046 0ustar liggesusers% -*- mode: noweb; noweb-default-code-mode: R-mode; -*- \documentclass[nojss]{jss} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% declarations for jss.cls %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %% just as usual \author{Robin K. S. Hankin} \title{Special functions in \proglang{R}: introducing the \pkg{gsl} package} %\VignetteIndexEntry{A vignette for the gsl package} %% for pretty printing and a nice hypersummary also set: \Plaintitle{Special functions in R: introducing the gsl package} \Shorttitle{The \pkg{gsl} package} \Abstract{ This vignette introduces the \pkg{gsl} package of \proglang{R} utilities for accessing the functions of the Gnu Scientific Library. An earlier version of this document was published as~\cite{hankin2006}. } \Keywords{\proglang{R}, special functions} \Plainkeywords{R, special functions} \Address{ Robin K. S. Hankin\\ University of Stirling\\ Scotland\\ E-mail: \email{hankin.robin@gmail.com} } %% need no \usepackage{Sweave.sty} \SweaveOpts{echo=FALSE} \begin{document} \hfill\includegraphics[width=1in]{\Sexpr{system.file("help/figures/gsl.png",package="gsl")}} \section{Introduction} The Gnu Scientific Library (GSL) is a collection of numerical routines for scientific computing~\citep{galassi2005}. The routines are written in \proglang{C} and constitute a library for \proglang{C} programmers; the source code is distributed under the GNU General Public License. One stated aim of the GSL development effort is the development of wrappers for high level languages. The \proglang{R} programming language~\citep{rcore2008} is an environment for statistical computation and graphics. It consists of a language and a run-time environment with graphics and other features. Here I introduce \pkg{gsl}, an \proglang{R} package that allows direct access to many GSL functions, including all the special functions, from within an \proglang{R} session. The package is available on CRAN, \url{https://www.cran.r-project.org/} and github, \url{https://github.com/RobinHankin/gsl}; the GSL itself is available at \url{https://www.gnu.org/software/gsl/}. \section{Package design philosophy} The package splits into two parts: the special functions, written by the author; and the \pkg{rng} and \pkg{qrng} functionality, written by Duncan Murdoch. These two parts are very different in implementation, yet follow a common desideratum, namely that the package be a transparent port of the GSL library. The package thus has the advantage of being easy to compare with the GSL, and easy to update verifiably. In this paper, the Airy functions are used to illustrate the package. They are typical of the package's capabilities and coding, and are relatively simple to understand, having only a single real argument. A brief definition, and an application in physics, is given in the appendix. The package is organized into units that correspond to the GSL header file. Thus all the Airy functions are defined in a single header file, \code{gsl\_sf\_airy.h}. The package thus contains a corresponding \proglang{C} file, \code{airy.c}; an \proglang{R} file \code{airy.R}, and a documentation file \code{Airy.Rd}. These three files together encapsulate the functionality defined in \code{gsl\_sf\_airy.h} in the context of an \proglang{R} package. This structure makes it demonstrable that the GSL has been systematically and completely wrapped. Functions are named such that one can identify a function in the GSL manual, and the corresponding \proglang{R} command will be the same but with the prefix\footnote{Some functions, such as \code{gsl\_sf\_sin()}, retain the prefix to avoid conflicts. A full list is given in \code{Misc.Rd}.} and, if present, the ``\code{\_e}'' suffix, removed. In the case of the special functions, the prefix is ``\code{gsl\_sf\_}''. Thus, GSL function \code{gsl\_sf\_airy\_Ai\_e()} of header file \code{gsl\_sf\_airy.h} is called, via intermediate \proglang{C} routine \code{airy\_Ai\_e()}, by \proglang{R} function \code{airy\_Ai()}. Documentation is provided for every function defined in \code{gsl\_sf\_airy.h} under \code{Airy.Rd}. The \pkg{gsl} package is not intended to add any numerical functionality to the GSL, although here and there I have implemented slight extensions such as the Jacobian elliptic functions whose \proglang{R} ports take a complex argument. \subsection{Package documentation} The \pkg{gsl} package is unusual in that its documentation consists almost entirely of pointers to the GSL reference manual~\citep{galassi2005}, and~\citet{abramowitz1965}. This follows from the transparent wrapper philosophy. In any case, the GSL reference manual would strictly dominate the \code{Rd} files of the \pkg{gsl} package. \section[Package gsl in use]{Package \pkg{gsl} in use} <>= <>= library(gsl) @ Most functions in the package are straightforwardly and transparently executable: <>= airy_Ai(1:3) @ The online helpfiles include many examples that reproduce graphs and tables that appear in \citeauthor{abramowitz1965}. This constitutes a useful check on the routines. For example, figures~\ref{airyfig_A} and~\ref{airyfig_B} show an approximate reproduction of their figures~10.6 and~10.7 (page~446). \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,11),c(-1,1),type="n",main="Fig 10.6, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,2,4,6,8,10),labels=c("","2","4","6","8","10")) axis(2,pos=0) lines(x,airy_Ai ( x),type="l",lty=1) lines(x,airy_Ai (-x),type="l",lty=2) lines(x,airy_Ai_deriv ( x),type="l",lty=3) lines(x,airy_Ai_deriv (-x),type="l",lty=4) text(1,0.6 ,"Ai(-x)" ) text(0.85,0.33 ,"Ai(x)" ) text(1.08,-0.26,"Ai'(x)" ) text(10.5,0.4 ,"Ai'(-x)") arrows(10, 0, 11, 0,angle=11) text(11,-0.1,"x") @ \caption{Functions~$\mathrm{Ai}(\pm x)$ \label{airyfig_A} and~$\mathrm{Ai}'(\pm x)$ as plotted in the helpfile for \code{airy\_Ai()} and appearing on page~446 of~\citet{abramowitz1965}} \end{center} \end{figure} \begin{figure}[htbp] \begin{center} <>= x <- seq(from=0,to=10,len=100) plot(c(0,10),c(-1,2.2),type="n",main="Fig 10.7, p446",xlab="",ylab="",yaxt="n",xaxt="n",frame=FALSE) axis(1,pos=0,at=c(0,1:9),labels=c("","1","2","3","4","5","6","7","8","9")) axis(2,pos=0) lines(x,airy_Bi ( x),type="l",lty=1) lines(x,airy_Bi (-x),type="l",lty=2) lines(x,airy_Bi_deriv ( x),type="l",lty=3) lines(x,airy_Bi_deriv (-x),type="l",lty=4) text(0.15,1.44 ,"Bi(x)",pos=4) text(1,0.90 ,"Bi'(x)",pos=4) text(2.25,0.56,"Bi'(-x)") text(0.7,-0.55,"Bi'(-x)",pos=4) arrows(9, 0, 10, 0, angle=11) text(10,-0.1,"x") @ \caption{Functions~$\mathrm{Bi}(\pm x)$ \label{airyfig_B} and~$\mathrm{Bi}'(\pm x)$ \citep{abramowitz1965}} \end{center} \end{figure} \section{Summary} The \pkg{gsl} package is a transparent \proglang{R} wrapper for the Gnu Scientific Library. It gives access to all the special functions, and the quasi-random sequence generation routines. Notation follows the GSL as closely as reasonably practicable; many graphs and tables appearing in \citeauthor{abramowitz1965} are reproduced by the examples in the helpfiles. \subsubsection*{Acknowledgments} I would like to acknowledge the many stimulating and helpful comments made by the \proglang{R}-help list over the years. \bibliography{gsl} \section*{Appendix: The Airy function and an application in quantum mechanics} The Airy function may not be familiar to some readers; here, I give a brief introduction to it and illustrate the \pkg{gsl} package in use in a physical context. The standard reference is~\citet{vallee2004}. For real argument~$x$, the Airy function is defined by the integral \begin{equation} \mathrm{Ai}(x)=\frac{1}{\pi}\int_0^\infty \cos\left(t^3/3+xt\right)\,dt\end{equation} and obeys the differential equation~$y''=xy$ (the other solution is denoted~$\mathrm{Bi}(x)$). In the field of quantum mechanics, one often considers the problem of a particle confined to a potential well that has a well-specified form. Here, I consider a potential of the form \begin{equation}\label{potential} V(r) = \left\{\begin{array}{ll} r & \mbox{if~$r>0$}\\ \infty & \mbox{if~$r\leq 0$.}\\ \end{array} \right. \end{equation} Under such circumstances, the energy spectrum is discrete and the energy~$E_n$ corresponds to the $n^{\rm th}$ quantum state, denoted by $\psi_n$. If the mass of the particle is~$m$, it is governed by the Schr\"{o}dinger equation \begin{equation} \frac{d^2\psi_n(r)}{dr^2} + \frac{2m}{\hbar^2}\left(E_n-r\right)\psi_n(r)=0 \end{equation} Changing variables to $\xi=\left(E_n-e\right)\left(2m/\hbar\right)^{1/3}$ yields the Airy equation, viz \begin{equation} \frac{d^2\psi_n}{d\xi^2}+\xi\psi_n=0\end{equation} with solution \begin{equation} \psi_n(\xi)=N\mathrm{Ai}\left(-\xi\right) \end{equation} where $N$ is a normalizing constant (the~$\mathrm{Bi}\left(\cdot\right)$ term is omitted as it tends to infinity with increasing~$r$). Demanding that~$\psi_n(0)=0$ gives \[ E_n=-a_{n+1}\left(\hbar^2/2m\right)^{1/3} \] where~$a_n$ is the $n^{\rm th}$ root of the~$\mathrm{Ai}$ function [\code{Airy\_zero\_Ai()} in the package]; the off-by-one mismatch is due to the convention that the ground state is conventionally labelled state zero, not state~1. Thus, for example, $E_2=\mbox{\Sexpr{-round(airy_zero_Ai(3),4)}}\left(\hbar^2/2m\right)^{1/3}$. The normalization factor~$N$ is determined by requiring that $\int_0^\infty\psi^*\psi\,dr=1$ (physically, the particle is known to be somewhere with~$r>0$). It can be shown that \[ N=\frac{\left(2m/\hbar\right)^{1/6}}{\mathrm{Ai}'\left(a_n\right)}\] [the denominator is given by function \code{airy\_zero\_Ai\_deriv()} in the package] and the full solution is thus given by \begin{equation} \psi_n(r)=\frac{\left(2m/\hbar\right)^{1/6}} {\mathrm{Ai}'\left(a_n\right)} \mathrm{Ai}\left[ \left(\frac{2m}{\hbar}\right)^{1/3}\left(r-E_n\right)\right]. \end{equation} Figure~\ref{qm} shows the first six energy levels and the corresponding wave functions. \begin{figure}[htbp] \begin{center} <>= f <- function(r,n){ -airy_Ai(r+airy_zero_Ai(n+1))/airy_zero_Ai_deriv(n+1)} plot(c(0,10),c(0,10),type="l",yaxt="n",xaxt="n",frame=FALSE,xlab="r",ylab="V(r)") axis(1,pos=0) axis(2,pos=0) x <- seq(from=0,to=10,len=400) for(i in 0:5){ jj <- -airy_zero_Ai(i+1) lines(x=c(0,jj),y=c(jj,jj)) lines(x=c(jj,10),y=c(jj,jj),col="gray",lty=2) points(x,(i+1)*(-1)^i*f(x,i)+jj,type="l") } @ \caption{First six energy levels of a particle\label{qm} in a potential well (diagonal line) given by equation~\ref{potential}} \end{center} \end{figure} \end{document} gsl/inst/doc/gsl.pdf0000644000176200001440000027257415104317411014057 0ustar liggesusers%PDF-1.5 % 1 0 obj << /Type /ObjStm /Length 3378 /Filter /FlateDecode /N 62 /First 502 >> stream xZYs8~_V RqN'Y9ʃ,S6'HT̯߯RDɖ-PL0ͤLa.2o SVwĨAׯr`W%@0n$?K?xdߋꌝ$e{99Szmnw0y 8@|;)Of0>}==+t0).*pN"T"pvG>+Q>@Z $r= L=^"h4FOUcwO5[TY0 gF>SQ&eaȝ #eEս8M(t,Li\3{eҴ}WII9_I\^b1f6Qddf4mi9 )zzXˤY-XeI98+3{ņ DFDQTW 7jyj *ܼ֭k~oqӓݏWR=|\NxPSRLݳVˣ$B}^.PA,0-/(⪿'!9iGKq}u{4OjgHaX›zj`,,ƒ;"w\0юB ̐S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: introducing the gsl packageRobin K. S. Hankin endstream endobj 65 0 obj << /Type /ObjStm /Length 3003 /Filter /FlateDecode /N 61 /First 517 >> stream xZYs8~_Ǚ ATjc'GL ˔̍Lz%jnxʔ)$\&!ц(K%qB"41Xh18(D#4a:nCo  ε"6$\`wˉ`J++ZXOh.Dx"-LZb4!#E/R'(ΠR<$ҰD999,ƠRюa =O؆~c8-@1[)@+gPp@P"`tZaw(c@'PR NAZ&eW4Ѐt0J8s؆OuǯzHB_NjeɈ1T}DU6hI?O`Dc>, `;!IV9B[NjVӺ7uMa(A2: C#ˡ m -vyIEN3C20BOMWfYڻH=_DS 5iE:xF|g|o~tguKN #oR08G #W<ދlSmR]%vRS|RWN]Y7xMr$zB ~X=.5^E/=/)BO>yzvA:!U2IodFUHcv@Kqdg\3OJzv |3XN<@qn*ze':3ݏ ax J9 #s/yxŦ㻨'xO^$3,t/ O9`YE}DPZ)-}>{{wd7+fn00+<׏|'-Qm'26%鐿V5]ef<0mkb6/^/xCM_oxhX#` ϼ]\WtOE@|Ke\4`+􁭟{r! "NkY1ZhlG`PUAn#ʲ#E`FϨ,Ael1)V,&S}~\' ǨiJgi^I+/ö>#W|K}S/K'wt=k-nW7[D,Z'h>-2Y^Ze(trFusOp: *lo;(F*q.logޗO *ݔf2PjbMird L Zۧ'J,x|>lݾE4f/ ]mmM b ߭:v0fnxk h75:Iz |k58ɢbFr2:{En|JkYSfzeyJ)һtcZm,([YY6xӥ1f+W,+V3S4ur׽_}Yu}hx{=Nzendstream endobj 127 0 obj << /Filter /FlateDecode /Length 3455 >> stream xZKw6/ -9M< L:M鴱g΂l$ v4'$pq}s_g|3sڪ>ʜfa"9(_~ɍr8/}(:$' 6u` ZWadz]BY9 # 0BvqKŒ0EX< ?nkY-pR23̗JdFK鼧Z߁`AHc~‡bߗ"__PL#zfF fi!Yb2B.V̍D+S۔O%&Fϗfpv[o$C9{q Pbm{jv.W8+.޴pad#Ase\?xBwbȜTAꇸ kҎ?= `AoUm5)!CE2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"emC7?$pl%M %: FYf:5[-`ƀ ^J8A)x[o ƓʶҶnjjշJAbX8`fP_ڪ+!CC1K/W sPS.pPɑF.y,~зW6XyAO=͔8ݬ8v~A sq tA+Ah`][L{^ 5/Yz]WA׿u3#yZT? )ϥTEL_` 6t|UHPm A >Y}vҀ-MQ0].]p{*pD"Qh)6O\8B|ni{]75Omh*!8u=d9dsեPOWtF>|Zl?lg4{ s@YR Yңuڨe9o9R3HxXme,[跽_6ZYE9jRR.).l)imu'9t}`l٠!Gv4Ye|d3زj_'AeSb%@D)SSR6M9YFgZA ePendstream endobj 141 0 obj << /Filter /FlateDecode /Length 178 >> stream x]1 EwN "tЪj{&b B޾4:|Kp9_/s4O(`3,q j)_:6\uzкn7={ [|L$m 0N)nߔ %?* 6NfB)൝k[=5k 9[<jQ|Yoendstream endobj 142 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 507 >> stream xLMMathSymbols8-Regular  _ asteriskmathinfinityprime10!VBa1%$˕h%(+oy}|},~y{|x$L$K~xr%|0t}+;y& Ƨ l;$/G(JGۊmQLT7 ;s_x‹ o&>C62K1 %7wtfO9! Q; 1omcjF|~K:  W/ Եendstream endobj 143 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 242 >> stream xLMSans10-Bold!J  TR3vu$$,!>ʚ걋Ym^gfg8s+fP}Uu]Iu^i   To _endstream endobj 144 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1079 >> stream x=mLSgǟ@/^4|8QR&B S: o]X˜[JT..Qge9=&w 1QDP${PYjTLO(!.b340H"ev$d%yd"j%@CJ-Uq5*7j<[xF5I1 uL19>]zMʊr)f:bptVO`l]9grh_x%zT\gBuO`G4 )Oޟ~X7@Tirɷ9;R,?AߨRQ7E:FϢ.!_//~!}qMAy_7U^i( 4Lo|~$nt5jpﱝd9 VPRИ\!]TUܵ_/9 :na=.([ppTZ] '<ih ]r_#~0L $-TVc~ d1o^}fsyΟvܧL/{o A%8~p սFd^ԭ.丠؇肍TU〵s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02(FQ"@q(UMhGB1U\2=0$J?H="V_K>9h!4-UZÌ:p `&[z=0n+Rt#PU8VLۮp[ 8Z%JGZVkw;v{@K`{8>HrouZA xx̯+ Wzf+zKզ9x ^Z1MN2Q@5y^|D܆9g fӴʠl: t'gwNbocJ_{]=a5$ׂh6\Iocpk,^psnr\*Іz8*;M!伌vS77Ў{A钋cNL|j~ plcl nK5&j0çL]]Jm[-+ 4 >ܼ9{T(4_iqC:h>$3'C|n ?'$̙8"K= /!endstream endobj 151 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 195 >> stream xcd`ab`dd M3 JM/I, Jtwò)G@ѐA%LR ݛ~t҇?z6%tX#c\9Oong/˞]"vfa }lYN^KH>ޞI=00Eendstream endobj 152 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 2776 >> stream xWkTȌ@AbW.V[VZHhDBx?+d%H0_B VTTrk^z[.DN+r{'VY/]$? #9\My.QϤĤdij莰ȨY̔9/a/bkuX >6b˰`ml9[c`a1sX,=srL0N8 zG2\!q9A.3]]]+]{^GBmfmS'Pr,\KUޓdp;ʎN\!d"3trR{zm: u`{ swhՠ J*:PS3f,M6GPTNdqrCă%yG%"^md MW: M4WoQ»>=:8~`wpF8iΞش2푃|LhU-E;GzO< g"wDr^3!ޏ*߲%E 5%~jy0`j;Zkg}TTR}9&tbd-#᪄iۋdb1=:L;a}6aś@.6ЯMD+/ kHAuIO['9*n6oAk=+z~#!ƋbZCJk)}y{xUh|SeN]ehQddCgLo46VRn҄D& hCY}ByP91joDJE  7VzfCAPRGkb ;bAk*zYJEc.۟ߗۗSnH/3B12+yܒ^!+y^WuOy4烃?HGtc2Hh_ڥXioVk&f VhBK\'Bj=IbmLf+DB,D? ]9أ6JjtQޡ}SJ0y&ߢE#$ O7J#y+t\ ĂU2cz;hsC }ahͶlxC!,-7^/ö7&U BЫK\%@^yV[^BUd=vf^~]7J?eq˜x:Q'4~Oٔ5^; 4.jaK#oM% ݛC˷LMR٧B-EicBsWDZn}ytD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ye𻷊`v<5^h`ؒ*^Qܘ:z<BwyRZh܌|!&r^ sWPD6;Kq1+1]݁^!U딫T_͉ۢQerq֣}Ko}3N^6FHL+):(' Ihэ  & ..})SM%%''Rwk$'3̿Rlendstream endobj 157 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 1060 >> stream xmR{LSwmޕK``ltC`D) bŵ嵮]p810R x o !\`pqWvMXI}_9'yp0.pQGgMMWɓmwzg ۢY+;MJa1,`L0{ss\/yNgͽA*A"ĝ7 OB|FBm1l<*+ژJOm{gRV?0y&e'@KՍtؾ!;fE+YAѹ?㈇!XE+ƯWLr a[in&`萴|kC)èSmS* HQuO$kLb|S=h/X'iq}R@u%"J])q)JM|}rtItP r Dendstream endobj 158 0 obj << /Filter /FlateDecode /Subtype /Type1C /Length 391 >> stream x|LMMathItalic8-Regular  n=OА#s9ade{WC:WZen_Xgrt{ls\WƵruyxjv:f*|rt΋v\TaxZ~j~Ro Byv|w0kk~{<}~<vCp  To mendstream endobj 159 0 obj << /Filter /FlateDecode /Length 2773 >> stream xZYoN7>YCAs#ʓ0ƒLMæi{_>Fæ$ ~А鮮cw g떳W3ҟuogw'g9Ym;Yψd5dV ?99LK˙'~p?]Q+UB.Y^570 /oαkYCYNAM@}C\'%,5DOo%EV(ig"YoF=((EBf%[:96"-پ0}!<>r OuvqzGRYD^ڰ[K/ JK'2%gC$q Meqۋ^Þ [`i˖B@j"~V dB~[)uMYPDpnCl98{y 6j𖇀YzZD22BXяoZ&n (׌)+e \ę[c16* vw>7iQ4 ).{T>OJ+:qRʢ 2o TKϼiB;Yᄂ@ʍ;m>!\.*!o!u+ ;p۱R+[h3\JaQ]4oaV/ϳe幧ua菴A]4Wwd?Cr]jZl39LP+| ^fh t䷧dN乲V^Aוwj&U]~Y^SY .5K"( S4ck3-qTU/_C9.}-)-=?dhmjLYJ:UaH8#$, X@_jHa蠏Ylz}}M5N37 T =rrނCX%M%,ɳ_\YPe yU谫V]eRoA w #R[(Y&LXb!"(%->4.W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ɓendstream endobj 161 0 obj << /Type /XRef /Length 167 /Filter /FlateDecode /DecodeParms << /Columns 5 /Predictor 12 >> /W [ 1 3 1 ] /Info 3 0 R /Root 2 0 R /Size 162 /ID [<5d2f654e958a40dca39d050735e59c52><6d3a387e8006e7a4814d8eef4f10de67>] >> stream xcb&F~0 $8J҉0 =O~; s ?d"e"GA ļA$S"quD2> uD L|@Q*,."⌲`&Ik8XCY&<V'} endstream endobj startxref 95171 %%EOF gsl/README.md0000644000176200001440000000336215103326012012313 0ustar liggesusersThe gsl R package: a wrapper for the GSL C library ================ [![Total Downloads](https://cranlogs.r-pkg.org/badges/grand-total/gsl)](https://CRAN.R-project.org/package=gsl) [![CRAN\_Status\_Badge](https://www.r-pkg.org/badges/version/gsl)](https://cran.r-project.org/package=gsl) [![Codecov test coverage](https://app.codecov.io/gh/RobinHankin/gsl/branch/master/graph/badge.svg)](https://app.codecov.io/gh/RobinHankin/gsl/branch/master) The gsl R package is a wrapper for the GSL C library (note capitalization). You can get further information on GSL at https://www.gnu.org/software/gsl/ # Installation from CRAN You can install the released version of the gsl R package from [CRAN](https://CRAN.R-project.org) by typing `install.packages("gsl")` `library("gsl")` at the R command prompt. # Installation from source Installing the gsl R package from source requires you to install the GSL C library first. *About 80% of reports to me about gsl are due to people not understanding what this means*. Before reporting any "bugs", ensure that you can compile and run a simple test program such as the example program near the start of the GSL Reference Manual. It is not the purpose of this document to show people how to install GSL: for this, visit https://www.gnu.org/software/gsl/ You will need at least GSL version 2.5: using earlier versions generally gives errors such as error: too few arguments to function 'gsl_sf_ellint_D_e' *About 20% of reports to me about gsl are due to an insufficient version of GSL*. # Further information For more detail on package structure and design philosophy, see the package vignette `vignette("gsl")` gsl/build/0000755000176200001440000000000015104317411012133 5ustar liggesusersgsl/build/vignette.rds0000644000176200001440000000032515104317411014472 0ustar liggesusersb```b`aeb`b2 1# 'fO/ +GsT(LK-)IUH/R(HUT(HLNLOfHAJ0+lI `aBVZnKjAj^ HvѴpxVaaqIY0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)pP5(dEפ*~.[L+EwWޫvv eP6>6^o>ʁV]$]U$?x}$x v9*G΃X"D bE-JI !^9ChDGr{L+Ι)vJ#d( 7䳡}FG'GF;׳M/.FW ZӊWr D((ʾ{a'&ag;^P{\)Zxgiܫ_ޢMg~:Mog"ap Ec`8>N ^!VUC˄ۄu#Z xTK Nd 1e[ے m{(kv#S|zlfݣuv'cNfj1r. A_wFQ/1'eܧY0m.reb0ۻ([m?% M?,UJ5q s h sm7bt`kA C&$%SSs<@Loy8s}݂F_"|{ _B\F9|Mna.l- kO:Svv=D4D23(τbe$?EiŞխ׽,;ïu3/!n"R6g)g Q_1Wi-s=CEC=~}swUL"WXgd9>HP&g߮RҘ($ Rqff|azfr_r8hlj1ta]+zmk B@9qd^.kݲw睗hs}O$̡ 8 ^I 9sk j"KaU% uR-CDqߜDMmdIrѨp0z=WXJeAnޢVq0zv8'g~J _M7FSFi"˞J"5'ЂKޭ&3.mocg{ IX}xy<(j*ӦJjSL` TRUymzʁg w\1(C;zfJ䲛2R=Ū:ljt"i&o epOĀnLyQ<ڀ$Gge iZ4>j$|b(֎OitjjU-H48c_;Y^魺(T%,\$&GSSmYfK9%\By)=[լ{Xr@ e)?w Kc>6Ts/ֆME6Z#p\\zMgsl/configure0000755000176200001440000036645215104317412012764 0ustar liggesusers#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.71. # # # Copyright (C) 1992-1996, 1998-2017, 2020-2021 Free Software Foundation, # Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="as_nop=: if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else \$as_nop case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ) then : else \$as_nop exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 blah=\$(echo \$(echo blah)) test x\"\$blah\" = xblah || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1" if (eval "$as_required") 2>/dev/null then : as_have_required=yes else $as_nop as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null then : else $as_nop as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$as_shell as_have_required=yes if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null then : break 2 fi fi done;; esac as_found=false done IFS=$as_save_IFS if $as_found then : else $as_nop if { test -f "$SHELL" || test -f "$SHELL.exe"; } && as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null then : CONFIG_SHELL=$SHELL as_have_required=yes fi fi if test "x$CONFIG_SHELL" != x then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno then : printf "%s\n" "$0: This script requires a shell more modern than all" printf "%s\n" "$0: the shells that I found on your system." if test ${ZSH_VERSION+y} ; then printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." else printf "%s\n" "$0: Please tell bug-autoconf@gnu.org about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_nop # --------- # Do nothing but, unlike ":", preserve the value of $?. as_fn_nop () { return $? } as_nop=as_fn_nop # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='' PACKAGE_TARNAME='' PACKAGE_VERSION='' PACKAGE_STRING='' PACKAGE_BUGREPORT='' PACKAGE_URL='' ac_unique_file="src/airy.c" ac_subst_vars='LTLIBOBJS LIBOBJS GSL_LIBS GSL_CFLAGS GSL_CONFIG OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: \`$ac_useropt'" ac_useropt_orig=$ac_useropt ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures this package to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF _ACEOF fi if test -n "$ac_init_help"; then cat <<\_ACEOF Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to the package provider. _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for configure.gnu first; this name is used for a wrapper for # Metaconfig's "Configure" on case-insensitive file systems. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF configure generated by GNU Autoconf 2.71 Copyright (C) 2021 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest.beam if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_run LINENO # ---------------------- # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that # executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; } then : ac_retval=0 else $as_nop printf "%s\n" "$as_me: program exited with status $ac_status" >&5 printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run ac_configure_args_raw= for ac_arg do case $ac_arg in *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append ac_configure_args_raw " '$ac_arg'" done case $ac_configure_args_raw in *$as_nl*) ac_safe_unquote= ;; *) ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. ac_unsafe_a="$ac_unsafe_z#~" ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; esac cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by $as_me, which was generated by GNU Autoconf 2.71. Invocation command line was $ $0$ac_configure_args_raw _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac printf "%s\n" "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Sanitize IFS. IFS=" "" $as_nl" # Save into config.log some information that might help in debugging. { echo printf "%s\n" "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo printf "%s\n" "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then printf "%s\n" "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac printf "%s\n" "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then printf "%s\n" "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && printf "%s\n" "$as_me: caught signal $ac_signal" printf "%s\n" "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h printf "%s\n" "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. if test -n "$CONFIG_SITE"; then ac_site_files="$CONFIG_SITE" elif test "x$prefix" != xNONE; then ac_site_files="$prefix/share/config.site $prefix/etc/config.site" else ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" fi for ac_site_file in $ac_site_files do case $ac_site_file in #( */*) : ;; #( *) : ac_site_file=./$ac_site_file ;; esac if test -f "$ac_site_file" && test -r "$ac_site_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 printf "%s\n" "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 printf "%s\n" "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Test code for whether the C compiler supports C89 (global declarations) ac_c_conftest_c89_globals=' /* Does the compiler advertise C89 conformance? Do not test the value of __STDC__, because some compilers set it to 0 while being otherwise adequately conformant. */ #if !defined __STDC__ # error "Compiler does not advertise C89 conformance" #endif #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ struct buf { int x; }; struct buf * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not \xHH hex character constants. These do not provoke an error unfortunately, instead are silently treated as an "x". The following induces an error, until -std is added to get proper ANSI mode. Curiously \x00 != x always comes out true, for an array size at least. It is necessary to write \x00 == 0 to get something that is true only with -std. */ int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) '\''x'\'' int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), int, int);' # Test code for whether the C compiler supports C89 (body of main). ac_c_conftest_c89_main=' ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); ' # Test code for whether the C compiler supports C99 (global declarations) ac_c_conftest_c99_globals=' // Does the compiler advertise C99 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L # error "Compiler does not advertise C99 conformance" #endif #include extern int puts (const char *); extern int printf (const char *, ...); extern int dprintf (int, const char *, ...); extern void *malloc (size_t); // Check varargs macros. These examples are taken from C99 6.10.3.5. // dprintf is used instead of fprintf to avoid needing to declare // FILE and stderr. #define debug(...) dprintf (2, __VA_ARGS__) #define showlist(...) puts (#__VA_ARGS__) #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) static void test_varargs_macros (void) { int x = 1234; int y = 5678; debug ("Flag"); debug ("X = %d\n", x); showlist (The first, second, and third items.); report (x>y, "x is %d but y is %d", x, y); } // Check long long types. #define BIG64 18446744073709551615ull #define BIG32 4294967295ul #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) #if !BIG_OK #error "your preprocessor is broken" #endif #if BIG_OK #else #error "your preprocessor is broken" #endif static long long int bignum = -9223372036854775807LL; static unsigned long long int ubignum = BIG64; struct incomplete_array { int datasize; double data[]; }; struct named_init { int number; const wchar_t *name; double average; }; typedef const char *ccp; static inline int test_restrict (ccp restrict text) { // See if C++-style comments work. // Iterate through items via the restricted pointer. // Also check for declarations in for loops. for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) continue; return 0; } // Check varargs and va_copy. static bool test_varargs (const char *format, ...) { va_list args; va_start (args, format); va_list args_copy; va_copy (args_copy, args); const char *str = ""; int number = 0; float fnumber = 0; while (*format) { switch (*format++) { case '\''s'\'': // string str = va_arg (args_copy, const char *); break; case '\''d'\'': // int number = va_arg (args_copy, int); break; case '\''f'\'': // float fnumber = va_arg (args_copy, double); break; default: break; } } va_end (args_copy); va_end (args); return *str && number && fnumber; } ' # Test code for whether the C compiler supports C99 (body of main). ac_c_conftest_c99_main=' // Check bool. _Bool success = false; success |= (argc != 0); // Check restrict. if (test_restrict ("String literal") == 0) success = true; char *restrict newvar = "Another string"; // Check varargs. success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); test_varargs_macros (); // Check flexible array members. struct incomplete_array *ia = malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); ia->datasize = 10; for (int i = 0; i < ia->datasize; ++i) ia->data[i] = i * 1.234; // Check named initializers. struct named_init ni = { .number = 34, .name = L"Test wide string", .average = 543.34343, }; ni.number = 58; int dynamic_array[ni.number]; dynamic_array[0] = argv[0][0]; dynamic_array[ni.number - 1] = 543; // work around unused variable warnings ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' || dynamic_array[ni.number - 1] != 543); ' # Test code for whether the C compiler supports C11 (global declarations) ac_c_conftest_c11_globals=' // Does the compiler advertise C11 conformance? #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L # error "Compiler does not advertise C11 conformance" #endif // Check _Alignas. char _Alignas (double) aligned_as_double; char _Alignas (0) no_special_alignment; extern char aligned_as_int; char _Alignas (0) _Alignas (int) aligned_as_int; // Check _Alignof. enum { int_alignment = _Alignof (int), int_array_alignment = _Alignof (int[100]), char_alignment = _Alignof (char) }; _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); // Check _Noreturn. int _Noreturn does_not_return (void) { for (;;) continue; } // Check _Static_assert. struct test_static_assert { int x; _Static_assert (sizeof (int) <= sizeof (long int), "_Static_assert does not work in struct"); long int y; }; // Check UTF-8 literals. #define u8 syntax error! char const utf8_literal[] = u8"happens to be ASCII" "another string"; // Check duplicate typedefs. typedef long *long_ptr; typedef long int *long_ptr; typedef long_ptr long_ptr; // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. struct anonymous { union { struct { int i; int j; }; struct { int k; long int l; } w; }; int m; } v1; ' # Test code for whether the C compiler supports C11 (body of main). ac_c_conftest_c11_main=' _Static_assert ((offsetof (struct anonymous, i) == offsetof (struct anonymous, w.k)), "Anonymous union alignment botch"); v1.i = 2; v1.w.k = 5; ok |= v1.i != 5; ' # Test code for whether the C compiler supports C11 (complete). ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} ${ac_c_conftest_c11_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} ${ac_c_conftest_c11_main} return ok; } " # Test code for whether the C compiler supports C99 (complete). ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} ${ac_c_conftest_c99_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} ${ac_c_conftest_c99_main} return ok; } " # Test code for whether the C compiler supports C89 (complete). ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} int main (int argc, char **argv) { int ok = 0; ${ac_c_conftest_c89_main} return ok; } " # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 printf "%s\n" "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 printf "%s\n" "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 printf "%s\n" "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 printf "%s\n" "$as_me: former value: \`$ac_old_val'" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 printf "%s\n" "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`${MAKE-make} distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Ensure C++ is set up as R expects : ${R_HOME=`R RHOME`} if test -z "${R_HOME}"; then as_fn_error $? "Could not determine R_HOME." "$LINENO" 5 fi CC=`"${R_HOME}/bin/R" CMD config CC` CFLAGS=`"${R_HOME}/bin/R" CMD config CFLAGS` ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. set dummy ${ac_tool_prefix}clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 printf "%s\n" "$CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "clang", so it can be a program name with args. set dummy clang; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_prog_ac_ct_CC+y} then : printf %s "(cached) " >&6 else $as_nop if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="clang" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 printf "%s\n" "$ac_ct_CC" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi fi test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion -version; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 printf %s "checking whether the C compiler works... " >&6; } ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else $as_nop ac_file='' fi if test -z "$ac_file" then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 printf %s "checking for C compiler default output file name... " >&6; } { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 printf "%s\n" "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 printf %s "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else $as_nop { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 printf "%s\n" "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main (void) { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 printf %s "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 printf "%s\n" "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 printf %s "checking for suffix of object files... " >&6; } if test ${ac_cv_objext+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" printf "%s\n" "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_nop printf "%s\n" "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 printf "%s\n" "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 printf "%s\n" "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 printf %s "checking whether the compiler supports GNU C... " >&6; } if test ${ac_cv_c_compiler_gnu+y} then : printf %s "(cached) " >&6 else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_compiler_gnu=yes else $as_nop ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } ac_compiler_gnu=$ac_cv_c_compiler_gnu if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+y} ac_save_CFLAGS=$CFLAGS { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 printf %s "checking whether $CC accepts -g... " >&6; } if test ${ac_cv_prog_cc_g+y} then : printf %s "(cached) " >&6 else $as_nop ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes else $as_nop CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : else $as_nop ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main (void) { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 printf "%s\n" "$ac_cv_prog_cc_g" >&6; } if test $ac_test_CFLAGS; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi ac_prog_cc_stdc=no if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 printf %s "checking for $CC option to enable C11 features... " >&6; } if test ${ac_cv_prog_cc_c11+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c11=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c11_program _ACEOF for ac_arg in '' -std=gnu11 do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c11=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c11" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c11" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c11" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } CC="$CC $ac_cv_prog_cc_c11" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 ac_prog_cc_stdc=c11 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 printf %s "checking for $CC option to enable C99 features... " >&6; } if test ${ac_cv_prog_cc_c99+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c99=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c99_program _ACEOF for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c99=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c99" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c99" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c99" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } CC="$CC $ac_cv_prog_cc_c99" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 ac_prog_cc_stdc=c99 fi fi if test x$ac_prog_cc_stdc = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 printf %s "checking for $CC option to enable C89 features... " >&6; } if test ${ac_cv_prog_cc_c89+y} then : printf %s "(cached) " >&6 else $as_nop ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_c_conftest_c89_program _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO" then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext conftest.beam test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi if test "x$ac_cv_prog_cc_c89" = xno then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 printf "%s\n" "unsupported" >&6; } else $as_nop if test "x$ac_cv_prog_cc_c89" = x then : { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 printf "%s\n" "none needed" >&6; } else $as_nop { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } CC="$CC $ac_cv_prog_cc_c89" fi ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 ac_prog_cc_stdc=c89 fi fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu #AC_CHECK_LIB(gsl, gsl_sf_airy_Ai_e, # [LIBS="${LIBS} -lgsl -lgslcblas"], # [AC_MSG_ERROR([Cannot find Gnu Scientific Library.])], # [-lgslcblas]) #AC_CHECK_HEADER([gsl/gsl_version.h], , # [AC_MSG_ERROR([Cannot find GSL headers.])]) # Following lines kindly supplied by Dirk Eddelbuettel ## Use gsl-config to find arguments for compiler and linker flags ## ## Check for non-standard programs: gsl-config(1) # Extract the first word of "gsl-config", so it can be a program name with args. set dummy gsl-config; ac_word=$2 { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 printf %s "checking for $ac_word... " >&6; } if test ${ac_cv_path_GSL_CONFIG+y} then : printf %s "(cached) " >&6 else $as_nop case $GSL_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_GSL_CONFIG="$GSL_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then ac_cv_path_GSL_CONFIG="$as_dir$ac_word$ac_exec_ext" printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi GSL_CONFIG=$ac_cv_path_GSL_CONFIG if test -n "$GSL_CONFIG"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GSL_CONFIG" >&5 printf "%s\n" "$GSL_CONFIG" >&6; } else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 printf "%s\n" "no" >&6; } fi ## If gsl-config was found, let's use it if test "${GSL_CONFIG}" != ""; then # Use gsl-config for header and linker arguments GSL_CFLAGS=`${GSL_CONFIG} --cflags` GSL_LIBS=`${GSL_CONFIG} --libs` CFLAGS="$CFLAGS $GSL_CFLAGS" # kindly supplied by Ray Brownrigg else as_fn_error $? "gsl-config not found, is GSL installed?" "$LINENO" 5 fi { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if GSL version >= 2.5" >&5 printf %s "checking if GSL version >= 2.5... " >&6; } if test "$cross_compiling" = yes then : gsl_version_ok=yes else $as_nop cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main() { #ifdef GSL_VERSION int major, minor; char *gslv = GSL_VERSION; if ((sscanf(gslv, "%d.%d", &major, &minor)) != 2) { exit (1); } exit (minor < 5); exit (major < 2); #else exit(1); #endif } _ACEOF if ac_fn_c_try_run "$LINENO" then : gsl_version_ok=yes else $as_nop gsl_version_ok=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi if test "${gsl_version_ok}" = no; then as_fn_error $? "Need GSL version >= 2.5" "$LINENO" 5 else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } fi # Now substitute these variables in src/Makevars.in to create src/Makevars ac_config_files="$ac_config_files src/Makevars" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 printf "%s\n" "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' # Transform confdefs.h into DEFS. # Protect against shell expansion while executing Makefile rules. # Protect against Makefile macro expansion. # # If the first sed substitution is executed (which looks for macros that # take arguments), then branch to the quote section. Otherwise, # look for a macro that doesn't take arguments. ac_script=' :mline /\\$/{ N s,\\\n,, b mline } t clear :clear s/^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\)/-D\1=\2/g t quote s/^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\)/-D\1=\2/g t quote b any :quote s/[ `~#$^&*(){}\\|;'\''"<>?]/\\&/g s/\[/\\&/g s/\]/\\&/g s/\$/$$/g H :any ${ g s/^\n// s/\n/ /g p } ' DEFS=`sed -n "$ac_script" confdefs.h` ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh as_nop=: if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else $as_nop case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi # Reset variables that may have inherited troublesome values from # the environment. # IFS needs to be set, to space, tab, and newline, in precisely that order. # (If _AS_PATH_WALK were called with IFS unset, it would have the # side effect of setting IFS to empty, thus disabling word splitting.) # Quoting is to prevent editors from complaining about space-tab. as_nl=' ' export as_nl IFS=" "" $as_nl" PS1='$ ' PS2='> ' PS4='+ ' # Ensure predictable behavior from utilities with locale-dependent output. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # We cannot yet rely on "unset" to work, but we need these variables # to be unset--not just set to an empty or harmless value--now, to # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct # also avoids known problems related to "unset" and subshell syntax # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH do eval test \${$as_var+y} \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done # Ensure that fds 0, 1, and 2 are open. if (exec 3>&0) 2>/dev/null; then :; else exec 0&1) 2>/dev/null; then :; else exec 1>/dev/null; fi if (exec 3>&2) ; then :; else exec 2>/dev/null; fi # The user is always right. if ${PATH_SEPARATOR+false} :; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS case $as_dir in #((( '') as_dir=./ ;; */) ;; *) as_dir=$as_dir/ ;; esac test -r "$as_dir$0" && as_myself=$as_dir$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi printf "%s\n" "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null then : eval 'as_fn_append () { eval $1+=\$2 }' else $as_nop as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null then : eval 'as_fn_arith () { as_val=$(( $* )) }' else $as_nop as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits # Determine whether it's possible to make 'echo' print without a newline. # These variables are no longer used directly by Autoconf, but are AC_SUBSTed # for compatibility with existing Makefiles. ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac # For backward compatibility with old third-party macros, we provide # the shell variables $as_echo and $as_echo_n. New code should use # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. as_echo='printf %s\n' as_echo_n='printf %s' rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by $as_me, which was generated by GNU Autoconf 2.71. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE Configuration files: $config_files Report bugs to the package provider." _ACEOF ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config='$ac_cs_config_escaped' ac_cs_version="\\ config.status configured by $0, generated by GNU Autoconf 2.71, with options \\"\$ac_cs_config\\" Copyright (C) 2021 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) printf "%s\n" "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) printf "%s\n" "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --he | --h | --help | --hel | -h ) printf "%s\n" "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX printf "%s\n" "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "src/Makevars") CONFIG_FILES="$CONFIG_FILES src/Makevars" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" eval set X " :F $CONFIG_FILES " shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 printf "%s\n" "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`printf "%s\n" "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || printf "%s\n" X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gsl/man/0000755000176200001440000000000015103324656011617 5ustar liggesusersgsl/man/Error.Rd0000644000176200001440000000242615103324656013203 0ustar liggesusers\name{Error} \alias{error} \alias{Error} \alias{Error function} \alias{erf} \alias{erfc} \alias{log_erfc} \alias{log_erf_Z} \alias{erf_Q} \alias{erf_Z} \alias{hazard} \title{Error functions} \description{ Error functions as per the Gnu Scientific Library, reference manual section 7.15 and AMS-55, chapter 7. Thes functions are declared in header file \code{gsl_sf_error.h} } \usage{ erf(x, mode=0, give=FALSE, strict=TRUE) erfc(x, mode=0, give=FALSE, strict=TRUE) log_erfc(x, mode=0, give=FALSE, strict=TRUE) erf_Q(x, mode=0, give=FALSE, strict=TRUE) hazard(x, mode=0, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE} , \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ The zero functions return a status of \code{GSL_EDOM} and a value of \code{NA} for \eqn{n\leq 0}{n\leq 0} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ erf(0.745) # Example 1, page 304 } \keyword{array} gsl/man/Psi.Rd0000644000176200001440000000222415103324656012641 0ustar liggesusers\name{Psi} \alias{Psi} \alias{psi_int} \alias{psi} \alias{psi_1piy} \alias{psi_1_int} \alias{psi_1} \alias{psi_n} \title{Psi (digamma) functions} \description{ Psi (digamma) functions as per the Gnu Scientific Library, reference manual section 7.27. These functions are declared in header file \code{gsl_sf_psi.h} } \usage{ psi_int(n, give=FALSE, strict=TRUE) psi(x, give=FALSE, strict=TRUE) psi_1piy(y, give=FALSE, strict=TRUE) psi_1_int(n, give=FALSE, strict=TRUE) psi_1(x, give=FALSE, strict=TRUE) psi_n(m, x, give=FALSE, strict=TRUE) } \arguments{ \item{m,n}{input: integer values} \item{x,y}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with default \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=1.2,to=1.25,by=0.005) cbind(x,psi(x),psi_1(x)) #tabe 6.1, p267, bottom bit psi_int(1:6) psi(pi+(1:6)) psi_1piy(pi+(1:6)) psi_1_int(1:6) psi_n(m=5,x=c(1.123,1.6523)) } \keyword{array} gsl/man/Dawson.Rd0000644000176200001440000000135515103324656013345 0ustar liggesusers\name{Dawson} \alias{Dawson} \alias{dawson} \title{Dawson functions} \description{ Dawson functions as per the Gnu Scientific Library, reference manual section 7.9. These functions are declared in header file \code{gsl_sf_dawson.h} } \usage{ dawson(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) dawson(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/Lambert.Rd0000644000176200001440000000155015103324656013475 0ustar liggesusers\name{Lambert} \alias{Lambert} \alias{lambert} \alias{lambert_W0} \alias{lambert_Wm1} \alias{Lambert_W0} \alias{Lambert_Wm1} \title{Lambert's W function} \description{ Lambert's W function as per the Gnu Scientific Library reference manual section 7.23. These functions are declared in header file \code{gsl_sf_lambert.h} } \usage{ lambert_W0(x, give=FALSE, strict=TRUE) lambert_Wm1(x, give=FALSE,strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ a <- runif(6) L <- lambert_W0(a) print(L*exp(L) - a) } \keyword{array} gsl/man/Log.Rd0000644000176200001440000000301115103324656012622 0ustar liggesusers\name{Log} \alias{Log} \alias{log} \alias{gsl_sf_log} \alias{log_abs} \alias{complex_log} \alias{log_1plusx} \alias{log_1plusx_mx} \title{Log functions} \description{ Log functions as per the Gnu Scientific Library, reference manual section 7.25 and AMS-55, chapter 4. These functions are declared in header file \code{gsl_sf_log.h} } \usage{ gsl_sf_log(x, give=FALSE, strict=TRUE) log_abs(x, give=FALSE, strict=TRUE) complex_log(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) log_1plusx(x, give=FALSE, strict=TRUE) log_1plusx_mx(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{zr}{In \code{complex_log()}, the real part of the argument} \item{zi}{In \code{complex_log()}, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{complex_log()}, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0.1,to=2,by=0.01) log(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/gsl-deprecated.Rd0000644000176200001440000000253415103324656014775 0ustar liggesusers\name{gsl-deprecated} \title{gsl-deprecated} \alias{gsl-deprecated} \alias{legendre_Plm_array} \alias{legendre_Plm_deriv_array} \alias{legendre_sphPlm_array} \alias{legendre_sphPlm_deriv_array} \alias{legendre_array_size} \alias{deprecated_legendre} \description{ Deprecated Legendre functions as per the Gnu Scientific Library reference manual section 7.24. } \usage{ legendre_Plm_array(...) legendre_Plm_deriv_array(...) legendre_sphPlm_array(...) legendre_sphPlm_deriv_array(...) legendre_array_size(...) deprecated_legendre(...) } \arguments{ \item{...}{(ignored)} } \note{ As of GSL-2.1, functions \itemize{ \item\code{gsl_sf_legendre_Plm_array} \item\code{gsl_sf_legendre_Plm_deriv_array} \item\code{gsl_sf_legendre_sphPlm_array} \item\code{gsl_sf_legendre_sphPlm_deriv_array} \item\code{gsl_sf_legendre_array_size} } are deprecated. This functionality is now provided in GSL by the \code{gsl_sf_legendre_array} suite of functions; in \R, use one of: \itemize{ \item\code{legendre_array()} \item\code{legendre_deriv_array()} \item\code{legendre_deriv_alt_array()} \item\code{legendre_deriv2_array()} \item\code{legendre_deriv2_alt_array()}. } These are documented under \code{?Legendre}. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \seealso{\code{\link{Legendre}}} \keyword{array} gsl/man/Debye.Rd0000644000176200001440000000167215103324656013144 0ustar liggesusers\name{Debye} \alias{Debye} \alias{debye} \alias{debye_1} \alias{debye_2} \alias{debye_3} \alias{debye_4} \title{Debye functions} \description{ Debye functions as per the Gnu Scientific Library, section 7.10 of the reference manual. These functions are declared in header file \code{gsl_sf_debye.h} } \usage{ debye_1(x, give=FALSE, strict=TRUE) debye_2(x, give=FALSE, strict=TRUE) debye_3(x, give=FALSE, strict=TRUE) debye_4(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=10,by=0.1) cbind(x,debye_1(x),debye_2(x),debye_3(x),debye_4(x)) #table 27.1 } \keyword{array} gsl/man/Misc.Rd0000644000176200001440000000507415103324656013007 0ustar liggesusers\name{Misc} \alias{Misc} \alias{misc} \alias{process.args} \alias{strictify} \title{Argument processing and general info} \description{ Various widely used functions in the package } \usage{ process.args(...) strictify(val,status) } \arguments{ \item{...}{Argument list to be coerced to the same length} \item{val}{Value component of \code{&result}} \item{status}{status integer} } \details{ Function \code{process.args()} is an internal function used to massage the arguments into a form suitable for passing to \code{.C()}. For example, in function \code{hyperg_0F1(c,x)}, one wants each of \code{hyperg_0F1(0.1, c(0.3,0.4))} and \code{hyperg_0F1(c(0.1,0.2), 0.3)} and \code{hyperg_0F1(c(0.1,0.2),c(0.3,0.4))} to behave sensibly. Function \code{process.args()} is used widely in the package, taking an arbitrary number of arguments and returning a list whose elements are vectors of the same length. Most of the special functions use \code{process.args()} to ensure that the returned value takes the attributes of the input argument with most elements where possible. Function \code{strictify()} uses the \code{status} value returned by the \dQuote{error} form of the \acronym{GSL} special functions to make values returned with a nonzero \code{error} a \code{NaN}. In most of the special functions, \code{strictify()} is called if argument \code{strict} takes its default value of \code{TRUE}. Setting it to \code{FALSE} sometimes returns a numerical value as per the \acronym{GSL} reference manual. In most of the special functions, if argument \code{give} takes its default value of \code{FALSE}, only a numerical value is returned. If \code{TRUE}, error information and the status (see preceding paragraph) is also returned. Following tips found on R-devel: \enumerate{ \item Download and extract source code of R-package \pkg{gsl} \item Use \code{gsl-config --libs} to get the path to \acronym{GSL}'s lib directory (\code{-L}), use \code{gsl-config --cflags} to get the path to \code{GSL}'s include directory (\code{-I}) \item Change \code{Makevars} in \code{gsl/src}: \itemize{ \item Add \code{-L} to \code{PKG_LIBS} \item Add (new) line: \code{PKG_CPPFLAGS=-I} } \item Install \code{gsl} via \code{LDFLAGS=-L; export LDFLAGS} \code{CPPFLAGS=-I;export CPPFLAGS} \code{R CMD INSTALL gsl} } } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \keyword{array} gsl/man/Zeta.Rd0000644000176200001440000000224215103324656013011 0ustar liggesusers\name{Zeta} \alias{Zeta} \alias{zeta_int} \alias{zeta} \alias{zetam1_int} \alias{zetam1} \alias{hzeta} \alias{eta_int} \alias{eta} \title{Zeta functions} \description{ Zeta functions as per the Gnu Scientific Library 7.31 and AMS-55, section 23.2. These functions are declared in header file \code{gsl_sf_zeta.h} } \usage{ zeta_int(n, give=FALSE, strict=TRUE) zeta(s, give=FALSE, strict=TRUE) zetam1_int(n, give=FALSE, strict=TRUE) zetam1(s, give=FALSE, strict=TRUE) hzeta(s, q, give=FALSE, strict=TRUE) eta_int(n, give=FALSE, strict=TRUE) eta(s, give=FALSE, strict=TRUE) } \arguments{ \item{n}{input: integer values} \item{s,q}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error.} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ n <- 1:10 cbind(n,zeta(n),eta(n)) #table 23.3, p 811 zeta_int(1:5) zeta(c(pi,pi*2)) zetam1_int(1:5) zetam1(c(pi,pi*2)) hzeta(1.1,1.2) eta_int(1:5) eta(c(pi,pi*2)) } \keyword{array} gsl/man/Clausen.Rd0000644000176200001440000000132715103324656013503 0ustar liggesusers\name{Clausen} \alias{Clausen} \alias{clausen} \title{Clausen functions} \description{ Clausen functions as per the Gnu Scientific Library section 7.6. These functions are declared in header file \code{gsl_sf_clausen.h} } \usage{ clausen(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \author{Robin K. S. Hankin} \references{\url{https://www.gnu.org/software/gsl/}} \examples{ x <- (0:30)*pi/180 clausen(x) #table 27.8, p1006 } \keyword{array} gsl/man/Elljac.Rd0000644000176200001440000000377315103324656013312 0ustar liggesusers\name{Elljac} \alias{Elljac} \alias{elljac} \alias{sn_cn_dn} \alias{gsl_sn} \alias{gsl_cn} \alias{gsl_dn} \alias{gsl_ns} \alias{gsl_nc} \alias{gsl_nd} \alias{gsl_sc} \alias{gsl_sd} \alias{gsl_cs} \alias{gsl_cd} \alias{gsl_ds} \alias{gsl_dc} \title{Elliptic functions} \description{ Elljac functions as per the Gnu Scientific Library, reference manual section 7.14 and AMS-55, chapter 16. These functions are declared in header file \code{gsl_sf_elljac.h} } \usage{ elljac(u, m, give=FALSE, strict=TRUE) gsl_sn(z,m) gsl_cn(z,m) gsl_dn(z,m) gsl_ns(z,m) gsl_nc(z,m) gsl_nd(z,m) gsl_sc(z,m) gsl_sd(z,m) gsl_cs(z,m) gsl_cd(z,m) gsl_ds(z,m) gsl_dc(z,m) } \arguments{ \item{u,m}{input: real values} \item{z}{input: complex values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ A straightforward wrapper for the \code{gsl_sf_elljac_e} function of the \acronym{GSL} library, except for \code{gsl_sn()}, \code{gsl_cn()}, and \code{gsl_dn()}, which implement 16.21.1 to 16.21.4 (thus taking complex arguments); and \code{gsl_ns()} et seq which are the minor elliptic functions. Function \code{sn_cn_dn()} is not really intended for the end-user. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ K <- ellint_F(phi=pi/2,k=sqrt(1/2)) #note the sqrt: m=k^2 u <- seq(from=0,to=4*K,by=K/24) jj <- elljac(u,1/2) plot(u,jj$sn,type="l",xaxt="n",yaxt="n",bty="n",ylab="",xlab="",main="Fig 16.1, p570") lines(u,jj$cn,lty=2) lines(u,jj$dn,lty=3) axis(1,pos=0,at=c(K,2*K,3*K,4*K),labels=c("K","2K","3K","4K")) abline(0,0) axis(2,pos=0,at=c(-1,1)) text(1.8*K,0.6,"sn u") text(1.6*K,-0.5,"cn u") text(2.6*K,0.9,"dn u") a <- seq(from=-5,to=5,len=100) jj <- outer(a,a,function(a,b){a}) z <- jj+1i*t(jj) e <- Re(gsl_cd(z,m=0.2)) e[abs(e)>10] <- NA contour(a,a,e,nlev=55) } \keyword{array} gsl/man/Expint.Rd0000644000176200001440000000371415103324656013362 0ustar liggesusers\name{Expint} \alias{Expint} \alias{expint} \alias{expint_E1} \alias{expint_E2} \alias{expint_En} \alias{expint_Ei} \alias{Shi} \alias{Chi} \alias{expint_3} \alias{Si} \alias{Ci} \alias{atanint} \title{exponential functions} \description{ Expint functions as per the Gnu Scientific Library, reference manual section 7.17 and AMS-55, chapter 5. These functions are declared in header file \code{gsl_sf_expint.h}. } \usage{ expint_E1(x, give=FALSE, strict=TRUE) expint_E2(x, give=FALSE, strict=TRUE) expint_En(n, x, give=FALSE, strict=TRUE) expint_Ei(x, give=FALSE, strict=TRUE) Shi(x, give=FALSE, strict=TRUE) Chi(x, give=FALSE, strict=TRUE) expint_3(x, give=FALSE, strict=TRUE) Si(x, give=FALSE, strict=TRUE) Ci(x, give=FALSE, strict=TRUE) atanint(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \note{ Function \code{expint_En()} requires \acronym{GSL} version 1.8 or later. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0.5, to=1, by=0.01) cbind(x,Si(x),Ci(x),expint_Ei(x),expint_E1(x)) #table 5.1 of AS, p239 x <- seq(from=0, to=12, len=100) plot(x,Ci(x),col="black",type="l",xaxt="n",yaxt="n",bty="n", xlab="",ylab="",main="Figure 5.6, p232", xlim=c(0,12),ylim=c(-1,2.0)) lines(x,Si(x)) axis(1,pos=0) axis(2,pos=0) abline(h=pi/2,lty=2) # Table 5.4, page 245: xvec <- seq(from=0,by=0.01,len=20) nvec <- c(2,3,4,10,20) x <- kronecker(xvec,t(rep(1,5))) n <- kronecker(t(nvec),rep(1,20)) ans <- cbind(x=xvec,expint_En(n,x)) rownames(ans) <- rep(" ",length(xvec)) colnames(ans) <- c("x",paste("n=",nvec,sep="")) class(ans) <- "I do not understand the first column" ans } \keyword{array} gsl/man/Coupling.Rd0000644000176200001440000000226415103324656013672 0ustar liggesusers\name{Coupling} \alias{Coupling} \alias{coupling} \alias{coupling_3j} \alias{coupling_6j} \alias{coupling_9j} \title{Coupling functions} \description{ Coupling functions as per the Gnu Scientific Library, reference manual section 7.8. These functions are declared in header file \code{gsl_sf_coupling.h} } \usage{ coupling_3j(two_ja, two_jb, two_jc, two_ma, two_mb, two_mc, give=FALSE, strict=TRUE) coupling_6j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, give=FALSE, strict=TRUE) coupling_9j(two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, give=FALSE, strict=TRUE) } \arguments{ \item{two_ja, two_jb, two_jc, two_jd, two_je, two_jf, two_jg, two_jh, two_ji, two_ma, two_mb, two_mc}{Arguments as per the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ coupling_3j(1,2,3,4,5,6) coupling_6j(1,2,3,4,5,6) coupling_9j(1,2,3,4,5,6,7,8,9) } \keyword{array} gsl/man/Poly.Rd0000644000176200001440000000263215103324656013034 0ustar liggesusers\name{Poly} \alias{Poly} \alias{poly} \alias{gsl_poly} \title{Polynomials} \description{ Polynomial functions as per the Gnu Scientific Library, reference manual section 6.1. These functions are defined in header file \code{gsl_poly.h} } \usage{ gsl_poly(c_gsl,x) } \arguments{ \item{c_gsl}{Coefficients of the poynomial (\code{c} in the function definition and the \acronym{GSL} ref manual) starting at the constant term and ending in the highest power; see details section. This argument is called \dQuote{\code{c_gsl}} (and not \dQuote{\code{c}}) to avoid confusion with \R function \code{c()}} \item{x}{input: real values} } \details{ One must be careful to avoid off-by-one errors. In C idiom, the function evaluates the polynomial \deqn{c[0]+c[1]x+c[2]x^2+\ldots+c[\mathrm{len}-1]x^{\mathrm{len}-1}}{c[0]+c[1]+...+c[len-1]x^(len-1)} where len is the second argument of \acronym{GSL} function \code{gsl_poly_eval()}. The \R idiom would be \deqn{c[1]+c[2]x+c[3]x^2+\ldots+c[\mathrm{len}]x^{\mathrm{len}-1}.}{c[1]+c[2]+...+c[len]x^(len-1).} This section is work-in-progress and more will be added when I have the time/need for the other functions here. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ a <- matrix(1:4,2,2) rownames(a) <- letters[1:2] (jj <- gsl_poly(1:3,a)) jj-(1 + 2*a + 3*a^2) #should be small } \keyword{array} gsl/man/gsl-package.Rd0000644000176200001440000000406315103324656014267 0ustar liggesusers\name{gsl-package} \alias{gsl-package} \alias{gsl} \alias{GSL} \docType{package} \title{ Wrappers for the Gnu Scientific Library } \description{ \packageDescription{gsl} } \details{ The DESCRIPTION file: \packageDESCRIPTION{gsl} \packageIndices{gsl} The function naming scheme directly copies the \acronym{GSL} manual except that leading \code{gsl_sf_} and, if present, the trailing \code{_e} is stripped: thus \code{gsl_sf_Airy_Ai_e} goes to \R function \code{airy_Ai()}; however, some functions retain the prefix to avoid conflicts (viz \code{gsl_sf_sin()}, \code{gsl_sf_cos()}, \code{gsl_sf_gamma()}, \code{gsl_sf_ choose()}, \code{gsl_sf_beta()}). \R function arguments have the same names as in the \acronym{GSL} reference manual, except for the quasirandom functions documented in the \code{Qrng} manpage. The package is organized into units corresponding to \acronym{GSL} header files; the \code{.c}, \code{.R}, and \code{.Rd} filenames match the \acronym{GSL} header filenames, except that the \code{.Rd} files are capitalized. Functions appear in all files in the same order as the \acronym{GSL} reference manual, which precludes the use of the tidying method given in section 3.1 of R-exts. Error forms of \acronym{GSL} functions (\code{_e} versions) are used if available. In general, documentation is limited to: (a), a pointer to the \acronym{GSL} reference book, which would in any case dominate any docs here; and (b), re-productions of some tables and figures in Abramowitz and Stegun (June 1964). } \author{ \packageAuthor{gsl} Maintainer: \packageMaintainer{gsl} } \references{ \itemize{ \item M. Abramowitz and I. A. Stegun 1965. \emph{Handbook of mathematical functions}. New York: Dover \item M. Galassi et al. 2007. \emph{GNU Scientific Library}. Reference Manual edition 1.10, for \acronym{GSL} version 1.10; 10 September 2007 \item R. K. S. Hankin 2006. \emph{Introducing gsl, a wrapper for the Gnu Scientific Library}. Rnews 6(4):24-26 } } \keyword{ package } \examples{ airy_Ai(1:5) } gsl/man/Gamma.Rd0000644000176200001440000000634215103324656013135 0ustar liggesusers\name{Gamma} \alias{Gamma} \alias{gamma} \alias{gsl_sf_gamma} \alias{lngamma} \alias{lngamma_sgn} \alias{gammastar} \alias{gammainv} \alias{lngamma_complex} \alias{taylorcoeff} \alias{fact} \alias{doublefact} \alias{lnfact} \alias{lndoublefact} \alias{gsl_sf_choose} \alias{lnchoose} \alias{poch} \alias{lnpoch} \alias{lnpoch_sgn} \alias{pochrel} \alias{gamma_inc_Q} \alias{gamma_inc_P} \alias{gamma_inc} \alias{gsl_sf_beta} \alias{lnbeta} \alias{beta_inc} \title{gamma functions} \description{ Gamma functions as per the Gnu Scientific Library reference manual section 7.19. These functions are declared in header file \code{gsl_sf_gamma.h} } \usage{ gsl_sf_gamma(x,give=FALSE,strict=TRUE) lngamma(x,give=FALSE,strict=TRUE) lngamma_sgn(x,give=FALSE,strict=TRUE) gammastar(x,give=FALSE,strict=TRUE) gammainv(x,give=FALSE,strict=TRUE) lngamma_complex(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) taylorcoeff(n,x,give=FALSE,strict=TRUE) fact(n,give=FALSE,strict=TRUE) doublefact(n,give=FALSE,strict=TRUE) lnfact(n,give=FALSE,strict=TRUE) lndoublefact(n,give=FALSE,strict=TRUE) gsl_sf_choose(n,m,give=FALSE,strict=TRUE) lnchoose(n,m,give=FALSE,strict=TRUE) poch(a,x,give=FALSE,strict=TRUE) lnpoch(a,x,give=FALSE,strict=TRUE) lnpoch_sgn(a,x,give=FALSE,strict=TRUE) pochrel(a,x,give=FALSE,strict=TRUE) gamma_inc_Q(a,x,give=FALSE,strict=TRUE) gamma_inc_P(a,x,give=FALSE,strict=TRUE) gamma_inc(a,x,give=FALSE,strict=TRUE) gsl_sf_beta(a,b,give=FALSE,strict=TRUE) lnbeta(a,b,give=FALSE,strict=TRUE) beta_inc(a,b,x,give=FALSE,strict=TRUE) } \arguments{ \item{x,a,b}{input: real values} \item{m,n}{input: integer value} \item{zr}{In \code{gamma_complex()}, the real part of the argument} \item{zi}{In \code{gamma_complex()}, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{gamma_complex()}, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ All functions as documented in the \acronym{GSL} reference manual section 7.19. Note that \code{gamma_inc_P()} gives the area of the left tail of the gamma distribution so, for example, \code{gamma_inc_P(1.8, 5) = pgamma(5, 1.8)} to numerical accuracy. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ gsl_sf_gamma(3) lngamma_complex(1+seq(from=0,to=5,by=0.1)*1i) #table 6.7, p 277 (LH col) #note 2pi phase diff jj <- expand.grid(1:10,2:5) x <- taylorcoeff(jj$Var1,jj$Var2) dim(x) <- c(10,4) x #table 23.5, p818 jj <- expand.grid(36:50,9:13) x <- gsl_sf_choose(jj$Var1,jj$Var2) dim(x) <- c(15,5) x #table 24.1, p829 (bottom bit) gamma_inc(1.2,1.3) beta(1.2, 1.3) lnbeta(1.2,1.55) beta_inc(1.2,1.4,1.6) gamma_inc_P(1.8, 5) - pgamma(5, 1.8) # should be small } \keyword{array} gsl/man/Hyperg.Rd0000644000176200001440000000364715103324656013356 0ustar liggesusers\name{Hyperg} \alias{Hyperg} \alias{hyperg} \alias{hyperg_0F1} \alias{hyperg_1F1_int} \alias{hyperg_1F1} \alias{hyperg_U_int} \alias{hyperg_U} \alias{hyperg_2F1} \alias{hyperg_2F1_conj} \alias{hyperg_2F1_renorm} \alias{hyperg_2F1_conj_renorm} \alias{hyperg_2F0} \title{Hypergeometric functions} \description{ Hypergeometric functions as per the Gnu Scientific Library reference manual section 7.21 and AMS-55, chapters 13 and 15. These functions are declared in header file \code{gsl_sf_hyperg.h} } \usage{ hyperg_0F1(c, x, give=FALSE, strict=TRUE) hyperg_1F1_int(m, n, x, give=FALSE, strict=TRUE) hyperg_1F1(a, b, x, give=FALSE, strict=TRUE) hyperg_U_int(m, n, x, give=FALSE, strict=TRUE) hyperg_U(a, b, x, give=FALSE, strict=TRUE) hyperg_2F1(a, b, c, x, give=FALSE, strict=TRUE) hyperg_2F1_conj(aR, aI, c, x, give=FALSE, strict=TRUE) hyperg_2F1_renorm(a, b, c, x, give=FALSE, strict=TRUE) hyperg_2F1_conj_renorm(aR, aI, c, x, give=FALSE, strict=TRUE) hyperg_2F0(a, b, x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{a,b,c}{input: real values} \item{m,n}{input: integer values} \item{aR,aI}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \note{ \dQuote{The circle of convergence of the Gauss hypergeometric series is the unit circle \eqn{|z|=1}{|z|=1}} (AMS, page 556). There is a known issue in \code{hyperg_2F1()} in GSL-2.6, \url{https://savannah.gnu.org/bugs/?54998} and the package returns the erroneous value given by GSL. } \examples{ hyperg_0F1(0.1,0.55) hyperg_1F1_int(2,3,0.555) hyperg_1F1(2.12312,3.12313,0.555) hyperg_U_int(2, 3, 0.555) hyperg_U(2.234, 3.234, 0.555) } \keyword{array} gsl/man/Pow_int.Rd0000644000176200001440000000137415103324656013532 0ustar liggesusers\name{Powint} \alias{pow_int} \alias{Pow_int} \alias{powint} \title{Power functions} \description{ Power functions as per the Gnu Scientific Library reference manual section 7.27. These functions are declared in the header file \code{gsl_sf_pow_int.h} } \usage{ pow_int(x, n, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ pow_int(pi/2,1:10) } \keyword{array} gsl/man/Dilog.Rd0000644000176200001440000000256215103324656013151 0ustar liggesusers\name{Dilog} \alias{Dilog} \alias{dilog} \alias{polylog} \alias{complex_dilog} \title{Dilog functions} \description{ Dilog functions as per the Gnu Scientific Library reference manual section 7.11. These functions are declared in header file \code{gsl_sf_dilog.h} } \usage{ dilog(x, give=FALSE, strict=TRUE) complex_dilog(r, theta, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{r,theta}{In \code{complex_dilog()}, input values. If \code{theta} takes its default value of \code{NULL}, interpret \code{r} as a complex-valued object. If \code{theta} is non-null, interpret \code{r} as the Modulus, and \code{theta} as the argument, of the complex object passed to \code{gsl_sf_complex_dilog_e()}} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if nonzero status is returned by the \acronym{GSL} function (\code{FALSE} means to return the value: use with caution)} } \details{All functions as documented in the \acronym{GSL} reference manual section 7.11.} \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0, to=0.1,by=0.01) cbind(x,"f(x)"=dilog(1-x)) #table 27.7, p1005 } \keyword{array} gsl/man/Laguerre.Rd0000644000176200001440000000232215103324656013653 0ustar liggesusers\name{Laguerre} \alias{Laguerre} \alias{laguerre} \alias{laguerre_1} \alias{laguerre_2} \alias{laguerre_3} \alias{laguerre_n} \title{Laguerre functions} \description{ Laguerre functions as per the Gnu Scientific Library reference manual section 7.22. These functions are declared in header file \code{gsl_sf_laguerre.h} } \usage{ laguerre_1(a, x, give=FALSE, strict=TRUE) laguerre_2(a, x, give=FALSE, strict=TRUE) laguerre_3(a, x, give=FALSE, strict=TRUE) laguerre_n(n, a, x, give=FALSE, strict=TRUE) } \arguments{ \item{a,x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error}} \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=6,len=100) plot(x,laguerre_n(2,0,x),xlim=c(0,6),ylim=c(-2,3), type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 22.9, p780") lines(x,laguerre_n(3,0,x)) lines(x,laguerre_n(4,0,x)) lines(x,laguerre_n(5,0,x)) axis(1,pos=0) axis(2,pos=0) } \keyword{array} gsl/man/Bessel.Rd0000644000176200001440000001657415103324656013340 0ustar liggesusers\name{Bessel} \alias{Bessel} \alias{bessel} \alias{bessel_J0} \alias{bessel_J1} \alias{bessel_Jn} \alias{bessel_Jn_array} \alias{bessel_Y0} \alias{bessel_Y1} \alias{bessel_Yn} \alias{bessel_Yn_array} \alias{bessel_I0} \alias{bessel_I1} \alias{bessel_In} \alias{bessel_In_array} \alias{bessel_I0_scaled} \alias{bessel_I1_scaled} \alias{bessel_In_scaled} \alias{bessel_In_scaled_array} \alias{bessel_K0} \alias{bessel_K1} \alias{bessel_Kn} \alias{bessel_Kn_array} \alias{bessel_K0_scaled} \alias{bessel_K1_scaled} \alias{bessel_Kn_scaled} \alias{bessel_Kn_scaled_array} \alias{bessel_j0} \alias{bessel_j1} \alias{bessel_j2} \alias{bessel_jl} \alias{bessel_jl_array} \alias{bessel_jl_steed_array} \alias{bessel_y0} \alias{bessel_y1} \alias{bessel_y2} \alias{bessel_yl} \alias{bessel_yl_array} \alias{bessel_i0_scaled} \alias{bessel_i1_scaled} \alias{bessel_i2_scaled} \alias{bessel_il_scaled} \alias{bessel_il_scaled_array} \alias{bessel_k0_scaled} \alias{bessel_k1_scaled} \alias{bessel_k2_scaled} \alias{bessel_kl_scaled} \alias{bessel_kl_scaled_array} \alias{bessel_Jnu} \alias{bessel_sequence_Jnu} \alias{bessel_Ynu} \alias{bessel_Inu} \alias{bessel_Inu_scaled} \alias{bessel_Knu} \alias{bessel_lnKnu} \alias{bessel_Knu_scaled} \alias{bessel_zero_J0} \alias{bessel_zero_J1} \alias{bessel_zero_Jnu} \title{Bessel functions} \description{ Bessel functions as per the Gnu Scientific Library, reference manual section 7.5 and AMS-55, chapters 9 and 10. These functions are declared in header file \code{gsl_sf_bessel.h} } \usage{ bessel_J0(x, give=FALSE, strict=TRUE) bessel_J1(x, give=FALSE, strict=TRUE) bessel_Jn(n,x, give=FALSE, strict=TRUE) bessel_Jn_array(nmin,nmax,x, give=FALSE, strict=TRUE) bessel_Y0(x, give=FALSE, strict=TRUE) bessel_Y1(x, give=FALSE, strict=TRUE) bessel_Yn(n,x, give=FALSE, strict=TRUE) bessel_Yn_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_I0(x, give=FALSE, strict=TRUE) bessel_I1(x, give=FALSE, strict=TRUE) bessel_In(n, x, give=FALSE, strict=TRUE) bessel_In_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_I0_scaled(x, give=FALSE, strict=TRUE) bessel_I1_scaled(x, give=FALSE, strict=TRUE) bessel_In_scaled(n, x, give=FALSE, strict=TRUE) bessel_In_scaled_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_K0(x, give=FALSE, strict=TRUE) bessel_K1(x, give=FALSE, strict=TRUE) bessel_Kn(n, x, give=FALSE, strict=TRUE) bessel_Kn_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_K0_scaled(x, give=FALSE, strict=TRUE) bessel_K1_scaled(x, give=FALSE, strict=TRUE) bessel_Kn_scaled(n, x, give=FALSE, strict=TRUE) bessel_Kn_scaled_array(nmin, nmax, x, give=FALSE, strict=TRUE) bessel_j0(x, give=FALSE, strict=TRUE) bessel_j1(x, give=FALSE, strict=TRUE) bessel_j2(x, give=FALSE, strict=TRUE) bessel_jl(l,x, give=FALSE, strict=TRUE) bessel_jl_array(lmax,x, give=FALSE, strict=TRUE) bessel_jl_steed_array(lmax, x, give=FALSE, strict=TRUE) bessel_y0(x, give=FALSE, strict=TRUE) bessel_y1(x, give=FALSE, strict=TRUE) bessel_y2(x, give=FALSE, strict=TRUE) bessel_yl(l, x, give=FALSE, strict=TRUE) bessel_yl_array(lmax, x, give=FALSE, strict=TRUE) bessel_i0_scaled(x, give=FALSE, strict=TRUE) bessel_i1_scaled(x, give=FALSE, strict=TRUE) bessel_i2_scaled(x, give=FALSE, strict=TRUE) bessel_il_scaled(l, x, give=FALSE, strict=TRUE) bessel_il_scaled_array(lmax, x, give=FALSE, strict=TRUE) bessel_k0_scaled(x, give=FALSE, strict=TRUE) bessel_k1_scaled(x, give=FALSE, strict=TRUE) bessel_k2_scaled(x, give=FALSE, strict=TRUE) bessel_kl_scaled(l,x, give=FALSE, strict=TRUE) bessel_kl_scaled_array(lmax,x, give=FALSE, strict=TRUE) bessel_Jnu(nu, x, give=FALSE, strict=TRUE) bessel_sequence_Jnu(nu, v, mode=0, give=FALSE, strict=TRUE) bessel_Ynu(nu, x, give=FALSE, strict=TRUE) bessel_Inu(nu, x, give=FALSE, strict=TRUE) bessel_Inu_scaled(nu, x, give=FALSE, strict=TRUE) bessel_Knu(nu, x, give=FALSE, strict=TRUE) bessel_lnKnu(nu, x, give=FALSE, strict=TRUE) bessel_Knu_scaled(nu, x, give=FALSE, strict=TRUE) bessel_zero_J0(s, give=FALSE, strict=TRUE) bessel_zero_J1(s, give=FALSE, strict=TRUE) bessel_zero_Jnu(nu, s, give=FALSE, strict=TRUE) } \arguments{ \item{x,v,nu}{input: real valued} \item{n,nmin,nmax,lmax}{input: integer valued} \item{l,s}{input: integer valued} \item{mode}{Integer, calc mode} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{strict or not} } \details{All as for the \acronym{GSL} reference manual section 7.5 } \author{Robin K. S. Hankin} \references{\url{https://www.gnu.org/software/gsl/}} \examples{ # Compare native R routine with GSL: besselK(0.55,4) - bessel_Knu(4,0.55) # should be small x <- seq(from=0,to=15,len=1000) plot(x,bessel_J0(x),xlim=c(0,16),ylim=c(-0.8,1.1),type="l", xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 9.1, p359") jj.Y0 <- bessel_Y0(x) jj.Y0[jj.Y0< -0.8] <- NA lines(x,jj.Y0) lines(x,bessel_J1(x),lty=2) jj.Y1 <- bessel_Y1(x) jj.Y1[jj.Y1< -0.8] <- NA lines(x,jj.Y1,lty=2) axis(1,pos=0,at=1:15, labels=c("","2","","4","","6","","8","","10","","12","","14","") ) axis(2,pos=0,at=seq(from=-8,to=10,by=2)/10, labels=c("-.8","-.6","-.4","-.2","0",".2",".4",".6",".8","1.0")) arrows(0,0,16,0,length=0.1,angle=10) arrows(0,0,0,1.1,length=0.1,angle=10) text(1.1, 0.83, expression(J[0])) text(0.37, 0.3, expression(J[1])) text(0.34,-0.3, expression(Y[0])) text(1.7,-0.5, expression(Y[1])) text(4.2, 0.43, expression(Y[1])) text(7.2, 0.33, expression(J[0])) text(8.6, 0.3, expression(J[0],paste(" ,"))) text(9.1, 0.3, expression(Y[0])) x <- seq(from=0,to=13,len=100) y <- t(bessel_jl_array(3,x)) y[y>0.6] <- NA matplot(x,y,col="black",type="l",xaxt="n",yaxt="n",bty="n", xlab="",ylab="",xlim=c(0,16),ylim=c(-0.3,0.75), main="Figure 10.1, p438") axis(1,pos=0,at=2*(1:7)) arrows(0,0,15,0,length=0.1,angle=10) arrows(0,0,0,0.65,length=0.1,angle=10) axis(2,pos=0,las=1,at=seq(from=-3,to=6)/10, labels=c("-.3","-.2","-.1","0",".1",".2",".3",".4",".5",".6")) text(0, 0.7, expression(J[n](x))) text(15.5, 0, expression(x)) text(2.2,0.58,expression(n==0)) text(3.2,0.4,expression(n==1)) text(4.3,0.3,expression(n==2)) text(6.0,0.22,expression(n==3)) x <- seq(from=0 ,to=5,by=0.1) cbind(x, bessel_J0(x),bessel_J1(x),bessel_Jn(2,x)) #table 9.1, p390 cbind(x, bessel_Y0(x),bessel_Y1(x),bessel_Yn(2,x)) #table 9.2, p391 t(bessel_Jn_array(3,9,x*2)) #table 9.2, p398 x <- seq(from=8,to=10,by=0.2) jj <- t(bessel_Jn(n=3:9,x=t(matrix(x,11,7)))) colnames(jj) <- paste("J",3:9,"(x)",sep="") cbind(x,jj) #another part of table 9.2, p398 x <- seq(from=8,to=10,by=0.2) jj <- t(bessel_Yn(n=3:9,x=t(matrix(x,11,7)))) colnames(jj) <- paste("J",3:9,"(x)",sep="") cbind(x,jj) #part of table 9.2, p399 cbind( x, #table 9.8, p416 exp(-x)*bessel_I0 (x), exp(-x)*bessel_I1 (x), x^(-2)*bessel_In(2,x) ) cbind( x, #table 9.8, p417 exp(x)*bessel_K0 (x), exp(x)*bessel_K1 (x), x^(2)*bessel_Kn(2,x) ) cbind(x, #table 10.1 , p457 bessel_j0(x), bessel_j1(x), bessel_j2(x), bessel_y0(x), bessel_y1(x), bessel_y2(x) ) cbind(0:9,"x=1"=bessel_yl(l=0:9,x=1), "x=2"=bessel_yl(l=0:9,x=2), "x=5"=bessel_yl(l=0:9,x=5)) #table 10.5, p466, top } \keyword{array} gsl/man/Coulomb.Rd0000644000176200001440000000603415103324656013511 0ustar liggesusers\name{Coulomb} \alias{Coulomb} \alias{coulomb} \alias{hydrogenicR_1} \alias{hydrogenicR} \alias{coulomb_wave_FG} \alias{coulomb_wave_F_array} \alias{coulomb_wave_FG_array} \alias{coulomb_wave_FGp_array} \alias{coulomb_wave_sphF_array} \alias{coulomb_CL} \alias{coulomb_CL_array} \title{Coulomb functions} \description{ Coulomb functions as per the Gnu Scientific Library, reference manual section 7.7 and AMS-55, chapter 14. These functions are declared in header file \code{gsl_sf_coulomb.h} } \usage{ hydrogenicR_1(Z, r, give=FALSE, strict=TRUE) hydrogenicR(n, l, Z, r, give=FALSE, strict=TRUE) coulomb_wave_FG(eta, x, L_F, k, give=FALSE, strict=TRUE) coulomb_wave_F_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_FG_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_FGp_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_wave_sphF_array(L_min, kmax, eta, x, give=FALSE,strict=TRUE) coulomb_CL(L,eta, give=FALSE,strict=TRUE) coulomb_CL_array(L_min, kmax, eta, give=FALSE,strict=TRUE) } \arguments{ \item{n,l,kmax}{input: integers} \item{Z,r,eta,x,L_F,L_min,k,L}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=14,len=300) jj <- coulomb_wave_FG(1,10,x,0) plot(x,jj$val_F,type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 14.1, p539") lines(x,jj$val_G,type="l",lty=2) axis(1,pos=0,at=1:14, labels=c("","2","","4","","6","","8","","10","","12","","14")) lines(c(0,1),c(0,0)) axis(2,pos=0) text(9.5, 0.63, expression(F[L])) text(8.5, 1.21, expression(G[L])) x <- seq(from=0,to=24,len=400) plot(x,coulomb_wave_FG(eta=1,x,L_F=0,k=0)$val_F,type="l", ylim=c(-1.3,1.7), xlim=c(0,26), xaxt="n",yaxt="n",bty="n",xlab="",ylab="",main="Figure 14.3, p541",lty=3) lines(x,coulomb_wave_FG(eta= 0,x,L_F=0,k=0)$val_F,type="l",lty=1) lines(x,coulomb_wave_FG(eta= 5,x,L_F=0,k=0)$val_F,type="l",lty=6) lines(x,coulomb_wave_FG(eta=10,x,L_F=0,k=0)$val_F,type="l",lty=6) lines(x,coulomb_wave_FG(eta=x/2,x,L_F=0,k=0)$val_F,type="l",lty="F3") axis(1,pos=0,at=1:24, labels=c("","2","","4","","","","8","","10","","12", "","14","","","","18","","","","22","","24")) lines(c(0,26),c(0,0)) axis(2,pos=0,at=0.2*(-6:9), labels=c("","-1.2","","-.8","","-.4","","0","",".4", "",".8","","1.2","","1.6")) text(2.5, -0.8, expression(eta == 0)) text(4.5,1.1,adj=0, expression(eta == 1)) text(14,1.4,adj=0, expression(eta == 5)) text(22,1.4,adj=0, expression(eta == 10)) x <- seq(from=0.5,to=10,by=0.5) jj <- coulomb_wave_FG(eta=t(matrix(x,20,5)), x=1:5,0,0) jj.F <- t(jj$val_F) jj.G <- t(jj$val_G) colnames(jj.F) <- 1:5 colnames(jj.G) <- 1:5 cbind(x,jj.F) #table 14.1, p 546, top bit. cbind(x,jj.G) #table 14.1, p 547, top bit. } \keyword{array} gsl/man/Airy.Rd0000644000176200001440000000535415103324656013021 0ustar liggesusers\name{Airy} \alias{Airy} \alias{airy} \alias{airy_Ai} \alias{airy_Bi} \alias{airy_Bi_e} \alias{airy_Ai_scaled} \alias{airy_Ai_scaled_e} \alias{airy_Bi_scaled} \alias{airy_Bi_scaled_e} \alias{airy_Ai_deriv} \alias{airy_Ai_deriv_e} \alias{airy_Bi_deriv} \alias{airy_Bi_deriv_e} \alias{airy_Ai_deriv_scaled} \alias{airy_Ai_deriv_scaled_e} \alias{airy_Bi_deriv_scaled} \alias{airy_Bi_deriv_scaled_e} \alias{airy_zero_Ai} \alias{airy_zero_Ai_e} \alias{airy_zero_Bi} \alias{airy_zero_Bi_e} \alias{airy_zero_Ai_deriv} \alias{airy_zero_Ai_deriv_e} \alias{airy_zero_Bi_deriv} \alias{airy_zero_Bi_deriv_e} \title{Airy functions} \description{ Airy functions as per the Gnu Scientific Library, reference manual section 7.4 and AMS-55, section 10.4. These functions are declared in header file \code{gsl_sf_airy.h} } \usage{ airy_Ai(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Ai(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_deriv(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_deriv(x, mode=0, give=FALSE, strict=TRUE) airy_Ai_deriv_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_Bi_deriv_scaled(x, mode=0, give=FALSE, strict=TRUE) airy_zero_Ai(n, give=FALSE, strict=TRUE) airy_zero_Bi(n, give=FALSE, strict=TRUE) airy_zero_Ai_deriv(n, give=FALSE, strict=TRUE) airy_zero_Bi_deriv(n, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{n}{input: integer values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE}, \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \details{ The zero functions return a status of \code{GSL_EDOM} and a value of \code{NA} for \eqn{n\leq 0}{n <= 0}. An example is given in the package vignette. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=1,by=0.01) f <- function(x){ cbind(x=x, Ai= airy_Ai(x), Aidash= airy_Ai_deriv(x), Bi=airy_Ai(x),Bidash=airy_Bi_deriv(x)) } f(x) #table 10.11, p475 f(-x) #table 10.11, p476 x <- 1:10 #table 10.13, p478 cbind(x, airy_zero_Ai(x), airy_Ai_deriv(airy_zero_Ai(x)), airy_zero_Ai_deriv(x), airy_Ai(airy_zero_Ai_deriv(x)), airy_zero_Bi(x), airy_Bi_deriv(airy_zero_Bi(x)), airy_zero_Bi_deriv(x), airy_Bi(airy_zero_Bi_deriv(x)) ) # Verify 10.4.4 and 10.4.5, p446: 3^(-2/3)/gamma(2/3) - airy_Ai(0) 3^(-1/3) / gamma(1/3) + airy_Ai_deriv(0) 3^(-1/6) / gamma(2/3) - airy_Bi(0) 3^(1/6) / gamma(1/3) - airy_Bi_deriv(0) # All should be small } gsl/man/Synchrotron.Rd0000644000176200001440000000145615103324656014444 0ustar liggesusers\name{Synchrotron} \alias{Synchrotron} \alias{synchrotron} \alias{synchrotron_1} \alias{synchrotron_2} \title{Synchrotron functions} \description{ Synchrotron functions as per the Gnu Scientific Library, reference section 7.29. These functions are declared in header file \code{gsl_sf_synchrotron.h} } \usage{ synchrotron_1(x, give=FALSE, strict=TRUE) synchrotron_2(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) synchrotron_1(x) synchrotron_2(x) } \keyword{array} gsl/man/Gegenbauer.Rd0000644000176200001440000000350415103324656014154 0ustar liggesusers\name{Gegenbauer} \alias{Gegenbauer} \alias{gegenbauer} \alias{gegenpoly_1} \alias{gegenpoly_2} \alias{gegenpoly_3} \alias{gegenpoly_n} \alias{gegenpoly_array} \title{Gegenbauer functions} \description{ Gegenbauer functions as per the Gnu Scientific Library reference manual section 7.20, and AMS-55, chapter 22. These functions are declared in header file \code{gsl_sf_gegenbauer.h} } \usage{ gegenpoly_1(lambda, x, give=FALSE,strict=TRUE) gegenpoly_2(lambda, x, give=FALSE,strict=TRUE) gegenpoly_3(lambda, x, give=FALSE,strict=TRUE) gegenpoly_n(n,lambda, x, give=FALSE,strict=TRUE) gegenpoly_array(nmax,lambda, x, give=FALSE,strict=TRUE) } \arguments{ \item{lambda,x}{input: real values} \item{n,nmax}{input: integer value} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error}} \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=-1 ,to=1,len=300) y <- gegenpoly_array(6,0.5,x) matplot(x,t(y[-(1:2),]), xlim=c(-1,1.2),ylim=c(-0.5,1.5), type="l",xaxt="n",yaxt="n",bty="n",xlab="",ylab="", main="Figure 22.5, p777",col="black") axis(1,pos=0) axis(2,pos=0) plot(x, gegenpoly_n(5,lambda=0.2, x,give=FALSE,strict=TRUE), xlim=c(-1,1),ylim=c(-1.5,1.5),main="Figure 22.5, p777", type="n",xaxt="n",yaxt="n",bty="n",xlab="",ylab="") lines(x, gegenpoly_n(5,lambda=0.2, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.4, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.6, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=0.8, x,give=FALSE,strict=TRUE)) lines(x, gegenpoly_n(5,lambda=1.0, x,give=FALSE,strict=TRUE)) axis(1,pos=0) axis(2,pos=0,las=1) } \keyword{array} gsl/man/Fermi-Dirac.Rd0000644000176200001440000000257315103324656014177 0ustar liggesusers\name{Fermi-Dirac} \alias{Fermi_Dirac} \alias{Fermi} \alias{fermi_dirac} \alias{fermi} \alias{fermi_dirac_m1} \alias{fermi_dirac_0} \alias{fermi_dirac_1} \alias{fermi_dirac_2} \alias{fermi_dirac_int} \alias{fermi_dirac_mhalf} \alias{fermi_dirac_half} \alias{fermi_dirac_3half} \alias{fermi_dirac_inc_0} \title{Fermi-Dirac functions} \description{ Fermi-Dirac functions as per the Gnu Scientific Library, reference manual section 7.18. These functions are declared in header file \code{gsl_sf_fermi_dirac.h} } \usage{ fermi_dirac_m1(x, give=FALSE, strict=TRUE) fermi_dirac_0(x, give=FALSE, strict=TRUE) fermi_dirac_1(x, give=FALSE, strict=TRUE) fermi_dirac_2(x, give=FALSE, strict=TRUE) fermi_dirac_int(j, x, give=FALSE, strict=TRUE) fermi_dirac_mhalf(x, give=FALSE, strict=TRUE) fermi_dirac_half(x, give=FALSE, strict=TRUE) fermi_dirac_3half(x, give=FALSE, strict=TRUE) fermi_dirac_inc_0(x, b, give=FALSE, strict=TRUE) } \arguments{ \item{x,j,b}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) fermi_dirac_m1(x) #table 7.5 of Ab and St } \keyword{array} gsl/man/Trig.Rd0000644000176200001440000000367315103324656013024 0ustar liggesusers\name{Trig} \alias{Trig} \alias{trig} \alias{gsl_sf_sin} \alias{gsl_sf_cos} \alias{hypot} \alias{sinc} \alias{complex_sin} \alias{complex_cos} \alias{complex_logsin} \alias{lnsinh} \alias{lncosh} \title{Trig functions} \description{ Trig functions as per the Gnu Scientific Library, reference manual section 7.30. These functions are declared in header file \code{gsl_sf_trig.h} } \usage{ gsl_sf_sin(x, give=FALSE, strict=TRUE) gsl_sf_cos(x, give=FALSE, strict=TRUE) hypot(x, y, give=FALSE, strict=TRUE) sinc(x, give=FALSE, strict=TRUE) complex_sin(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) complex_cos(zr, zi=NULL, r.and.i=TRUE, give=FALSE, strict=TRUE) lnsinh(x, give=FALSE, strict=TRUE) lncosh(x, give=FALSE, strict=TRUE) } \arguments{ \item{x,y}{input: real values} \item{zr}{In \code{gamma_complex()}, the real part of the argument} \item{zi}{In \code{complex_sin()} et seq, the imaginary part of the argument. If missing (ie takes the default value of \code{NULL}), interpret \code{zr} as complex, even if real} \item{r.and.i}{In \code{complex_sin()} et seq, Boolean variable with default value of \code{TRUE} meaning to return a complex variable as per the details section below; and \code{FALSE} meaning to return the values as advertised in the \acronym{GSL} manual} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) gsl_sf_sin(x) #table xx of Ab and St gsl_sf_cos(x) #table xx of Ab and St f <- function(x){abs(sin(x+1)-sin(x)*cos(1)-cos(x)*sin(1))} g <- function(x){abs(gsl_sf_sin(x+1)-gsl_sf_sin(x)*gsl_sf_cos(1)-gsl_sf_cos(x)*gsl_sf_sin(1))} f(100000:100010) g(100000:100010) } \keyword{array} gsl/man/Multimin.Rd0000644000176200001440000001412715103324656013711 0ustar liggesusers\name{multimin} \alias{Multimin} \alias{multimin} \alias{multimin.init} \alias{multimin.iterate} \alias{multimin.restart} \alias{multimin.fminimizer.size} \title{Function minimization} \description{ \emph{These functions have been removed from the package temporarily, pending a permanent fix.} Function minimization using the Gnu Scientific Library, reference manual section 35. These functions are declared in header file \code{gsl_multimin.h} Several algorithms for finding (local) minima of functions in one or more variables are provided. All of the algorithms operate locally, in the sense that they maintain a best guess and require the function to be continuous. Apart from the Nelder-Mead algorithm, these algorithms also use a derivative. } \usage{ multimin(..., prec=0.0001) multimin.init(x, f, df=NA, fdf=NA, method=NA, step.size=NA, tol=NA) multimin.iterate(state) multimin.restart(state) multimin.fminimizer.size(state) } \arguments{ \item{...}{In function \code{multimin()}, the argument list passed to \code{multimin.init()}} \item{x}{A starting point. These algorithms are faster with better initial guesses} \item{f}{The function to minimize. This function must take a single \code{numeric} vector as input, and output a \code{numeric} scalar} \item{df}{The derivative of \code{f}. This is required for all algorithms except Nelder-Mead} \item{fdf}{A function that evaluates \code{f} and \code{df} simultaneously. This is optional, and is only useful if simultaneous evaluation is faster} \item{method}{The algorithm to use, which is one of \dQuote{\code{conjugate-fr}}, \dQuote{\code{conjugate-pr}}, \dQuote{\code{bfgs}}, \dQuote{\code{steepest-descent}} and \dQuote{\code{nm}}} \item{step.size}{This step size guides the algorithm to pick a good distance between points in its search} \item{tol}{This parameter is relevant for gradient-based methods. It controls how much the gradient should flatten out in each line search. More specifically, let \eqn{u(t) = f(x + st)} be the function restricted to the search ray. Then a point \eqn{t} is tolerable if \eqn{u'(t) < tol u'(0)}. Higher values give more lax linesearches. This parameter trades-off searching intensively in the outer loop (finding search directions) versus the inner loop (finding a good point in a particular direction)} \item{prec}{The stopping-rule precision parameter. For the derivative-based methods, a solution is good enough if the norm of the gradient is smaller than \code{prec}. For the non-derivative-based methods, a solution is good enough if the norm of successive solutions is smaller than \code{prec}} \item{state}{This stores all information relating to the progress of the optimization problem} } \details{ There are two ways to call \code{multimin}. The simple way is to merely call \code{multimin} directly. A more complicated way is to call \code{multimin.init} first, and then repeatedly call \code{multimin.iterate} until the guess gets good enough. In addition, \code{multimin.restart} can be used with the second approach to discard accumulated information (such as curvature information) if that information turns out to be unhelpful. This is roughly equivalent to calling \code{multimin.init} by setting the starting point to be the current best guess. All of the derivative-based methods consist of iterations that pick a descent direction, and conduct a line search for a better point along the ray in that direction from the current point. The Fletcher-Reeves and Polak-Ribiere conjugate gradient algorithms maintain a a vector that summarizes the curvature at that point. These are useful for high-dimensional problems (eg: more than 100 dimensions) because they don't use matrices which become expensive to keep track of. The Broyden-Fletcher-Goldfarb-Shanno is better for low-dimensional problems, since it maintains an approximation of the Hessian of the function as well, which gives better curvature information. The steepest-descent algorithm is a naive algorithm that does not use any curvature information. The Nelder-Mead algorithm which does not use derivatives. } \value{All of these functions return a state variable, which consists of the following items: \item{internal.state}{Bureaucratic stuff for communicating with \acronym{GSL}} \item{x}{The current best guess of the optimal solution} \item{f}{The value of the function at the best guess} \item{df}{The derivative of the function at the best guess} \item{is.fdf}{TRUE if the algorithm is using a derivative} \item{code}{The \acronym{GSL} return code from the last iteration} } \references{\url{https://www.gnu.org/software/gsl/}} \seealso{ \code{optim} and \code{nlm} are the standard optimization functions in R. \code{deriv} and \code{D} are the standard symbolic differentation functions in R. \code{Ryacas} provides more extensive differentiation support using Yet Another Computer Algebra System. \code{numericDeriv} is the standard numerical differentation function in R. \acronym{GSL} can also do numerical differentiation, but no-one has written an R interface yet. \code{multimin} requires the objective function to have a single (vector) argument. \code{unlist} and \code{relist} are useful for converting between more convenient forms. } \author{Andrew Clausen \email{clausen@econ.upenn.edu}} \note{The source code for the functions documented here conditionalizes on \code{WIN32}; under windows there is a slight memory leak.} \examples{ # COMMENTED OUT PENDING PERMANENT FIX # The Rosenbrock function: # x0 <- c(-1.2, 1) # f <- function(x) (1 - x[1])^2 + 100 * (x[2] - x[1]^2)^2 # df <- function(x) c(-2*(1 - x[1]) + 100 * 2 * (x[2] - x[1]^2) * (-2*x[1]), # 100 * 2 * (x[2] - x[1]^2)) # # # The simple way to call multimin. # state <- multimin(x0, f, df) # print(state$x) # # # The fine-control way to call multimin. # state <- multimin.init(x0, f, df, method="conjugate-fr") # for (i in 1:200) # state <- multimin.iterate(state) # print(state$x) } \keyword{array} gsl/man/figures/0000755000176200001440000000000015103324656013263 5ustar liggesusersgsl/man/figures/gsl.png0000644000176200001440000011351015103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%S";;oݺuJrpޙ$Ab@䤎;֝w޽)J,_ZTTdj)G"r,DNd2+KJJ42'1c=>eʔaؾr!vXX߱l2-9<#r:.On5jԐ\III}Fٲe`) r ŀXVs^^);;_Ŀ5|{YYY[LLL\ jmmHHH9qZ?#G7l^hQ@"r8@䢂>CuUUսI& eyyy!;;R@Çn޼9[ MoVoPPP HDŀȍv ő#G=q„ 8vX}lllGDŀ 4 UUULbϞ=/rBD3f̈˗/+O:u#<<zfCCCGBBB$K{R= UQQq0..nA``ා[$"ߩGtV>_IENDB`gsl/man/Qrng.Rd0000644000176200001440000000410015103324656013010 0ustar liggesusers\name{Qrng} \alias{Qrng} \alias{qrng} \alias{qrng_alloc} \alias{qrng_clone} \alias{qrng_init} \alias{qrng_name} \alias{qrng_size} \alias{qrng_get} \title{Quasi-random sequences} \description{ Quasi-random sequences as per the Gnu Scientific Library, reference manual section 18. These functions are declared in header file \code{gsl_qrng.h} } \usage{ qrng_alloc(type = c("niederreiter_2", "sobol"), dim) qrng_clone(q) qrng_init(q) qrng_name(q) qrng_size(q) qrng_get(q, n = 1) } \arguments{ \item{type}{Type of sequence} \item{dim}{Dimension of sequence} \item{q}{Generator from \code{qrng_alloc} or \code{qrng_clone}} \item{n}{How many vectors to generate} } \details{ These are wrappers for the quasi-random sequence functions from the \acronym{GSL} \url{https://www.gnu.org/software/gsl/} with arguments corresponding to those from the library, with a few exceptions. In particular: I have used \code{dim} where the \acronym{GSL} uses just \code{d}; I have added the \code{n} argument to the \code{qrng_get} function, so that a single call can generate \code{n} vectors; I have not provided \R functions corresponding to \code{qrng_free} (because \R will automatically free the generator when it is garbage collected) or \code{qrng_state} or \code{qrng_memcpy} (because these don't make sense within \R.) } \value{ \code{qrng_alloc}, \code{qrng_clone} and \code{qrng_init} return an external pointer to the C structure representing the generator. The internals of this structure are not accessible from within \R. \code{qrng_name} returns a character vector giving the name of the generator. \code{qrng_size} returns an integer value giving the internal memory usage of the generator. \code{qrng_get} returns a matrix with \code{n} rows and \code{dim} columns. Each row is a vector in the quasi-random sequence. } \references{ \url{https://www.gnu.org/software/gsl/} } \author{ Duncan Murdoch } \examples{ q <- qrng_alloc(dim = 2) qrng_name(q) qrng_get(q, 10) } \keyword{ datagen } \keyword{ distribution } gsl/man/Rng.Rd0000644000176200001440000000414015103324656012633 0ustar liggesusers\name{Rng} \alias{Rng} \alias{rng} \alias{rng_alloc} \alias{rng_clone} \alias{rng_max} \alias{rng_min} \alias{rng_name} \alias{rng_set} \alias{rng_get} \alias{rng_uniform} \alias{rng_uniform_int} \alias{rng_uniform_pos} \title{Random numbers generation} \description{Random number generation with the Gnu Scientific Library, as per the reference manual section 17} \usage{ rng_alloc(type) rng_clone(r) rng_name(r) rng_max(r) rng_min(r) rng_set(r, seed) rng_get(r, length) rng_uniform(r, length) rng_uniform_int(r, N, length) rng_uniform_pos(r, length) } \arguments{ \item{type}{In function \code{rng_alloc()}, type of random number generator. This argument is taken to be a character string which is matched to the names of the random number generators given in the \acronym{GSL} manual section 17.9, with the initial \dQuote{\code{gsl_rng_}} removed (for example, to use generator \code{gsl_rng_ranlux}, set \code{type} to \code{ranlux}). Partial matching is used; a null string is interpreted as \code{mt19937}.} \item{r}{Instance of a random number generator. Generate this using function \code{rng_alloc()}.} \item{seed}{Random number seed} \item{length}{Length of vector of random numbers to create} \item{N}{In function \code{rng_uniform_int()}, upper bound of uniform distribution} } \details{ These are wrappers for the random number generator functions from the \acronym{GSL} \url{https://www.gnu.org/software/gsl/} with arguments corresponding to those from the library. Calling \code{rng_free} is not necessary as R performs garbage collection automatically. The functions that return random numbers (\code{rng_get}, \code{rng_uniform}, \code{rng_uniform_int}, \code{rng_uniform_pos}) take an extra argument that specifies the length of the vector of random numbers to be returned. } \value{ Function \code{rng_alloc()} returns an external pointer to a \acronym{GSL} random number generator. } \references{\url{https://www.gnu.org/software/gsl/}} \author{Max Bruche} \examples{ r <- rng_alloc("cmrg") rng_set(r, 100) rng_uniform(r, 10) } \keyword{datagen} \keyword{distribution} gsl/man/Legendre.Rd0000644000176200001440000001007015103324656013631 0ustar liggesusers\name{Legendre} \alias{Legendre} \alias{legendre} \alias{legendre_P1} \alias{legendre_P2} \alias{legendre_P3} \alias{legendre_Pl} \alias{legendre_Pl_array} \alias{legendre_Q0} \alias{legendre_Q1} \alias{legendre_Ql} \alias{legendre_array_n} \alias{legendre_array_index} \alias{legendre_check_args} \alias{legendre_array} \alias{legendre_deriv_array} \alias{legendre_deriv_alt_array} \alias{legendre_deriv2_array} \alias{legendre_deriv2_alt_array} \alias{legendre_Plm} \alias{legendre_sphPlm} \alias{conicalP_half} \alias{conicalP_mhalf} \alias{conicalP_0} \alias{conicalP_1} \alias{conicalP_sph_reg} \alias{conicalP_cyl_reg} \alias{legendre_H3d_0} \alias{legendre_H3d_1} \alias{legendre_H3d} \alias{legendre_H3d_array} \alias{conical} \alias{Conical} \title{Legendre functions} \description{ Legendre functions as per the Gnu Scientific Library reference manual section 7.24, and AMS-55, chapter 8. These functions are declared in header file \code{gsl_sf_legendre.h} } \usage{ legendre_P1(x, give=FALSE, strict=TRUE) legendre_P2(x, give=FALSE, strict=TRUE) legendre_P3(x, give=FALSE, strict=TRUE) legendre_Pl(l, x, give=FALSE, strict=TRUE) legendre_Pl_array(lmax, x, give=FALSE, strict=TRUE) legendre_Q0(x, give=FALSE, strict=TRUE) legendre_Q1(x, give=FALSE, strict=TRUE) legendre_Ql(l, x, give=FALSE, strict=TRUE) legendre_array_n(lmax) legendre_array_index(l,m) legendre_check_args(x,lmax,norm,csphase) legendre_array(x, lmax, norm=1, csphase= -1) legendre_deriv_array(x, lmax, norm=1, csphase= -1) legendre_deriv_alt_array(x, lmax, norm=1, csphase= -1) legendre_deriv2_array(x, lmax, norm=1, csphase= -1) legendre_deriv2_alt_array(x, lmax, norm=1, csphase= -1) legendre_Plm(l, m, x, give=FALSE, strict=TRUE) legendre_sphPlm(l, m, x, give=FALSE, strict=TRUE) conicalP_half(lambda, x, give=FALSE, strict=TRUE) conicalP_mhalf(lambda, x, give=FALSE, strict=TRUE) conicalP_0(lambda, x, give=FALSE, strict=TRUE) conicalP_1(lambda, x, give=FALSE, strict=TRUE) conicalP_sph_reg(l, lambda, x, give=FALSE, strict=TRUE) conicalP_cyl_reg(m, lambda, x, give=FALSE, strict=TRUE) legendre_H3d_0(lambda, eta, give=FALSE, strict=TRUE) legendre_H3d_1(lambda, eta, give=FALSE, strict=TRUE) legendre_H3d(l, lambda, eta, give=FALSE, strict=TRUE) legendre_H3d_array(lmax, lambda, eta, give=FALSE, strict=TRUE) } \arguments{ \item{eta,lambda,x}{input: real values} \item{l,m,lmax}{input: integer values} \item{csphase,norm}{Options for use with \code{legendre_array()}} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if nonzero status is returned by the \acronym{GSL} function (\code{FALSE} means to return the value: use with caution)} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ theta <- seq(from=0,to=pi/2,len=100) plot(theta,legendre_P1(cos(theta)),type="l",ylim=c(-0.5,1), main="Figure 8.1, p338") abline(1,0) lines(theta,legendre_P2(cos(theta)),type="l") lines(theta,legendre_P3(cos(theta)),type="l") x <- seq(from=0,to=1,len=600) plot(x, legendre_Plm(3,1,x), type="l",lty=3,main="Figure 8.2, p338: note sign error") lines(x,legendre_Plm(2,1,x), type="l",lty=2) lines(x,legendre_Plm(1,1,x), type="l",lty=1) abline(0,0) plot(x,legendre_Ql(0,x),xlim=c(0,1), ylim=c(-1,1.5), type="l",lty=1, main="Figure 8.4, p339") lines(x,legendre_Ql(1,x),lty=2) lines(x,legendre_Ql(2,x),lty=3) lines(x,legendre_Ql(3,x),lty=4) abline(0,0) #table 8.1 of A&S: t(legendre_Pl_array(10, seq(from=0,to=1,by=0.01))[1+c(2,3,9,10),]) #table 8.3: f <- function(n){legendre_Ql(n, seq(from=0,to=1,by=0.01))} sapply(c(0,1,2,3,9,10),f) # Some checks for the legendre_array() series: # P_6^1(0.3): legendre_array(0.3,7)[7,2] # MMA: LegendreP[6,1,0.3]; note off-by-one issue # d/dx P_8^5(x) @ x=0.2: legendre_deriv_array(0.2,8)[9,6] # MMA: D[LegendreP[8,5,x],x] /. {x -> 0.2} # alternative derivatives: legendre_deriv_alt_array(0.4,8)[9,6] # D[LegendreP[8,5,Cos[x]],x] /. x -> ArcCos[0.4] } \keyword{array} gsl/man/Transport.Rd0000644000176200001440000000171515103324656014106 0ustar liggesusers\name{Transport} \alias{Transport} \alias{transport} \alias{transport_2} \alias{transport_3} \alias{transport_4} \alias{transport_5} \title{Transport functions} \description{ Transport functions as per the Gnu Scientific Library, reference manual section 7.29. These functions are defined in header file \code{gsl_sf_transport.h} } \usage{ transport_2(x, give=FALSE, strict=TRUE) transport_3(x, give=FALSE, strict=TRUE) transport_4(x, give=FALSE, strict=TRUE) transport_5(x, give=FALSE, strict=TRUE) } \arguments{ \item{x}{input: real values} \item{give}{Boolean with \code{TRUE} meaning to return a list of three items: the value, an estimate of the error, and a status number.} \item{strict}{Boolean, with \code{TRUE} meaning to return \code{NaN} if status is an error.} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ x <- seq(from=0,to=2,by=0.01) transport_2(x) transport_3(x) } \keyword{array} gsl/man/Ellint.Rd0000644000176200001440000000476315103324656013347 0ustar liggesusers\name{Ellint} \alias{Ellint} \alias{ellint} \alias{ellint_Kcomp} \alias{ellint_Ecomp} \alias{ellint_F} \alias{ellint_E} \alias{ellint_P} \alias{ellint_D} \alias{ellint_RC} \alias{ellint_RD} \alias{ellint_RF} \alias{ellint_RJ} \title{Elliptic functions} \description{ Elliptic functions as per the Gnu Scientific Library, reference manual section 7.13 and AMS-55, chapter 17. These functions are declared in header file \code{gsl_sf_ellint.h} } \usage{ ellint_Kcomp(k, mode=0, give=FALSE,strict=TRUE) ellint_Ecomp(k, mode=0, give=FALSE,strict=TRUE) ellint_F(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_E(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_P(phi,k,n, mode=0, give=FALSE,strict=TRUE) ellint_D(phi,k, mode=0, give=FALSE,strict=TRUE) ellint_RC(x, y, mode=0, give=FALSE,strict=TRUE) ellint_RD(x, y, z, mode=0, give=FALSE,strict=TRUE) ellint_RF(x, y, z, mode=0, give=FALSE,strict=TRUE) ellint_RJ(x, y, z, p, mode=0, give=FALSE,strict=TRUE) } \arguments{ \item{phi,k,n,p,x,y,z}{input: real values} \item{give}{Boolean, with default \code{FALSE} meaning to return just the answers, and \code{TRUE} meaning to return a status vector as well} \item{strict}{Boolean} \item{mode}{input: mode. For \code{GSL_PREC_DOUBLE}, \code{GSL_PREC_SINGLE}, \code{GSL_PREC_APPROX} use \code{0,1,2} respectively.} } \references{\url{https://www.gnu.org/software/gsl/}} \author{Robin K. S. Hankin} \examples{ ellint_Kcomp(0.3) ellint_Ecomp(0.3) ellint_F(0.4,0.7) ellint_E(0.4,0.7) ellint_P(0.4,0.7,0.3) ellint_D(0.4,0.3) ellint_RC(0.5,0.6) ellint_RD(0.5,0.6,0.7) ellint_RF(0.5,0.6,0.7) ellint_RJ(0.5,0.6,0.7,0.1) x <- seq(from=0,to=0.5,by=0.01) col1 <- ellint_Kcomp(sqrt(x)) col2 <- ellint_Kcomp(sqrt(1-x)) col3 <- exp(-pi*col2/col1) cbind(x,col1,col2,col3) #table 17.1, p608 x <- 0:45 col1 <- ellint_Kcomp(sin(pi/180*x)) col2 <- ellint_Kcomp(sin(pi/2-pi/180*x)) col3 <- exp(-pi*col2/col1) cbind(x,col1,col2,col3) #table 17.2, p610 x <- seq(from=0,to=90,by=2) f <- function(a){ellint_F(phi=a*pi/180,sin(x*pi/180))} g <- function(a){ellint_E(phi=a*pi/180,sin(x*pi/180))} h <- function(a,n){ellint_P(phi=a*pi/180,sin( a*15*pi/180),n)} i <- function(x){ellint_P(phi=x*pi/180, k=sin((0:6)*15*pi/180), n= -0.6)} cbind(x,f(5),f(10),f(15),f(20),f(25),f(30)) #table 17.5, p613 cbind(x,g(5),g(10),g(15),g(20),g(25),g(30)) #table 17.6, p616 cbind(i(15),i(30),i(45),i(60),i(75),i(90)) #table 17.9, #(BOTTOM OF p625) } \keyword{array} gsl/DESCRIPTION0000644000176200001440000000205215104334772012552 0ustar liggesusersPackage: gsl Version: 2.1-9 Depends: R (>= 4.5.0) Title: Wrapper for the Gnu Scientific Library Authors@R: c(person(given=c("Robin", "K. S."), family="Hankin", role = c("aut","cre"), email="hankin.robin@gmail.com", comment = c(ORCID = "0000-0001-5982-0415")), person(given="Andrew",family="Clausen",role="ctb",comment="multimin functionality"), person(given="Duncan",family="Murdoch",role="ctb",comment="qrng functions")) SystemRequirements: Gnu Scientific Library version >= 2.5 Description: An R wrapper for some of the functionality of the Gnu Scientific Library. Maintainer: Robin K. S. Hankin License: GPL-3 URL: https://github.com/RobinHankin/gsl BugReports: https://github.com/RobinHankin/gsl/issues NeedsCompilation: yes Author: Robin K. S. Hankin [aut, cre] (ORCID: ), Andrew Clausen [ctb] (multimin functionality), Duncan Murdoch [ctb] (qrng functions) Repository: CRAN Packaged: 2025-11-10 08:15:06 UTC; rhankin Date/Publication: 2025-11-10 10:10:02 UTC gsl/INSTALL0000644000176200001440000000270315103324656012077 0ustar liggesusersThe gsl R package is a wrapper for the GSL C library (note capitalization). Installing gsl from source requires you to download and install GSL first. Ensure that you can compile and run a simple test program such as the example program near the start of the GSL Reference Manual. You will need at least GSL version 2.5: using earlier versions will give errors such as error: too few arguments to function 'gsl_sf_ellint_D_e' Some linux users report that is is possoble to go to the Ubuntu Software Center and install "GNU Scientific Library (GSL) -- development package", which has the name "libgsl0-dev". If the gsl R package builds successfully but will not load, make sure to inform your system linker/loader where to find the GSL libraries used to compile it. That step may be missed when using a manual GSL installation as opposed to one performed by a package manager. One common problem when installing from source is that the system cannot find "gsl-config". Typically, install.packages() reports something like checking for gsl-config... no configure: error: gsl-config not found, is GSL installed? ERROR: configuration failed for package 'gsl' On unix-type systems, "which gsl-config" locates the file gsl-config; ensure that the $PATH environment variable includes the directory where gsl-config is held. Usually, this is not necessary with default settings, but many users wish to work with GSL files which are installed in a non-standard location.