./PaxHeaders.7911/gsl-2.1.10000644000000000000000000000013213311744161012037 xustar0030 mtime=1529333873.547777238 30 atime=1529333876.223775085 30 ctime=1529333876.223775085 gsl-2.1.1/0000755000175000017500000000000013311744161012215 5ustar00bectbect00000000000000gsl-2.1.1/PaxHeaders.7911/Makefile0000644000000000000000000000013213311744161013417 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/Makefile0000644000175000017500000002030713311744161013657 0ustar00bectbect00000000000000## Copyright 2015-2016 Carnë Draug ## Copyright 2015-2016 Oliver Heimlich ## Copyright 2017 Julien Bect ## Copyright 2017 Olaf Till ## ## Copying and distribution of this file, with or without modification, ## are permitted in any medium without royalty provided the copyright ## notice and this notice are preserved. This file is offered as-is, ## without any warranty. ## Some basic tools (can be overriden using environment variables) SED ?= sed TAR ?= tar GREP ?= grep CUT ?= cut TR ?= tr ## Note the use of ':=' (immediate set) and not just '=' (lazy set). ## http://stackoverflow.com/a/448939/1609556 package := $(shell $(GREP) "^Name: " DESCRIPTION | $(CUT) -f2 -d" " | \ $(TR) '[:upper:]' '[:lower:]') version := $(shell $(GREP) "^Version: " DESCRIPTION | $(CUT) -f2 -d" ") ## This are the paths that will be created for the releases. Using ## $(realpath ...) avoids problems with symlinks. target_dir := $(realpath .)/target release_dir := $(target_dir)/$(package)-$(version) release_tarball := $(target_dir)/$(package)-$(version).tar.gz html_dir := $(target_dir)/$(package)-html html_tarball := $(target_dir)/$(package)-html.tar.gz installation_dir := $(target_dir)/.installation package_list := $(installation_dir)/.octave_packages install_stamp := $(installation_dir)/.install_stamp ## These can be set by environment variables which allow to easily ## test with different Octave versions. ifndef OCTAVE OCTAVE := octave endif OCTAVE := $(OCTAVE) --no-gui --silent --no-history --norc MKOCTFILE ?= mkoctfile ## Command used to set permissions before creating tarballs FIX_PERMISSIONS ?= chmod -R a+rX,u+w,go-w,ug-s ## Detect which VCS is used vcs := $(if $(wildcard .hg),hg,$(if $(wildcard .git),git,unknown)) ifeq ($(vcs),hg) release_dir_dep := .hg/dirstate endif ifeq ($(vcs),git) release_dir_dep := .git/index endif ## .PHONY indicates targets that are not filenames ## (https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html) .PHONY: help ## make will display the command before runnning them. Use @command ## to not display it (makes specially sense for echo). help: @echo "Targets:" @echo " dist - Create $(release_tarball) for release." @echo " html - Create $(html_tarball) for release." @echo " release - Create both of the above and show md5sums." @echo " install - Install the package in $(installation_dir), where it is not visible in a normal Octave session." @echo " check - Execute package tests." @echo " doctest - Test the help texts with the doctest package." @echo " run - Run Octave with the package installed in $(installation_dir) in the path." @echo " clean - Remove everything made with this Makefile." ## ## Recipes for release tarballs (package + html) ## .PHONY: release dist html clean-tarballs clean-unpacked-release ## To make a release, build the distribution and html tarballs. release: dist html md5sum $(release_tarball) $(html_tarball) @echo "Upload @ https://sourceforge.net/p/octave/package-releases/new/" @echo " and note the changeset the release corresponds to" ## dist and html targets are only PHONY/alias targets to the release ## and html tarballs. dist: $(release_tarball) html: $(html_tarball) ## An implicit rule with a recipe to build the tarballs correctly. %.tar.gz: % $(TAR) -c -f - --posix -C "$(target_dir)/" "$(notdir $<)" | gzip -9n > "$@" clean-tarballs: @echo "## Cleaning release tarballs (package + html)..." -$(RM) $(release_tarball) $(html_tarball) @echo ## Create the unpacked package. ## ## Notes: ## * having ".hg/dirstate" (or ".git/index") as a prerequesite means it is ## only rebuilt if we are at a different commit. ## * the variable RM usually defaults to "rm -f" ## * having this recipe separate from the one that makes the tarball ## makes it easy to have packages in alternative formats (such as zip) ## * note that if a commands needs to be run in a specific directory, ## the command to "cd" needs to be on the same line. Each line restores ## the original working directory. $(release_dir): $(release_dir_dep) -$(RM) -r "$@" ifeq (${vcs},hg) hg archive --exclude ".hg*" --type files "$@" endif ifeq (${vcs},git) git archive --format=tar --prefix="$@/" HEAD | $(TAR) -x $(RM) "$@/.gitignore" endif ## Don't fall back to run the supposed necessary contents of ## 'bootstrap' here. Users are better off if they provide ## 'bootstrap'. Administrators, checking build reproducibility, can ## put in the missing 'bootstrap' file if they feel they know its ## necessary contents. ifneq (,$(wildcard src/bootstrap)) cd "$@/src" && ./bootstrap && $(RM) -r "autom4te.cache" endif ## Uncomment this if your src/Makefile.in has these targets for ## pre-building something for the release (e.g. documentation). # cd "$@/src" && ./configure && $(MAKE) prebuild && \ # $(MAKE) distclean && $(RM) Makefile ## ${FIX_PERMISSIONS} "$@" run_in_place = $(OCTAVE) --eval ' pkg ("local_list", "$(package_list)"); ' \ --eval ' pkg ("load", "$(package)"); ' html_options = --eval 'options = get_html_options ("octave-forge");' ## Uncomment this for package documentation. # html_options = --eval 'options = get_html_options ("octave-forge");' \ # --eval 'options.package_doc = "$(package).texi";' $(html_dir): $(install_stamp) $(RM) -r "$@"; $(run_in_place) \ --eval ' pkg load generate_html; ' \ $(html_options) \ --eval ' generate_package_html ("$(package)", "$@", options); '; $(FIX_PERMISSIONS) "$@"; clean-unpacked-release: @echo "## Cleaning unpacked release tarballs (package + html)..." -$(RM) -r $(release_dir) $(html_dir) @echo ## ## Recipes for installing the package. ## .PHONY: install clean-install octave_install_commands = \ ' llist_path = pkg ("local_list"); \ mkdir ("$(installation_dir)"); \ load (llist_path); \ local_packages(cellfun (@ (x) strcmp ("$(package)", x.name), local_packages)) = []; \ save ("$(package_list)", "local_packages"); \ pkg ("local_list", "$(package_list)"); \ pkg ("prefix", "$(installation_dir)", "$(installation_dir)"); \ pkg ("install", "-local", "-verbose", "$(release_tarball)"); ' ## Install unconditionally. Maybe useful for testing installation with ## different versions of Octave. install: $(release_tarball) @echo "Installing package under $(installation_dir) ..." $(OCTAVE) --eval $(octave_install_commands) touch $(install_stamp) ## Install only if installation (under target/...) is not current. $(install_stamp): $(release_tarball) @echo "Installing package under $(installation_dir) ..." $(OCTAVE) --eval $(octave_install_commands) touch $(install_stamp) clean-install: @echo "## Cleaning installation under $(installation_dir) ..." -$(RM) -r $(installation_dir) @echo ## ## Recipes for testing purposes ## .PHONY: run doctest check ## Start an Octave session with the package directories on the path for ## interactice test of development sources. run: $(install_stamp) $(run_in_place) --persist ## Test example blocks in the documentation. Needs doctest package ## https://octave.sourceforge.io/doctest/index.html doctest: $(install_stamp) $(run_in_place) --eval 'pkg load doctest;' \ --eval "targets = '$(shell (ls inst; ls src | $(GREP) .oct) | $(CUT) -f2 -d@ | $(CUT) -f1 -d.)';" \ --eval "targets = strsplit (targets, ' '); doctest (targets);" ## Test package. octave_test_commands = \ ' dirs = {"inst", "src"}; \ dirs(cellfun (@ (x) ! isdir (x), dirs)) = []; \ if (isempty (dirs)) error ("no \"inst\" or \"src\" directory"); exit (1); \ else __run_test_suite__ (dirs, {}); endif ' ## the following works, too, but provides no overall summary output as ## __run_test_suite__ does: ## ## else cellfun (@runtests, horzcat (cellfun (@ (dir) ostrsplit (([~, dirs] = system (sprintf ("find %s -type d", dir))), "\n\r", true), dirs, "UniformOutput", false){:})); endif ' check: $(install_stamp) $(run_in_place) --eval $(octave_test_commands) ## ## CLEAN ## .PHONY: clean clean: clean-tarballs clean-unpacked-release clean-install @echo "## Removing target directory (if empty)..." -rmdir $(target_dir) @echo @echo "## Cleaning done" @echo gsl-2.1.1/PaxHeaders.7911/DESCRIPTION0000644000000000000000000000013213311744161013465 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/DESCRIPTION0000644000175000017500000000053313311744161013724 0ustar00bectbect00000000000000Name: GSL Version: 2.1.1 Date: 2018-06-18 Author: Teemu Ikonen and others Maintainer: Octave-Forge community Title: GNU Scientific Library. Description: Octave bindings to the GNU Scientific Library Depends: octave (>= 2.9.7) Autoload: no BuildRequires: gsl-devel License: GPL version 2 or later Url: http://octave.sf.net gsl-2.1.1/PaxHeaders.7911/inst0000644000000000000000000000013213311744161012657 xustar0030 mtime=1529333873.203777503 30 atime=1529333876.223775085 30 ctime=1529333876.223775085 gsl-2.1.1/inst/0000755000175000017500000000000013311744161013172 5ustar00bectbect00000000000000gsl-2.1.1/inst/PaxHeaders.7911/gsl_sf_test.m0000644000000000000000000000013213311744161015426 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/inst/gsl_sf_test.m0000644000175000017500000002413413311744161015670 0ustar00bectbect00000000000000## Copyright (C) 2016 Susi Lehtola ## Copyright (C) 2016 Julien Bect ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 3 of the License, or ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . test gsl_sf_test %!shared N, xd, xd2, xd3, xd4, xi, xi2, M %! N = 10; # Vector length %! xd = 0.1 + 0.8 * rand (N, 1); # Vectors of positive values %! xd2 = 0.1 + 0.8 * rand (N, 1); # %! xd3 = 0.1 + 0.8 * rand (N, 1); # %! xd4 = 0.1 + 0.8 * rand (N, 1); # %! xi = randperm (25, N)'; # Vectors of small integer values %! xi2 = randperm (25, N)'; # %! M = 0; # Mode argument # In the following, we # - compute values by loop to get reference values # - compute values using vectorized implementation # - compute just the value, not the error # - check the three results are consistent %!test # double -> double %! clausen_sc=zeros(N,1); %! clausen_sc_err=zeros(N,1); %! for i=1:N %! [clausen_sc(i) clausen_sc_err(i)]=clausen(xd(i)); %! end %! [clausen_vec clausen_vec_err] = gsl_sf_clausen(xd); %! clausen_val = gsl_sf_clausen(xd); %! assert(norm(clausen_val(:)-clausen_vec(:))==0.0) %! assert(norm(clausen_sc(:)-clausen_vec(:))==0.0) %! assert(norm(clausen_sc_err(:)-clausen_vec_err(:))==0.0) %!test # (int, double) -> double %! bessel_Jn_sc=zeros(N,1); %! bessel_Jn_sc_err=zeros(N,1); %! for i=1:N %! [bessel_Jn_sc(i) bessel_Jn_sc_err(i)] = gsl_sf_bessel_Jn(xi(i),xd(i)); %! end %! [bessel_Jn_vec bessel_Jn_vec_err] = gsl_sf_bessel_Jn(xi,xd); %! bessel_Jn_val = gsl_sf_bessel_Jn(xi,xd); %! assert(norm(bessel_Jn_val(:)-bessel_Jn_vec(:))==0.0) %! assert(norm(bessel_Jn_sc(:)-bessel_Jn_vec(:))==0.0) %! assert(norm(bessel_Jn_sc_err(:)-bessel_Jn_vec_err(:))==0.0) %!test # (double, double) to double %! bessel_Jnu_sc=zeros(N,1); %! bessel_Jnu_sc_err=zeros(N,1); %! for i=1:N %! [bessel_Jnu_sc(i) bessel_Jnu_sc_err(i)] = gsl_sf_bessel_Jnu(xd(i),xd2(i)); %! end %! [bessel_Jnu_vec bessel_Jnu_vec_err] = gsl_sf_bessel_Jnu(xd,xd2); %! bessel_Jnu_val = gsl_sf_bessel_Jnu(xd,xd2); %! assert(norm(bessel_Jnu_val(:)-bessel_Jnu_vec(:))==0.0) %! assert(norm(bessel_Jnu_sc(:)-bessel_Jnu_vec(:))==0.0) %! assert(norm(bessel_Jnu_sc_err(:)-bessel_Jnu_vec_err(:))==0.0) %!test # (double, mode) to double %! airy_Ai_sc=zeros(N,1); %! airy_Ai_sc_err=zeros(N,1); %! for i=1:N %! [airy_Ai_sc(i) airy_Ai_sc_err(i)] = gsl_sf_airy_Ai(xd(i),M); %! end %! [airy_Ai_vec airy_Ai_vec_err] = gsl_sf_airy_Ai(xd,M); %! airy_Ai_val = gsl_sf_airy_Ai(xd,M); %! assert(norm(airy_Ai_val(:)-airy_Ai_vec(:))==0.0) %! assert(norm(airy_Ai_sc(:)-airy_Ai_vec(:))==0.0) %! assert(norm(airy_Ai_sc_err(:)-airy_Ai_vec_err(:))==0.0) %!test # (double, double, mode) to double %! ellint_E_sc=zeros(N,1); %! ellint_E_sc_err=zeros(N,1); %! for i=1:N %! [ellint_E_sc(i) ellint_E_sc_err(i)] = gsl_sf_ellint_E(xd(i),xd2(i),M); %! end %! [ellint_E_vec ellint_E_vec_err] = gsl_sf_ellint_E(xd,xd2,M); %! ellint_E_val = gsl_sf_ellint_E(xd,xd2,M); %! assert(norm(ellint_E_val(:)-ellint_E_vec(:))==0.0) %! assert(norm(ellint_E_sc(:)-ellint_E_vec(:))==0.0) %! assert(norm(ellint_E_sc_err(:)-ellint_E_vec_err(:))==0.0) %!test # (double, double, double, mode) to doubl %! ellint_P_sc=zeros(N,1); %! ellint_P_sc_err=zeros(N,1); %! for i=1:N %! [ellint_P_sc(i) ellint_P_sc_err(i)] = gsl_sf_ellint_P(xd(i),xd2(i),xd3(i),M); %! end %! [ellint_P_vec ellint_P_vec_err] = gsl_sf_ellint_P(xd,xd2,xd3,M); %! ellint_P_val = gsl_sf_ellint_P(xd,xd2,xd3,M); %! assert(norm(ellint_P_val(:)-ellint_P_vec(:))==0.0) %! assert(norm(ellint_P_sc(:)-ellint_P_vec(:))==0.0) %! assert(norm(ellint_P_sc_err(:)-ellint_P_vec_err(:))==0.0) %!test # (double, double, double, double, mode) to double %! ellint_RJ_sc=zeros(N,1); %! ellint_RJ_sc_err=zeros(N,1); %! for i=1:N %! [ellint_RJ_sc(i) ellint_RJ_sc_err(i)] = gsl_sf_ellint_RJ(xd(i),xd2(i),xd3(i),xd4(i),M); %! end %! [ellint_RJ_vec ellint_RJ_vec_err] = gsl_sf_ellint_RJ(xd,xd2,xd3,xd4,M); %! ellint_RJ_val = gsl_sf_ellint_RJ(xd,xd2,xd3,xd4,M); %! assert(norm(ellint_RJ_val(:)-ellint_RJ_vec(:))==0.0) %! assert(norm(ellint_RJ_sc(:)-ellint_RJ_vec(:))==0.0) %! assert(norm(ellint_RJ_sc_err(:)-ellint_RJ_vec_err(:))==0.0) %!test # int to double %! airy_zero_Ai_sc=zeros(N,1); %! airy_zero_Ai_sc_err=zeros(N,1); %! for i=1:N %! [airy_zero_Ai_sc(i) airy_zero_Ai_sc_err(i)] = gsl_sf_airy_zero_Ai(xi(i)); %! end %! [airy_zero_Ai_vec airy_zero_Ai_vec_err] = gsl_sf_airy_zero_Ai(xi); %! airy_zero_Ai_val = gsl_sf_airy_zero_Ai(xi); %! assert(norm(airy_zero_Ai_val(:)-airy_zero_Ai_vec(:))==0.0) %! assert(norm(airy_zero_Ai_sc(:)-airy_zero_Ai_vec(:))==0.0) %! assert(norm(airy_zero_Ai_sc_err(:)-airy_zero_Ai_vec_err(:))==0.0) %!test # (int, double, double) to double %! conicalP_cyl_reg_sc=zeros(N,1); %! conicalP_cyl_reg_sc_err=zeros(N,1); %! for i=1:N %! [conicalP_cyl_reg_sc(i) conicalP_cyl_reg_sc_err(i)] = gsl_sf_conicalP_cyl_reg(xi(i),xd(i),xd2(i)); %! end %! [conicalP_cyl_reg_vec conicalP_cyl_reg_vec_err] = gsl_sf_conicalP_cyl_reg(xi,xd,xd2); %! conicalP_cyl_reg_val = gsl_sf_conicalP_cyl_reg(xi,xd,xd2); %! assert(norm(conicalP_cyl_reg_val(:)-conicalP_cyl_reg_vec(:))==0.0) %! assert(norm(conicalP_cyl_reg_sc(:)-conicalP_cyl_reg_vec(:))==0.0) %! assert(norm(conicalP_cyl_reg_sc_err(:)-conicalP_cyl_reg_vec_err(:))==0.0) %!test # (int, int, double) to double %! hyperg_U_int_sc=zeros(N,1); %! hyperg_U_int_sc_err=zeros(N,1); %! for i=1:N %! [hyperg_U_int_sc(i) hyperg_U_int_sc_err(i)] = gsl_sf_hyperg_U_int(xi(i),xi2(i),xd(i)); %! end %! [hyperg_U_int_vec hyperg_U_int_vec_err] = gsl_sf_hyperg_U_int(xi,xi2,xd); %! hyperg_U_int_val = gsl_sf_hyperg_U_int(xi,xi2,xd); %! assert(norm(hyperg_U_int_val(:)-hyperg_U_int_vec(:))==0.0) %! assert(norm(hyperg_U_int_sc(:)-hyperg_U_int_vec(:))==0.0) %! assert(norm(hyperg_U_int_sc_err(:)-hyperg_U_int_vec_err(:))==0.0) %!test # (int, int, double, double) to double %! # Function has limits: n>=1, l = 0 .. n-1 %! n = max (xi, xi2) + 1; %! l = min (xi, xi2); %! hydrogenicR_sc=zeros(N,1); %! hydrogenicR_sc_err=zeros(N,1); %! for i=1:N %! [hydrogenicR_sc(i) hydrogenicR_sc_err(i)] = gsl_sf_hydrogenicR(n(i),l(i),xd(i),xd2(i)); %! end %! [hydrogenicR_vec hydrogenicR_vec_err] = gsl_sf_hydrogenicR(n,l,xd,xd2); %! hydrogenicR_val = gsl_sf_hydrogenicR(n,l,xd,xd2); %! assert(norm(hydrogenicR_val(:)-hydrogenicR_vec(:))==0.0) %! assert(norm(hydrogenicR_sc(:)-hydrogenicR_vec(:))==0.0) %! assert(norm(hydrogenicR_sc_err(:)-hydrogenicR_vec_err(:))==0.0) %!test # (double, int) to double %! bessel_zero_Jnu_sc=zeros(N,1); %! bessel_zero_Jnu_sc_err=zeros(N,1); %! for i=1:N %! [bessel_zero_Jnu_sc(i) bessel_zero_Jnu_sc_err(i)] = gsl_sf_bessel_zero_Jnu(xd(i),xi(i)); %! end %! [bessel_zero_Jnu_vec bessel_zero_Jnu_vec_err] = gsl_sf_bessel_zero_Jnu(xd,xi); %! bessel_zero_Jnu_val = gsl_sf_bessel_zero_Jnu(xd,xi); %! assert(norm(bessel_zero_Jnu_val(:)-bessel_zero_Jnu_vec(:))==0.0) %! assert(norm(bessel_zero_Jnu_sc(:)-bessel_zero_Jnu_vec(:))==0.0) %! assert(norm(bessel_zero_Jnu_sc_err(:)-bessel_zero_Jnu_vec_err(:))==0.0) %!test # (double, double, double) to double %! hyperg_U_sc=zeros(N,1); %! hyperg_U_sc_err=zeros(N,1); %! for i=1:N %! [hyperg_U_sc(i) hyperg_U_sc_err(i)] = gsl_sf_hyperg_U(xd(i),xd2(i),xd3(i)); %! end %! [hyperg_U_vec hyperg_U_vec_err] = gsl_sf_hyperg_U(xd,xd2,xd3); %! hyperg_U_val = gsl_sf_hyperg_U(xd,xd2,xd3); %! assert(norm(hyperg_U_val(:)-hyperg_U_vec(:))==0.0) %! assert(norm(hyperg_U_sc(:)-hyperg_U_vec(:))==0.0) %! assert(norm(hyperg_U_sc_err(:)-hyperg_U_vec_err(:))==0.0) %!test # (double, double, double, double) to double %! hyperg_2F1_sc=zeros(N,1); %! hyperg_2F1_sc_err=zeros(N,1); %! for i=1:N %! [hyperg_2F1_sc(i) hyperg_2F1_sc_err(i)] = gsl_sf_hyperg_2F1(xd(i),xd2(i),xd3(i),xd4(i)); %! end %! [hyperg_2F1_vec hyperg_2F1_vec_err] = gsl_sf_hyperg_2F1(xd,xd2,xd3,xd4); %! hyperg_2F1_val = gsl_sf_hyperg_2F1(xd,xd2,xd3,xd4); %! assert(norm(hyperg_2F1_val(:)-hyperg_2F1_vec(:))==0.0) %! assert(norm(hyperg_2F1_sc(:)-hyperg_2F1_vec(:))==0.0) %! assert(norm(hyperg_2F1_sc_err(:)-hyperg_2F1_vec_err(:))==0.0) %!test # unsigned int to double %! fact_sc=zeros(N,1); %! fact_sc_err=zeros(N,1); %! for i=1:N %! [fact_sc(i) fact_sc_err(i)] = gsl_sf_fact(xi(i)); %! end %! [fact_vec fact_vec_err] = gsl_sf_fact(xi); %! fact_val = gsl_sf_fact(xi); %! assert(norm(fact_val(:)-fact_vec(:))==0.0) %! assert(norm(fact_sc(:)-fact_vec(:))==0.0) %! assert(norm(fact_sc_err(:)-fact_vec_err(:))==0.0) %!test # (unsigned int, unsigned int) to double %! choose_sc=zeros(N,1); %! choose_sc_err=zeros(N,1); %! # Parameters must satisfy n>m %! n = max (xi, xi2) + 1; %! m = min (xi, xi2); %! for i=1:N %! [choose_sc(i) choose_sc_err(i)] = gsl_sf_choose(n(i),m(i)); %! end %! [choose_vec choose_vec_err] = gsl_sf_choose(n,m); %! choose_val = gsl_sf_choose(n,m); %! assert(norm(choose_val(:)-choose_vec(:))==0.0) %! assert(norm(choose_sc(:)-choose_vec(:))==0.0) %! assert(norm(choose_sc_err(:)-choose_vec_err(:))==0.0) % Test bessel_jl_array (LD_D_array.cc.template) %!test %! lmax = 3; %! y = gsl_sf_bessel_jl_array (lmax, 1.33); %! assert (size (y), [1 lmax+1]); %! assert (isa (y, 'double') && all (isfinite (y))) %!error gsl_sf_bessel_jl_array () # ERROR: not enought input args %!error gsl_sf_bessel_jl_array (3) # ERROR: not enought input args %!error gsl_sf_bessel_jl_array (3, 1.33, 7) # ERROR: too many input args %!error gsl_sf_bessel_jl_array (-1, 1.2) # ERROR: arg1 < 0 %!error gsl_sf_bessel_jl_array (10^100, 1.2) # ERROR: arg1 overflow %!error gsl_sf_bessel_jl_array (0.5, 2) # ERROR: arg1 non-integer %!error gsl_sf_bessel_jl_array (3 + 1i, 1.33) # ERROR: arg1 complex %!error gsl_sf_bessel_jl_array (3, 1.33 + 1i) # ERROR: arg2 complex gsl-2.1.1/PaxHeaders.7911/src0000644000000000000000000000013213311744164012474 xustar0030 mtime=1529333876.219775089 30 atime=1529333876.223775085 30 ctime=1529333876.223775085 gsl-2.1.1/src/0000755000175000017500000000000013311744164013007 5ustar00bectbect00000000000000gsl-2.1.1/src/PaxHeaders.7911/D_D.template.cc0000644000000000000000000000013213311744162015316 xustar0030 mtime=1529333874.067776838 30 atime=1529333874.319776636 30 ctime=1529333876.223775085 gsl-2.1.1/src/D_D.template.cc0000644000175000017500000000457413311744162015566 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { GSL_FUNC_NAME (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { GSL_FUNC_NAME (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/configure.ac.in0000644000000000000000000000013213311744161015441 xustar0030 mtime=1529333873.207777499 30 atime=1529333873.219777489 30 ctime=1529333876.223775085 gsl-2.1.1/src/configure.ac.in0000644000175000017500000000751313311744161015705 0ustar00bectbect00000000000000dnl Copyright (C) 2016, 2018 Julien Bect dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, see . dnl autoconf 2.13 certainly doesn't work! What is the minimum requirement? AC_PREREQ(2.2) AC_INIT([Octave Forge gsl package], [2.1.1]) AC_CONFIG_HEADERS([config.h]) dnl Check for mkoctfile AC_PATH_PROG([MKOCTFILE],[mkoctfile]) test -z "$MKOCTFILE" && AC_MSG_ERROR([mkoctfile not found]) dnl Check for octave (used to get cannical_host_type) AC_PATH_PROG([OCTAVE],[octave]) test -z "$OCTAVE" && AC_MSG_ERROR([octave not found]) dnl ***************************** dnl *** System-specific stuff *** dnl ***************************** dnl Grab canonical host type so we can write system specific install stuff AC_MSG_CHECKING([for Octave's canonical_host_type]) canonical_host_type=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('canonical_host_type')) \ else \ disp (octave_config_info ('canonical_host_type')) \ end"` AC_MSG_RESULT([${canonical_host_type}]) dnl GSL specific preprocessor flags AC_SUBST([GSL_DEFINES]) dnl Set appropriate preprocessor flags for canonical_host_type ending with -msdosmsvc case ${canonical_host_type} in *-msdosmsvc) GSL_DEFINES="-DWIN32 -DGSL_DLL" ;; esac dnl ********************************* dnl *** Test some Octave features *** dnl ********************************* dnl Find Octave's include directory AC_MSG_CHECKING([for Octave's include directory]) octave_include_dir=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('octincludedir')) \ else \ disp (octave_config_info ('octincludedir')) \ end"` AC_MSG_RESULT([${octave_include_dir}]) dnl Save initial state save_CPPFLAGS=${CPPFLAG} AC_LANG_PUSH([C++]) dnl Add octave include dir to CPPFLAGS CPPFLAGS="-I${octave_include_dir} ${CPPFLAGS}" dnl Detect ov-scalar.h AC_CHECK_HEADER([ov-scalar.h],,[AC_MSG_ERROR([ov-scalar.h header not found])]) AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[ #include "ov-scalar.h" main() { octave_scalar x (1.234); bool y = x.isreal (); return 0; } ]]) ], [AC_DEFINE( [OCTAVE_HAS_OV_ISREAL_METHOD], [1], [Define is the octave_value class has .isreal().]) ] ) AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[ #include "ov-scalar.h" #include "ovl.h" #include "parse.h" main() { octave_value_list ovl = octave::feval ("sin", octave_value (1.234)); return 0; } ]]) ], [AC_DEFINE( [OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE], [1], [Define is feval is the octave namespace.]) ] ) dnl Restore initial state AC_LANG_PUSH([C++]) CPPFLAGS=${save_CPPFLAGS} dnl *************************************** dnl *** Check if the GSL library exists *** dnl *************************************** dnl See GSL manual, Appendix C: "Autoconf macros" AC_CHECK_LIB([m],[cos],,[AC_MSG_ERROR([math library not found])]) AC_CHECK_LIB([gslcblas],[cblas_dgemm],,[AC_MSG_ERROR([gslcblas library not found])]) AC_CHECK_LIB([gsl],[gsl_message],,[AC_MSG_ERROR([GSL library not found])]) # Auto-generated tests for GSL functions gsl-2.1.1/src/PaxHeaders.7911/NSDD_DDD_array.template.cc0000644000000000000000000000013213311744162017271 xustar0030 mtime=1529333874.311776643 30 atime=1529333876.135775159 30 ctime=1529333876.223775085 gsl-2.1.1/src/NSDD_DDD_array.template.cc0000644000175000017500000001045513311744162017534 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2, z3 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {( z1, z2, z3 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); RowVector y2 (gsl_sf_legendre_array_n (arg2)); RowVector y3 (gsl_sf_legendre_array_n (arg2)); // Run the calculation GSL_FUNC_NAME (legnorm, arg2, arg3, arg4, y1.fortran_vec (), y2.fortran_vec (), y3.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y2.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y3.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); retval(2) = octave_value (y3); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/IIIIII_D.template.cc0000644000000000000000000000013213311744162016100 xustar0030 mtime=1529333874.223776713 30 atime=1529333875.955775311 30 ctime=1529333876.223775085 gsl-2.1.1/src/IIIIII_D.template.cc0000644000175000017500000001716213311744162016345 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 6; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/configure0000644000000000000000000000013213311744162014453 xustar0030 mtime=1529333874.059776844 30 atime=1529333874.007776884 30 ctime=1529333876.223775085 gsl-2.1.1/src/configure0000755000175000017500000067204513311744162014732 0ustar00bectbect00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for Octave Forge gsl package 2.1.1. # # # Copyright (C) 1992-1996, 1998-2012 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 if test -n "${ZSH_VERSION+set}" && (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 case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # 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 test -z "$as_dir" && as_dir=. 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_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="if test -n \"\${ZSH_VERSION+set}\" && (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 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 exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || 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 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else 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 test -z "$as_dir" && as_dir=. 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_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS 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'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$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_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=`$as_echo "$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 || $as_echo 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_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_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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 || $as_echo 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" || { $as_echo "$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 } 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 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='Octave Forge gsl package' PACKAGE_TARNAME='octave-forge-gsl-package' PACKAGE_VERSION='2.1.1' PACKAGE_STRING='Octave Forge gsl package 2.1.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='LTLIBOBJS LIBOBJS EGREP GREP CXXCPP OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX GSL_DEFINES OCTAVE MKOCTFILE 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 CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CXXCPP' # 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_TARNAME}' 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 # Accept the important Cygnus configure options, so we can diagnose typos. 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=`$as_echo "$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=`$as_echo "$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=`$as_echo "$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=`$as_echo "$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. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$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" ;; *) $as_echo "$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 || $as_echo 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 Octave Forge gsl package 2.1.1 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/octave-forge-gsl-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 case $ac_init_help in short | recursive ) echo "Configuration of Octave Forge gsl package 2.1.1:";; esac cat <<\_ACEOF Some influential environment variables: CXX C++ compiler command CXXFLAGS 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 CXXCPP C++ preprocessor 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$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 guested configure. 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 $as_echo "$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 Octave Forge gsl package configure 2.1.1 generated by GNU Autoconf 2.69 Copyright (C) 2012 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_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext 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\"" $as_echo "$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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$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_cxx_try_compile # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$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_cxx_try_cpp # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$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_cxx_try_run # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 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 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. 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_cxx_try_link # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func 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 Octave Forge gsl package $as_me 2.1.1, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _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 test -z "$as_dir" && as_dir=. $as_echo "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=`$as_echo "$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=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$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 $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$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 $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # 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,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$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=`$as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`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 ac_config_headers="$ac_config_headers config.h" # Extract the first word of "mkoctfile", so it can be a program name with args. set dummy mkoctfile; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MKOCTFILE+:} false; then : $as_echo_n "(cached) " >&6 else case $MKOCTFILE in [\\/]* | ?:[\\/]*) ac_cv_path_MKOCTFILE="$MKOCTFILE" # 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 test -z "$as_dir" && as_dir=. 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_MKOCTFILE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$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 MKOCTFILE=$ac_cv_path_MKOCTFILE if test -n "$MKOCTFILE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKOCTFILE" >&5 $as_echo "$MKOCTFILE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$MKOCTFILE" && as_fn_error $? "mkoctfile not found" "$LINENO" 5 # Extract the first word of "octave", so it can be a program name with args. set dummy octave; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_OCTAVE+:} false; then : $as_echo_n "(cached) " >&6 else case $OCTAVE in [\\/]* | ?:[\\/]*) ac_cv_path_OCTAVE="$OCTAVE" # 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 test -z "$as_dir" && as_dir=. 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_OCTAVE="$as_dir/$ac_word$ac_exec_ext" $as_echo "$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 OCTAVE=$ac_cv_path_OCTAVE if test -n "$OCTAVE"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OCTAVE" >&5 $as_echo "$OCTAVE" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$OCTAVE" && as_fn_error $? "octave not found" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Octave's canonical_host_type" >&5 $as_echo_n "checking for Octave's canonical_host_type... " >&6; } canonical_host_type=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('canonical_host_type')) \ else \ disp (octave_config_info ('canonical_host_type')) \ end"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${canonical_host_type}" >&5 $as_echo "${canonical_host_type}" >&6; } case ${canonical_host_type} in *-msdosmsvc) GSL_DEFINES="-DWIN32 -DGSL_DLL" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Octave's include directory" >&5 $as_echo_n "checking for Octave's include directory... " >&6; } octave_include_dir=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('octincludedir')) \ else \ disp (octave_config_info ('octincludedir')) \ end"` { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${octave_include_dir}" >&5 $as_echo "${octave_include_dir}" >&6; } save_CPPFLAGS=${CPPFLAG} ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CPPFLAGS="-I${octave_include_dir} ${CPPFLAGS}" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_CXX="$ac_tool_prefix$ac_prog" $as_echo "$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 CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. 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_CXX="$ac_prog" $as_echo "$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_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$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; 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\"" $as_echo "$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 $as_echo "$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 () { ; 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$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+set}" = set && 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 ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$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_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$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 () { 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. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$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 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; 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\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$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_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_cxx_check_header_mongrel "$LINENO" "ov-scalar.h" "ac_cv_header_ov_scalar_h" "$ac_includes_default" if test "x$ac_cv_header_ov_scalar_h" = xyes; then : else as_fn_error $? "ov-scalar.h header not found" "$LINENO" 5 fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "ov-scalar.h" main() { octave_scalar x (1.234); bool y = x.isreal (); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define OCTAVE_HAS_OV_ISREAL_METHOD 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include "ov-scalar.h" #include "ovl.h" #include "parse.h" main() { octave_value_list ovl = octave::feval ("sin", octave_value (1.234)); return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : $as_echo "#define OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CPPFLAGS=${save_CPPFLAGS} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5 $as_echo_n "checking for cos in -lm... " >&6; } if ${ac_cv_lib_m_cos+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cos (); int main () { return cos (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_m_cos=yes else ac_cv_lib_m_cos=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5 $as_echo "$ac_cv_lib_m_cos" >&6; } if test "x$ac_cv_lib_m_cos" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" else as_fn_error $? "math library not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cblas_dgemm in -lgslcblas" >&5 $as_echo_n "checking for cblas_dgemm in -lgslcblas... " >&6; } if ${ac_cv_lib_gslcblas_cblas_dgemm+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgslcblas $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char cblas_dgemm (); int main () { return cblas_dgemm (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gslcblas_cblas_dgemm=yes else ac_cv_lib_gslcblas_cblas_dgemm=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gslcblas_cblas_dgemm" >&5 $as_echo "$ac_cv_lib_gslcblas_cblas_dgemm" >&6; } if test "x$ac_cv_lib_gslcblas_cblas_dgemm" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSLCBLAS 1 _ACEOF LIBS="-lgslcblas $LIBS" else as_fn_error $? "gslcblas library not found" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gsl_message in -lgsl" >&5 $as_echo_n "checking for gsl_message in -lgsl... " >&6; } if ${ac_cv_lib_gsl_gsl_message+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gsl_message (); int main () { return gsl_message (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_gsl_gsl_message=yes else ac_cv_lib_gsl_gsl_message=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gsl_gsl_message" >&5 $as_echo "$ac_cv_lib_gsl_gsl_message" >&6; } if test "x$ac_cv_lib_gsl_gsl_message" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBGSL 1 _ACEOF LIBS="-lgsl $LIBS" else as_fn_error $? "GSL library not found" "$LINENO" 5 fi # Auto-generated tests for GSL functions for ac_func in gsl_sf_clausen_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_clausen_e" "ac_cv_func_gsl_sf_clausen_e" if test "x$ac_cv_func_gsl_sf_clausen_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CLAUSEN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_clausen" fi done for ac_func in gsl_sf_clausen_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_clausen_e" "ac_cv_func_gsl_sf_clausen_e" if test "x$ac_cv_func_gsl_sf_clausen_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CLAUSEN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} clausen" fi done for ac_func in gsl_sf_dawson_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_dawson_e" "ac_cv_func_gsl_sf_dawson_e" if test "x$ac_cv_func_gsl_sf_dawson_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DAWSON_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_dawson" fi done for ac_func in gsl_sf_dawson_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_dawson_e" "ac_cv_func_gsl_sf_dawson_e" if test "x$ac_cv_func_gsl_sf_dawson_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DAWSON_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} dawson" fi done for ac_func in gsl_sf_debye_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_1_e" "ac_cv_func_gsl_sf_debye_1_e" if test "x$ac_cv_func_gsl_sf_debye_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_1" fi done for ac_func in gsl_sf_debye_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_1_e" "ac_cv_func_gsl_sf_debye_1_e" if test "x$ac_cv_func_gsl_sf_debye_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} debye_1" fi done for ac_func in gsl_sf_debye_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_2_e" "ac_cv_func_gsl_sf_debye_2_e" if test "x$ac_cv_func_gsl_sf_debye_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_2" fi done for ac_func in gsl_sf_debye_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_2_e" "ac_cv_func_gsl_sf_debye_2_e" if test "x$ac_cv_func_gsl_sf_debye_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} debye_2" fi done for ac_func in gsl_sf_debye_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_3_e" "ac_cv_func_gsl_sf_debye_3_e" if test "x$ac_cv_func_gsl_sf_debye_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_3" fi done for ac_func in gsl_sf_debye_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_3_e" "ac_cv_func_gsl_sf_debye_3_e" if test "x$ac_cv_func_gsl_sf_debye_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} debye_3" fi done for ac_func in gsl_sf_debye_4_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_4_e" "ac_cv_func_gsl_sf_debye_4_e" if test "x$ac_cv_func_gsl_sf_debye_4_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_4_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_4" fi done for ac_func in gsl_sf_debye_4_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_4_e" "ac_cv_func_gsl_sf_debye_4_e" if test "x$ac_cv_func_gsl_sf_debye_4_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_4_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} debye_4" fi done for ac_func in gsl_sf_debye_5_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_5_e" "ac_cv_func_gsl_sf_debye_5_e" if test "x$ac_cv_func_gsl_sf_debye_5_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_5_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_5" fi done for ac_func in gsl_sf_debye_6_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_debye_6_e" "ac_cv_func_gsl_sf_debye_6_e" if test "x$ac_cv_func_gsl_sf_debye_6_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DEBYE_6_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_debye_6" fi done for ac_func in gsl_sf_dilog_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_dilog_e" "ac_cv_func_gsl_sf_dilog_e" if test "x$ac_cv_func_gsl_sf_dilog_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DILOG_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_dilog" fi done for ac_func in gsl_sf_erf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_e" "ac_cv_func_gsl_sf_erf_e" if test "x$ac_cv_func_gsl_sf_erf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_erf" fi done for ac_func in gsl_sf_erf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_e" "ac_cv_func_gsl_sf_erf_e" if test "x$ac_cv_func_gsl_sf_erf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} erf_gsl" fi done for ac_func in gsl_sf_erfc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erfc_e" "ac_cv_func_gsl_sf_erfc_e" if test "x$ac_cv_func_gsl_sf_erfc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERFC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_erfc" fi done for ac_func in gsl_sf_erfc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erfc_e" "ac_cv_func_gsl_sf_erfc_e" if test "x$ac_cv_func_gsl_sf_erfc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERFC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} erfc_gsl" fi done for ac_func in gsl_sf_log_erfc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_erfc_e" "ac_cv_func_gsl_sf_log_erfc_e" if test "x$ac_cv_func_gsl_sf_log_erfc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_ERFC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_log_erfc" fi done for ac_func in gsl_sf_log_erfc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_erfc_e" "ac_cv_func_gsl_sf_log_erfc_e" if test "x$ac_cv_func_gsl_sf_log_erfc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_ERFC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} log_erfc" fi done for ac_func in gsl_sf_erf_Z_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_Z_e" "ac_cv_func_gsl_sf_erf_Z_e" if test "x$ac_cv_func_gsl_sf_erf_Z_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_Z_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_erf_Z" fi done for ac_func in gsl_sf_erf_Z_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_Z_e" "ac_cv_func_gsl_sf_erf_Z_e" if test "x$ac_cv_func_gsl_sf_erf_Z_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_Z_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} erf_Z" fi done for ac_func in gsl_sf_erf_Q_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_Q_e" "ac_cv_func_gsl_sf_erf_Q_e" if test "x$ac_cv_func_gsl_sf_erf_Q_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_Q_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_erf_Q" fi done for ac_func in gsl_sf_erf_Q_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_erf_Q_e" "ac_cv_func_gsl_sf_erf_Q_e" if test "x$ac_cv_func_gsl_sf_erf_Q_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ERF_Q_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} erf_Q" fi done for ac_func in gsl_sf_hazard_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hazard_e" "ac_cv_func_gsl_sf_hazard_e" if test "x$ac_cv_func_gsl_sf_hazard_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HAZARD_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hazard" fi done for ac_func in gsl_sf_hazard_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hazard_e" "ac_cv_func_gsl_sf_hazard_e" if test "x$ac_cv_func_gsl_sf_hazard_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HAZARD_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hazard" fi done for ac_func in gsl_sf_expm1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expm1_e" "ac_cv_func_gsl_sf_expm1_e" if test "x$ac_cv_func_gsl_sf_expm1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPM1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_expm1" fi done for ac_func in gsl_sf_expm1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expm1_e" "ac_cv_func_gsl_sf_expm1_e" if test "x$ac_cv_func_gsl_sf_expm1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPM1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} expm1" fi done for ac_func in gsl_sf_exprel_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_e" "ac_cv_func_gsl_sf_exprel_e" if test "x$ac_cv_func_gsl_sf_exprel_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_exprel" fi done for ac_func in gsl_sf_exprel_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_e" "ac_cv_func_gsl_sf_exprel_e" if test "x$ac_cv_func_gsl_sf_exprel_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} exprel" fi done for ac_func in gsl_sf_exprel_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_2_e" "ac_cv_func_gsl_sf_exprel_2_e" if test "x$ac_cv_func_gsl_sf_exprel_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_exprel_2" fi done for ac_func in gsl_sf_exprel_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_2_e" "ac_cv_func_gsl_sf_exprel_2_e" if test "x$ac_cv_func_gsl_sf_exprel_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} exprel_2" fi done for ac_func in gsl_sf_expint_E1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_E1_e" "ac_cv_func_gsl_sf_expint_E1_e" if test "x$ac_cv_func_gsl_sf_expint_E1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_E1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_expint_E1" fi done for ac_func in gsl_sf_expint_E1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_E1_e" "ac_cv_func_gsl_sf_expint_E1_e" if test "x$ac_cv_func_gsl_sf_expint_E1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_E1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} expint_E1" fi done for ac_func in gsl_sf_expint_E2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_E2_e" "ac_cv_func_gsl_sf_expint_E2_e" if test "x$ac_cv_func_gsl_sf_expint_E2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_E2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_expint_E2" fi done for ac_func in gsl_sf_expint_E2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_E2_e" "ac_cv_func_gsl_sf_expint_E2_e" if test "x$ac_cv_func_gsl_sf_expint_E2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_E2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} expint_E2" fi done for ac_func in gsl_sf_expint_Ei_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_Ei_e" "ac_cv_func_gsl_sf_expint_Ei_e" if test "x$ac_cv_func_gsl_sf_expint_Ei_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_EI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_expint_Ei" fi done for ac_func in gsl_sf_expint_Ei_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_Ei_e" "ac_cv_func_gsl_sf_expint_Ei_e" if test "x$ac_cv_func_gsl_sf_expint_Ei_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_EI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} expint_Ei" fi done for ac_func in gsl_sf_Shi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Shi_e" "ac_cv_func_gsl_sf_Shi_e" if test "x$ac_cv_func_gsl_sf_Shi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SHI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_Shi" fi done for ac_func in gsl_sf_Shi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Shi_e" "ac_cv_func_gsl_sf_Shi_e" if test "x$ac_cv_func_gsl_sf_Shi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SHI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} Shi" fi done for ac_func in gsl_sf_Chi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Chi_e" "ac_cv_func_gsl_sf_Chi_e" if test "x$ac_cv_func_gsl_sf_Chi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CHI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_Chi" fi done for ac_func in gsl_sf_Chi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Chi_e" "ac_cv_func_gsl_sf_Chi_e" if test "x$ac_cv_func_gsl_sf_Chi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CHI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} Chi" fi done for ac_func in gsl_sf_expint_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_3_e" "ac_cv_func_gsl_sf_expint_3_e" if test "x$ac_cv_func_gsl_sf_expint_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_expint_3" fi done for ac_func in gsl_sf_expint_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_expint_3_e" "ac_cv_func_gsl_sf_expint_3_e" if test "x$ac_cv_func_gsl_sf_expint_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPINT_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} expint_3" fi done for ac_func in gsl_sf_Si_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Si_e" "ac_cv_func_gsl_sf_Si_e" if test "x$ac_cv_func_gsl_sf_Si_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_Si" fi done for ac_func in gsl_sf_Si_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Si_e" "ac_cv_func_gsl_sf_Si_e" if test "x$ac_cv_func_gsl_sf_Si_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} Si" fi done for ac_func in gsl_sf_Ci_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Ci_e" "ac_cv_func_gsl_sf_Ci_e" if test "x$ac_cv_func_gsl_sf_Ci_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_Ci" fi done for ac_func in gsl_sf_Ci_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_Ci_e" "ac_cv_func_gsl_sf_Ci_e" if test "x$ac_cv_func_gsl_sf_Ci_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} Ci" fi done for ac_func in gsl_sf_atanint_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_atanint_e" "ac_cv_func_gsl_sf_atanint_e" if test "x$ac_cv_func_gsl_sf_atanint_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ATANINT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_atanint" fi done for ac_func in gsl_sf_atanint_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_atanint_e" "ac_cv_func_gsl_sf_atanint_e" if test "x$ac_cv_func_gsl_sf_atanint_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ATANINT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} atanint" fi done for ac_func in gsl_sf_fermi_dirac_mhalf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_mhalf_e" "ac_cv_func_gsl_sf_fermi_dirac_mhalf_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_mhalf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_MHALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_mhalf" fi done for ac_func in gsl_sf_fermi_dirac_mhalf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_mhalf_e" "ac_cv_func_gsl_sf_fermi_dirac_mhalf_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_mhalf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_MHALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} fermi_dirac_mhalf" fi done for ac_func in gsl_sf_fermi_dirac_half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_half_e" "ac_cv_func_gsl_sf_fermi_dirac_half_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_half" fi done for ac_func in gsl_sf_fermi_dirac_half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_half_e" "ac_cv_func_gsl_sf_fermi_dirac_half_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} fermi_dirac_half" fi done for ac_func in gsl_sf_fermi_dirac_3half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_3half_e" "ac_cv_func_gsl_sf_fermi_dirac_3half_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_3half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_3HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsm_sf_fermi_dirac_3half" fi done for ac_func in gsl_sf_fermi_dirac_3half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_3half_e" "ac_cv_func_gsl_sf_fermi_dirac_3half_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_3half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_3HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} fermi_dirac_3half" fi done for ac_func in gsl_sf_gamma_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_e" "ac_cv_func_gsl_sf_gamma_e" if test "x$ac_cv_func_gsl_sf_gamma_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gamma" fi done for ac_func in gsl_sf_gamma_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_e" "ac_cv_func_gsl_sf_gamma_e" if test "x$ac_cv_func_gsl_sf_gamma_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gamma_gsl" fi done for ac_func in gsl_sf_lngamma_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lngamma_e" "ac_cv_func_gsl_sf_lngamma_e" if test "x$ac_cv_func_gsl_sf_lngamma_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNGAMMA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lngamma" fi done for ac_func in gsl_sf_lngamma_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lngamma_e" "ac_cv_func_gsl_sf_lngamma_e" if test "x$ac_cv_func_gsl_sf_lngamma_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNGAMMA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lngamma_gsl" fi done for ac_func in gsl_sf_gammastar_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gammastar_e" "ac_cv_func_gsl_sf_gammastar_e" if test "x$ac_cv_func_gsl_sf_gammastar_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMASTAR_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gammastar" fi done for ac_func in gsl_sf_gammastar_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gammastar_e" "ac_cv_func_gsl_sf_gammastar_e" if test "x$ac_cv_func_gsl_sf_gammastar_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMASTAR_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gammastar" fi done for ac_func in gsl_sf_gammainv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gammainv_e" "ac_cv_func_gsl_sf_gammainv_e" if test "x$ac_cv_func_gsl_sf_gammainv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMAINV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gammainv" fi done for ac_func in gsl_sf_gammainv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gammainv_e" "ac_cv_func_gsl_sf_gammainv_e" if test "x$ac_cv_func_gsl_sf_gammainv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMAINV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gammainv_gsl" fi done for ac_func in gsl_sf_lambert_W0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lambert_W0_e" "ac_cv_func_gsl_sf_lambert_W0_e" if test "x$ac_cv_func_gsl_sf_lambert_W0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LAMBERT_W0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lambert_W0" fi done for ac_func in gsl_sf_gammastar_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gammastar_e" "ac_cv_func_gsl_sf_gammastar_e" if test "x$ac_cv_func_gsl_sf_gammastar_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMASTAR_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gammastar" fi done for ac_func in gsl_sf_lambert_W0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lambert_W0_e" "ac_cv_func_gsl_sf_lambert_W0_e" if test "x$ac_cv_func_gsl_sf_lambert_W0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LAMBERT_W0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lambert_W0" fi done for ac_func in gsl_sf_lambert_Wm1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lambert_Wm1_e" "ac_cv_func_gsl_sf_lambert_Wm1_e" if test "x$ac_cv_func_gsl_sf_lambert_Wm1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LAMBERT_WM1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lambert_Wm1" fi done for ac_func in gsl_sf_lambert_Wm1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lambert_Wm1_e" "ac_cv_func_gsl_sf_lambert_Wm1_e" if test "x$ac_cv_func_gsl_sf_lambert_Wm1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LAMBERT_WM1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lambert_Wm1" fi done for ac_func in gsl_sf_log_1plusx_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_1plusx_e" "ac_cv_func_gsl_sf_log_1plusx_e" if test "x$ac_cv_func_gsl_sf_log_1plusx_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_1PLUSX_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_log_1plusx" fi done for ac_func in gsl_sf_log_1plusx_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_1plusx_e" "ac_cv_func_gsl_sf_log_1plusx_e" if test "x$ac_cv_func_gsl_sf_log_1plusx_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_1PLUSX_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} log_1plusx" fi done for ac_func in gsl_sf_log_1plusx_mx_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_1plusx_mx_e" "ac_cv_func_gsl_sf_log_1plusx_mx_e" if test "x$ac_cv_func_gsl_sf_log_1plusx_mx_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_1PLUSX_MX_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_log_1plusx_mx" fi done for ac_func in gsl_sf_log_1plusx_mx_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_log_1plusx_mx_e" "ac_cv_func_gsl_sf_log_1plusx_mx_e" if test "x$ac_cv_func_gsl_sf_log_1plusx_mx_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LOG_1PLUSX_MX_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} log_1plusx_mx" fi done for ac_func in gsl_sf_psi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_e" "ac_cv_func_gsl_sf_psi_e" if test "x$ac_cv_func_gsl_sf_psi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_psi" fi done for ac_func in gsl_sf_psi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_e" "ac_cv_func_gsl_sf_psi_e" if test "x$ac_cv_func_gsl_sf_psi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} psi" fi done for ac_func in gsl_sf_psi_1piy_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_1piy_e" "ac_cv_func_gsl_sf_psi_1piy_e" if test "x$ac_cv_func_gsl_sf_psi_1piy_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_1PIY_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_psi_1piy" fi done for ac_func in gsl_sf_psi_1piy_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_1piy_e" "ac_cv_func_gsl_sf_psi_1piy_e" if test "x$ac_cv_func_gsl_sf_psi_1piy_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_1PIY_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} psi_1piy" fi done for ac_func in gsl_sf_synchrotron_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_synchrotron_1_e" "ac_cv_func_gsl_sf_synchrotron_1_e" if test "x$ac_cv_func_gsl_sf_synchrotron_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SYNCHROTRON_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_synchrotron_1" fi done for ac_func in gsl_sf_synchrotron_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_synchrotron_1_e" "ac_cv_func_gsl_sf_synchrotron_1_e" if test "x$ac_cv_func_gsl_sf_synchrotron_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SYNCHROTRON_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} synchrotron_1" fi done for ac_func in gsl_sf_synchrotron_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_synchrotron_2_e" "ac_cv_func_gsl_sf_synchrotron_2_e" if test "x$ac_cv_func_gsl_sf_synchrotron_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SYNCHROTRON_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_synchrotron_2" fi done for ac_func in gsl_sf_synchrotron_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_synchrotron_2_e" "ac_cv_func_gsl_sf_synchrotron_2_e" if test "x$ac_cv_func_gsl_sf_synchrotron_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SYNCHROTRON_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} synchrotron_2" fi done for ac_func in gsl_sf_transport_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_2_e" "ac_cv_func_gsl_sf_transport_2_e" if test "x$ac_cv_func_gsl_sf_transport_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_transport_2" fi done for ac_func in gsl_sf_transport_2_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_2_e" "ac_cv_func_gsl_sf_transport_2_e" if test "x$ac_cv_func_gsl_sf_transport_2_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_2_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} transport_2" fi done for ac_func in gsl_sf_transport_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_3_e" "ac_cv_func_gsl_sf_transport_3_e" if test "x$ac_cv_func_gsl_sf_transport_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_transport_3" fi done for ac_func in gsl_sf_transport_3_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_3_e" "ac_cv_func_gsl_sf_transport_3_e" if test "x$ac_cv_func_gsl_sf_transport_3_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_3_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} transport_3" fi done for ac_func in gsl_sf_transport_4_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_4_e" "ac_cv_func_gsl_sf_transport_4_e" if test "x$ac_cv_func_gsl_sf_transport_4_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_4_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_transport_4" fi done for ac_func in gsl_sf_transport_4_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_4_e" "ac_cv_func_gsl_sf_transport_4_e" if test "x$ac_cv_func_gsl_sf_transport_4_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_4_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} transport_4" fi done for ac_func in gsl_sf_transport_5_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_5_e" "ac_cv_func_gsl_sf_transport_5_e" if test "x$ac_cv_func_gsl_sf_transport_5_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_5_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_transport_5" fi done for ac_func in gsl_sf_transport_5_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_transport_5_e" "ac_cv_func_gsl_sf_transport_5_e" if test "x$ac_cv_func_gsl_sf_transport_5_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TRANSPORT_5_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} transport_5" fi done for ac_func in gsl_sf_sinc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_sinc_e" "ac_cv_func_gsl_sf_sinc_e" if test "x$ac_cv_func_gsl_sf_sinc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SINC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_sinc" fi done for ac_func in gsl_sf_sinc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_sinc_e" "ac_cv_func_gsl_sf_sinc_e" if test "x$ac_cv_func_gsl_sf_sinc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_SINC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} sinc_gsl" fi done for ac_func in gsl_sf_lnsinh_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnsinh_e" "ac_cv_func_gsl_sf_lnsinh_e" if test "x$ac_cv_func_gsl_sf_lnsinh_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNSINH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lnsinh" fi done for ac_func in gsl_sf_lnsinh_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnsinh_e" "ac_cv_func_gsl_sf_lnsinh_e" if test "x$ac_cv_func_gsl_sf_lnsinh_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNSINH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lnsinh" fi done for ac_func in gsl_sf_lncosh_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lncosh_e" "ac_cv_func_gsl_sf_lncosh_e" if test "x$ac_cv_func_gsl_sf_lncosh_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNCOSH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lncosh" fi done for ac_func in gsl_sf_lncosh_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lncosh_e" "ac_cv_func_gsl_sf_lncosh_e" if test "x$ac_cv_func_gsl_sf_lncosh_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNCOSH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lncosh" fi done for ac_func in gsl_sf_bessel_Jn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Jn_e" "ac_cv_func_gsl_sf_bessel_Jn_e" if test "x$ac_cv_func_gsl_sf_bessel_Jn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jn" fi done for ac_func in gsl_sf_bessel_Jn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Jn_e" "ac_cv_func_gsl_sf_bessel_Jn_e" if test "x$ac_cv_func_gsl_sf_bessel_Jn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Jn" fi done for ac_func in gsl_sf_bessel_Yn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Yn_e" "ac_cv_func_gsl_sf_bessel_Yn_e" if test "x$ac_cv_func_gsl_sf_bessel_Yn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Yn" fi done for ac_func in gsl_sf_bessel_Yn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Yn_e" "ac_cv_func_gsl_sf_bessel_Yn_e" if test "x$ac_cv_func_gsl_sf_bessel_Yn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Yn" fi done for ac_func in gsl_sf_bessel_In_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_e" "ac_cv_func_gsl_sf_bessel_In_e" if test "x$ac_cv_func_gsl_sf_bessel_In_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In" fi done for ac_func in gsl_sf_bessel_In_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_e" "ac_cv_func_gsl_sf_bessel_In_e" if test "x$ac_cv_func_gsl_sf_bessel_In_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_In" fi done for ac_func in gsl_sf_bessel_In_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_scaled_e" "ac_cv_func_gsl_sf_bessel_In_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_In_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_scaled" fi done for ac_func in gsl_sf_bessel_In_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_scaled_e" "ac_cv_func_gsl_sf_bessel_In_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_In_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_In_scaled" fi done for ac_func in gsl_sf_bessel_Kn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_e" "ac_cv_func_gsl_sf_bessel_Kn_e" if test "x$ac_cv_func_gsl_sf_bessel_Kn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn" fi done for ac_func in gsl_sf_bessel_Kn_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_e" "ac_cv_func_gsl_sf_bessel_Kn_e" if test "x$ac_cv_func_gsl_sf_bessel_Kn_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Kn" fi done for ac_func in gsl_sf_bessel_Kn_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_scaled_e" "ac_cv_func_gsl_sf_bessel_Kn_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Kn_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_scaled" fi done for ac_func in gsl_sf_bessel_Kn_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_scaled_e" "ac_cv_func_gsl_sf_bessel_Kn_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Kn_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Kn_scaled" fi done for ac_func in gsl_sf_bessel_jl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_jl_e" "ac_cv_func_gsl_sf_bessel_jl_e" if test "x$ac_cv_func_gsl_sf_bessel_jl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl" fi done for ac_func in gsl_sf_bessel_jl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_jl_e" "ac_cv_func_gsl_sf_bessel_jl_e" if test "x$ac_cv_func_gsl_sf_bessel_jl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_jl" fi done for ac_func in gsl_sf_bessel_yl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_yl_e" "ac_cv_func_gsl_sf_bessel_yl_e" if test "x$ac_cv_func_gsl_sf_bessel_yl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_yl" fi done for ac_func in gsl_sf_bessel_yl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_yl_e" "ac_cv_func_gsl_sf_bessel_yl_e" if test "x$ac_cv_func_gsl_sf_bessel_yl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_yl" fi done for ac_func in gsl_sf_bessel_il_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_il_scaled_e" "ac_cv_func_gsl_sf_bessel_il_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_il_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IL_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_il_scaled" fi done for ac_func in gsl_sf_bessel_il_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_il_scaled_e" "ac_cv_func_gsl_sf_bessel_il_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_il_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IL_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_il_scaled" fi done for ac_func in gsl_sf_bessel_kl_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_kl_scaled_e" "ac_cv_func_gsl_sf_bessel_kl_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_kl_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KL_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_kl_scaled" fi done for ac_func in gsl_sf_bessel_kl_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_kl_scaled_e" "ac_cv_func_gsl_sf_bessel_kl_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_kl_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KL_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_kl_scaled" fi done for ac_func in gsl_sf_exprel_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_n_e" "ac_cv_func_gsl_sf_exprel_n_e" if test "x$ac_cv_func_gsl_sf_exprel_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_exprel_n" fi done for ac_func in gsl_sf_exprel_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exprel_n_e" "ac_cv_func_gsl_sf_exprel_n_e" if test "x$ac_cv_func_gsl_sf_exprel_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXPREL_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} exprel_n" fi done for ac_func in gsl_sf_fermi_dirac_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_int_e" "ac_cv_func_gsl_sf_fermi_dirac_int_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_int" fi done for ac_func in gsl_sf_fermi_dirac_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_int_e" "ac_cv_func_gsl_sf_fermi_dirac_int_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} fermi_dirac_int" fi done for ac_func in gsl_sf_taylorcoeff_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_taylorcoeff_e" "ac_cv_func_gsl_sf_taylorcoeff_e" if test "x$ac_cv_func_gsl_sf_taylorcoeff_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TAYLORCOEFF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_taylorcoeff" fi done for ac_func in gsl_sf_taylorcoeff_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_taylorcoeff_e" "ac_cv_func_gsl_sf_taylorcoeff_e" if test "x$ac_cv_func_gsl_sf_taylorcoeff_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_TAYLORCOEFF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} taylorcoeff" fi done for ac_func in gsl_sf_legendre_Pl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Pl_e" "ac_cv_func_gsl_sf_legendre_Pl_e" if test "x$ac_cv_func_gsl_sf_legendre_Pl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PL_E 1 _ACEOF fi done for ac_func in gsl_sf_legendre_Pl_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Pl_e" "ac_cv_func_gsl_sf_legendre_Pl_e" if test "x$ac_cv_func_gsl_sf_legendre_Pl_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PL_E 1 _ACEOF fi done for ac_func in gsl_sf_legendre_Ql_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Ql_e" "ac_cv_func_gsl_sf_legendre_Ql_e" if test "x$ac_cv_func_gsl_sf_legendre_Ql_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_QL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_Ql" fi done for ac_func in gsl_sf_legendre_Ql_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Ql_e" "ac_cv_func_gsl_sf_legendre_Ql_e" if test "x$ac_cv_func_gsl_sf_legendre_Ql_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_QL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} legendre_Ql" fi done for ac_func in gsl_sf_mathieu_a_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_a_e" "ac_cv_func_gsl_sf_mathieu_a_e" if test "x$ac_cv_func_gsl_sf_mathieu_a_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_A_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_a" fi done for ac_func in gsl_sf_mathieu_b_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_b_e" "ac_cv_func_gsl_sf_mathieu_b_e" if test "x$ac_cv_func_gsl_sf_mathieu_b_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_B_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_b" fi done for ac_func in gsl_sf_psi_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_n_e" "ac_cv_func_gsl_sf_psi_n_e" if test "x$ac_cv_func_gsl_sf_psi_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_psi_n" fi done for ac_func in gsl_sf_psi_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_n_e" "ac_cv_func_gsl_sf_psi_n_e" if test "x$ac_cv_func_gsl_sf_psi_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} psi_n" fi done for ac_func in gsl_sf_bessel_Jnu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Jnu_e" "ac_cv_func_gsl_sf_bessel_Jnu_e" if test "x$ac_cv_func_gsl_sf_bessel_Jnu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jnu" fi done for ac_func in gsl_sf_bessel_Jnu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Jnu_e" "ac_cv_func_gsl_sf_bessel_Jnu_e" if test "x$ac_cv_func_gsl_sf_bessel_Jnu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Jnu" fi done for ac_func in gsl_sf_bessel_Ynu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Ynu_e" "ac_cv_func_gsl_sf_bessel_Ynu_e" if test "x$ac_cv_func_gsl_sf_bessel_Ynu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Ynu" fi done for ac_func in gsl_sf_bessel_Ynu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Ynu_e" "ac_cv_func_gsl_sf_bessel_Ynu_e" if test "x$ac_cv_func_gsl_sf_bessel_Ynu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Ynu" fi done for ac_func in gsl_sf_bessel_Inu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Inu_e" "ac_cv_func_gsl_sf_bessel_Inu_e" if test "x$ac_cv_func_gsl_sf_bessel_Inu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_INU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Inu" fi done for ac_func in gsl_sf_bessel_Inu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Inu_e" "ac_cv_func_gsl_sf_bessel_Inu_e" if test "x$ac_cv_func_gsl_sf_bessel_Inu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_INU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Inu" fi done for ac_func in gsl_sf_bessel_Inu_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Inu_scaled_e" "ac_cv_func_gsl_sf_bessel_Inu_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Inu_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_INU_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Inu_scaled" fi done for ac_func in gsl_sf_bessel_Inu_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Inu_scaled_e" "ac_cv_func_gsl_sf_bessel_Inu_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Inu_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_INU_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Inu_scaled" fi done for ac_func in gsl_sf_bessel_Knu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Knu_e" "ac_cv_func_gsl_sf_bessel_Knu_e" if test "x$ac_cv_func_gsl_sf_bessel_Knu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Knu" fi done for ac_func in gsl_sf_bessel_Knu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Knu_e" "ac_cv_func_gsl_sf_bessel_Knu_e" if test "x$ac_cv_func_gsl_sf_bessel_Knu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Knu" fi done for ac_func in gsl_sf_bessel_lnKnu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_lnKnu_e" "ac_cv_func_gsl_sf_bessel_lnKnu_e" if test "x$ac_cv_func_gsl_sf_bessel_lnKnu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_LNKNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_lnKnu" fi done for ac_func in gsl_sf_bessel_lnKnu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_lnKnu_e" "ac_cv_func_gsl_sf_bessel_lnKnu_e" if test "x$ac_cv_func_gsl_sf_bessel_lnKnu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_LNKNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_lnKnu" fi done for ac_func in gsl_sf_bessel_Knu_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Knu_scaled_e" "ac_cv_func_gsl_sf_bessel_Knu_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Knu_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KNU_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Knu_scaled" fi done for ac_func in gsl_sf_bessel_Knu_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Knu_scaled_e" "ac_cv_func_gsl_sf_bessel_Knu_scaled_e" if test "x$ac_cv_func_gsl_sf_bessel_Knu_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KNU_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_Knu_scaled" fi done for ac_func in gsl_sf_exp_mult_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exp_mult_e" "ac_cv_func_gsl_sf_exp_mult_e" if test "x$ac_cv_func_gsl_sf_exp_mult_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXP_MULT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_exp_mult" fi done for ac_func in gsl_sf_exp_mult_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_exp_mult_e" "ac_cv_func_gsl_sf_exp_mult_e" if test "x$ac_cv_func_gsl_sf_exp_mult_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_EXP_MULT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} exp_mult" fi done for ac_func in gsl_sf_fermi_dirac_inc_0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_inc_0_e" "ac_cv_func_gsl_sf_fermi_dirac_inc_0_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_inc_0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_INC_0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_inc_0" fi done for ac_func in gsl_sf_fermi_dirac_inc_0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fermi_dirac_inc_0_e" "ac_cv_func_gsl_sf_fermi_dirac_inc_0_e" if test "x$ac_cv_func_gsl_sf_fermi_dirac_inc_0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FERMI_DIRAC_INC_0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} fermi_dirac_inc_0" fi done for ac_func in gsl_sf_poch_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_poch_e" "ac_cv_func_gsl_sf_poch_e" if test "x$ac_cv_func_gsl_sf_poch_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_POCH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_poch" fi done for ac_func in gsl_sf_poch_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_poch_e" "ac_cv_func_gsl_sf_poch_e" if test "x$ac_cv_func_gsl_sf_poch_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_POCH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} poch" fi done for ac_func in gsl_sf_lnpoch_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnpoch_e" "ac_cv_func_gsl_sf_lnpoch_e" if test "x$ac_cv_func_gsl_sf_lnpoch_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNPOCH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lnpoch" fi done for ac_func in gsl_sf_lnpoch_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnpoch_e" "ac_cv_func_gsl_sf_lnpoch_e" if test "x$ac_cv_func_gsl_sf_lnpoch_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNPOCH_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lnpoch" fi done for ac_func in gsl_sf_pochrel_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_pochrel_e" "ac_cv_func_gsl_sf_pochrel_e" if test "x$ac_cv_func_gsl_sf_pochrel_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_POCHREL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_pochrel" fi done for ac_func in gsl_sf_pochrel_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_pochrel_e" "ac_cv_func_gsl_sf_pochrel_e" if test "x$ac_cv_func_gsl_sf_pochrel_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_POCHREL_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} pochrel" fi done for ac_func in gsl_sf_gamma_inc_Q_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_Q_e" "ac_cv_func_gsl_sf_gamma_inc_Q_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_Q_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_Q_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc_Q" fi done for ac_func in gsl_sf_gamma_inc_Q_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_Q_e" "ac_cv_func_gsl_sf_gamma_inc_Q_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_Q_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_Q_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gamma_inc_Q" fi done for ac_func in gsl_sf_gamma_inc_P_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_P_e" "ac_cv_func_gsl_sf_gamma_inc_P_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_P_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_P_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc_P" fi done for ac_func in gsl_sf_gamma_inc_P_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_P_e" "ac_cv_func_gsl_sf_gamma_inc_P_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_P_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_P_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gamma_inc_P" fi done for ac_func in gsl_sf_gamma_inc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_e" "ac_cv_func_gsl_sf_gamma_inc_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc" fi done for ac_func in gsl_sf_gamma_inc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gamma_inc_e" "ac_cv_func_gsl_sf_gamma_inc_e" if test "x$ac_cv_func_gsl_sf_gamma_inc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GAMMA_INC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gamma_inc" fi done for ac_func in gsl_sf_beta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_beta_e" "ac_cv_func_gsl_sf_beta_e" if test "x$ac_cv_func_gsl_sf_beta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_beta" fi done for ac_func in gsl_sf_beta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_beta_e" "ac_cv_func_gsl_sf_beta_e" if test "x$ac_cv_func_gsl_sf_beta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} beta_gsl" fi done for ac_func in gsl_sf_lnbeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnbeta_e" "ac_cv_func_gsl_sf_lnbeta_e" if test "x$ac_cv_func_gsl_sf_lnbeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNBETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lnbeta" fi done for ac_func in gsl_sf_lnbeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnbeta_e" "ac_cv_func_gsl_sf_lnbeta_e" if test "x$ac_cv_func_gsl_sf_lnbeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNBETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} lnbeta" fi done for ac_func in gsl_sf_hyperg_0F1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_0F1_e" "ac_cv_func_gsl_sf_hyperg_0F1_e" if test "x$ac_cv_func_gsl_sf_hyperg_0F1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_0F1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_0F1" fi done for ac_func in gsl_sf_hyperg_0F1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_0F1_e" "ac_cv_func_gsl_sf_hyperg_0F1_e" if test "x$ac_cv_func_gsl_sf_hyperg_0F1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_0F1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hyperg_0F1" fi done for ac_func in gsl_sf_conicalP_half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_half_e" "ac_cv_func_gsl_sf_conicalP_half_e" if test "x$ac_cv_func_gsl_sf_conicalP_half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_half" fi done for ac_func in gsl_sf_conicalP_half_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_half_e" "ac_cv_func_gsl_sf_conicalP_half_e" if test "x$ac_cv_func_gsl_sf_conicalP_half_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_HALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} conicalP_half" fi done for ac_func in gsl_sf_conicalP_mhalf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_mhalf_e" "ac_cv_func_gsl_sf_conicalP_mhalf_e" if test "x$ac_cv_func_gsl_sf_conicalP_mhalf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_MHALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_mhalf" fi done for ac_func in gsl_sf_conicalP_mhalf_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_mhalf_e" "ac_cv_func_gsl_sf_conicalP_mhalf_e" if test "x$ac_cv_func_gsl_sf_conicalP_mhalf_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_MHALF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} conicalP_mhalf" fi done for ac_func in gsl_sf_conicalP_0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_0_e" "ac_cv_func_gsl_sf_conicalP_0_e" if test "x$ac_cv_func_gsl_sf_conicalP_0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_0" fi done for ac_func in gsl_sf_conicalP_0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_0_e" "ac_cv_func_gsl_sf_conicalP_0_e" if test "x$ac_cv_func_gsl_sf_conicalP_0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} conicalP_0" fi done for ac_func in gsl_sf_conicalP_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_1_e" "ac_cv_func_gsl_sf_conicalP_1_e" if test "x$ac_cv_func_gsl_sf_conicalP_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_1" fi done for ac_func in gsl_sf_conicalP_1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_1_e" "ac_cv_func_gsl_sf_conicalP_1_e" if test "x$ac_cv_func_gsl_sf_conicalP_1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} conicalP_1" fi done for ac_func in gsl_sf_airy_Ai_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_e" "ac_cv_func_gsl_sf_airy_Ai_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai" fi done for ac_func in gsl_sf_airy_Ai_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_e" "ac_cv_func_gsl_sf_airy_Ai_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Ai" fi done for ac_func in gsl_sf_airy_Bi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_e" "ac_cv_func_gsl_sf_airy_Bi_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi" fi done for ac_func in gsl_sf_airy_Bi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_e" "ac_cv_func_gsl_sf_airy_Bi_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Bi" fi done for ac_func in gsl_sf_airy_Ai_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_scaled_e" "ac_cv_func_gsl_sf_airy_Ai_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_scaled" fi done for ac_func in gsl_sf_airy_Ai_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_scaled_e" "ac_cv_func_gsl_sf_airy_Ai_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Ai_scaled" fi done for ac_func in gsl_sf_airy_Bi_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_scaled_e" "ac_cv_func_gsl_sf_airy_Bi_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_scaled" fi done for ac_func in gsl_sf_airy_Bi_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_scaled_e" "ac_cv_func_gsl_sf_airy_Bi_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Bi_scaled" fi done for ac_func in gsl_sf_airy_Ai_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_deriv_e" "ac_cv_func_gsl_sf_airy_Ai_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_deriv" fi done for ac_func in gsl_sf_airy_Ai_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_deriv_e" "ac_cv_func_gsl_sf_airy_Ai_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Ai_deriv" fi done for ac_func in gsl_sf_airy_Bi_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_deriv_e" "ac_cv_func_gsl_sf_airy_Bi_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_deriv" fi done for ac_func in gsl_sf_airy_Bi_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_deriv_e" "ac_cv_func_gsl_sf_airy_Bi_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Bi_deriv" fi done for ac_func in gsl_sf_airy_Ai_deriv_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_deriv_scaled_e" "ac_cv_func_gsl_sf_airy_Ai_deriv_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_deriv_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_deriv_scaled" fi done for ac_func in gsl_sf_airy_Ai_deriv_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Ai_deriv_scaled_e" "ac_cv_func_gsl_sf_airy_Ai_deriv_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Ai_deriv_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Ai_deriv_scaled" fi done for ac_func in gsl_sf_airy_Bi_deriv_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_deriv_scaled_e" "ac_cv_func_gsl_sf_airy_Bi_deriv_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_deriv_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_deriv_scaled" fi done for ac_func in gsl_sf_airy_Bi_deriv_scaled_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_Bi_deriv_scaled_e" "ac_cv_func_gsl_sf_airy_Bi_deriv_scaled_e" if test "x$ac_cv_func_gsl_sf_airy_Bi_deriv_scaled_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_Bi_deriv_scaled" fi done for ac_func in gsl_sf_ellint_Kcomp_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_Kcomp_e" "ac_cv_func_gsl_sf_ellint_Kcomp_e" if test "x$ac_cv_func_gsl_sf_ellint_Kcomp_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_KCOMP_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Kcomp" fi done for ac_func in gsl_sf_ellint_Kcomp_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_Kcomp_e" "ac_cv_func_gsl_sf_ellint_Kcomp_e" if test "x$ac_cv_func_gsl_sf_ellint_Kcomp_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_KCOMP_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} ellint_Kcomp" fi done for ac_func in gsl_sf_ellint_Ecomp_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_Ecomp_e" "ac_cv_func_gsl_sf_ellint_Ecomp_e" if test "x$ac_cv_func_gsl_sf_ellint_Ecomp_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_ECOMP_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Ecomp" fi done for ac_func in gsl_sf_ellint_Ecomp_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_Ecomp_e" "ac_cv_func_gsl_sf_ellint_Ecomp_e" if test "x$ac_cv_func_gsl_sf_ellint_Ecomp_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_ECOMP_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} ellint_Ecomp" fi done for ac_func in gsl_sf_ellint_E_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_E_e" "ac_cv_func_gsl_sf_ellint_E_e" if test "x$ac_cv_func_gsl_sf_ellint_E_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_E_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_E" fi done for ac_func in gsl_sf_ellint_F_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_F_e" "ac_cv_func_gsl_sf_ellint_F_e" if test "x$ac_cv_func_gsl_sf_ellint_F_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_F_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_F" fi done for ac_func in gsl_sf_ellint_Pcomp_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_Pcomp_e" "ac_cv_func_gsl_sf_ellint_Pcomp_e" if test "x$ac_cv_func_gsl_sf_ellint_Pcomp_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_PCOMP_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Pcomp" fi done for ac_func in gsl_sf_ellint_RC_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_RC_e" "ac_cv_func_gsl_sf_ellint_RC_e" if test "x$ac_cv_func_gsl_sf_ellint_RC_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_RC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RC" fi done for ac_func in gsl_sf_ellint_D_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_D_e" "ac_cv_func_gsl_sf_ellint_D_e" if test "x$ac_cv_func_gsl_sf_ellint_D_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_D_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_D" fi done for ac_func in gsl_sf_ellint_P_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_P_e" "ac_cv_func_gsl_sf_ellint_P_e" if test "x$ac_cv_func_gsl_sf_ellint_P_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_P_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_P" fi done for ac_func in gsl_sf_ellint_RD_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_RD_e" "ac_cv_func_gsl_sf_ellint_RD_e" if test "x$ac_cv_func_gsl_sf_ellint_RD_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_RD_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RD" fi done for ac_func in gsl_sf_ellint_RF_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_RF_e" "ac_cv_func_gsl_sf_ellint_RF_e" if test "x$ac_cv_func_gsl_sf_ellint_RF_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_RF_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RF" fi done for ac_func in gsl_sf_ellint_RJ_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_ellint_RJ_e" "ac_cv_func_gsl_sf_ellint_RJ_e" if test "x$ac_cv_func_gsl_sf_ellint_RJ_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ELLINT_RJ_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RJ" fi done for ac_func in gsl_sf_airy_zero_Ai_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Ai_e" "ac_cv_func_gsl_sf_airy_zero_Ai_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Ai_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_AI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Ai" fi done for ac_func in gsl_sf_airy_zero_Ai_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Ai_e" "ac_cv_func_gsl_sf_airy_zero_Ai_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Ai_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_AI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_zero_Ai" fi done for ac_func in gsl_sf_airy_zero_Bi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Bi_e" "ac_cv_func_gsl_sf_airy_zero_Bi_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Bi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_BI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Bi" fi done for ac_func in gsl_sf_airy_zero_Bi_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Bi_e" "ac_cv_func_gsl_sf_airy_zero_Bi_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Bi_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_BI_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_zero_Bi" fi done for ac_func in gsl_sf_airy_zero_Ai_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Ai_deriv_e" "ac_cv_func_gsl_sf_airy_zero_Ai_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Ai_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Ai_deriv" fi done for ac_func in gsl_sf_airy_zero_Ai_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Ai_deriv_e" "ac_cv_func_gsl_sf_airy_zero_Ai_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Ai_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_zero_Ai_deriv" fi done for ac_func in gsl_sf_airy_zero_Bi_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Bi_deriv_e" "ac_cv_func_gsl_sf_airy_zero_Bi_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Bi_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Bi_deriv" fi done for ac_func in gsl_sf_airy_zero_Bi_deriv_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_airy_zero_Bi_deriv_e" "ac_cv_func_gsl_sf_airy_zero_Bi_deriv_e" if test "x$ac_cv_func_gsl_sf_airy_zero_Bi_deriv_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} airy_zero_Bi_deriv" fi done for ac_func in gsl_sf_bessel_zero_J0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_zero_J0_e" "ac_cv_func_gsl_sf_bessel_zero_J0_e" if test "x$ac_cv_func_gsl_sf_bessel_zero_J0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_ZERO_J0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_J0" fi done for ac_func in gsl_sf_bessel_zero_J0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_zero_J0_e" "ac_cv_func_gsl_sf_bessel_zero_J0_e" if test "x$ac_cv_func_gsl_sf_bessel_zero_J0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_ZERO_J0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_zero_J0" fi done for ac_func in gsl_sf_bessel_zero_J1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_zero_J1_e" "ac_cv_func_gsl_sf_bessel_zero_J1_e" if test "x$ac_cv_func_gsl_sf_bessel_zero_J1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_ZERO_J1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_J1" fi done for ac_func in gsl_sf_bessel_zero_J1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_zero_J1_e" "ac_cv_func_gsl_sf_bessel_zero_J1_e" if test "x$ac_cv_func_gsl_sf_bessel_zero_J1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_ZERO_J1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} bessel_zero_J1" fi done for ac_func in gsl_sf_psi_1_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_1_int_e" "ac_cv_func_gsl_sf_psi_1_int_e" if test "x$ac_cv_func_gsl_sf_psi_1_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_1_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_psi_1_int" fi done for ac_func in gsl_sf_psi_1_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_psi_1_int_e" "ac_cv_func_gsl_sf_psi_1_int_e" if test "x$ac_cv_func_gsl_sf_psi_1_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_PSI_1_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} psi_1_int" fi done for ac_func in gsl_sf_conicalP_cyl_reg_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_cyl_reg_e" "ac_cv_func_gsl_sf_conicalP_cyl_reg_e" if test "x$ac_cv_func_gsl_sf_conicalP_cyl_reg_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_CYL_REG_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_cyl_reg" fi done for ac_func in gsl_sf_conicalP_sph_reg_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_conicalP_sph_reg_e" "ac_cv_func_gsl_sf_conicalP_sph_reg_e" if test "x$ac_cv_func_gsl_sf_conicalP_sph_reg_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CONICALP_SPH_REG_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_sph_reg" fi done for ac_func in gsl_sf_gegenpoly_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gegenpoly_n_e" "ac_cv_func_gsl_sf_gegenpoly_n_e" if test "x$ac_cv_func_gsl_sf_gegenpoly_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GEGENPOLY_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gegenpoly_n" fi done for ac_func in gsl_sf_laguerre_n_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_laguerre_n_e" "ac_cv_func_gsl_sf_laguerre_n_e" if test "x$ac_cv_func_gsl_sf_laguerre_n_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LAGUERRE_N_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_laguerre_n" fi done for ac_func in gsl_sf_mathieu_ce_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_ce_e" "ac_cv_func_gsl_sf_mathieu_ce_e" if test "x$ac_cv_func_gsl_sf_mathieu_ce_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_CE_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_ce" fi done for ac_func in gsl_sf_mathieu_se_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_se_e" "ac_cv_func_gsl_sf_mathieu_se_e" if test "x$ac_cv_func_gsl_sf_mathieu_se_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_SE_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_se" fi done for ac_func in gsl_sf_hyperg_U_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_U_int_e" "ac_cv_func_gsl_sf_hyperg_U_int_e" if test "x$ac_cv_func_gsl_sf_hyperg_U_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_U_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_U_int" fi done for ac_func in gsl_sf_hyperg_1F1_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_1F1_int_e" "ac_cv_func_gsl_sf_hyperg_1F1_int_e" if test "x$ac_cv_func_gsl_sf_hyperg_1F1_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_1F1_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_1F1_int" fi done for ac_func in gsl_sf_legendre_Plm_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Plm_e" "ac_cv_func_gsl_sf_legendre_Plm_e" if test "x$ac_cv_func_gsl_sf_legendre_Plm_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PLM_E 1 _ACEOF fi done for ac_func in gsl_sf_legendre_Plm_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Plm_e" "ac_cv_func_gsl_sf_legendre_Plm_e" if test "x$ac_cv_func_gsl_sf_legendre_Plm_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PLM_E 1 _ACEOF fi done for ac_func in gsl_sf_legendre_sphPlm_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_sphPlm_e" "ac_cv_func_gsl_sf_legendre_sphPlm_e" if test "x$ac_cv_func_gsl_sf_legendre_sphPlm_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_SPHPLM_E 1 _ACEOF fi done for ac_func in gsl_sf_legendre_sphPlm_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_sphPlm_e" "ac_cv_func_gsl_sf_legendre_sphPlm_e" if test "x$ac_cv_func_gsl_sf_legendre_sphPlm_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_SPHPLM_E 1 _ACEOF fi done for ac_func in gsl_sf_hydrogenicR_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hydrogenicR_e" "ac_cv_func_gsl_sf_hydrogenicR_e" if test "x$ac_cv_func_gsl_sf_hydrogenicR_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYDROGENICR_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hydrogenicR" fi done for ac_func in gsl_sf_mathieu_Mc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_Mc_e" "ac_cv_func_gsl_sf_mathieu_Mc_e" if test "x$ac_cv_func_gsl_sf_mathieu_Mc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_MC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_Mc" fi done for ac_func in gsl_sf_mathieu_Ms_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_mathieu_Ms_e" "ac_cv_func_gsl_sf_mathieu_Ms_e" if test "x$ac_cv_func_gsl_sf_mathieu_Ms_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_MATHIEU_MS_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_Ms" fi done for ac_func in gsl_sf_bessel_zero_Jnu_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_zero_Jnu_e" "ac_cv_func_gsl_sf_bessel_zero_Jnu_e" if test "x$ac_cv_func_gsl_sf_bessel_zero_Jnu_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_ZERO_JNU_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_Jnu" fi done for ac_func in gsl_sf_hyperg_U_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_U_e" "ac_cv_func_gsl_sf_hyperg_U_e" if test "x$ac_cv_func_gsl_sf_hyperg_U_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_U_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_U" fi done for ac_func in gsl_sf_hyperg_U_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_U_e" "ac_cv_func_gsl_sf_hyperg_U_e" if test "x$ac_cv_func_gsl_sf_hyperg_U_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_U_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hyperg_U" fi done for ac_func in gsl_sf_hyperg_1F1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_1F1_e" "ac_cv_func_gsl_sf_hyperg_1F1_e" if test "x$ac_cv_func_gsl_sf_hyperg_1F1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_1F1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_1F1" fi done for ac_func in gsl_sf_hyperg_1F1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_1F1_e" "ac_cv_func_gsl_sf_hyperg_1F1_e" if test "x$ac_cv_func_gsl_sf_hyperg_1F1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_1F1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hyperg_1F1" fi done for ac_func in gsl_sf_hyperg_2F0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_2F0_e" "ac_cv_func_gsl_sf_hyperg_2F0_e" if test "x$ac_cv_func_gsl_sf_hyperg_2F0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_2F0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_2F0" fi done for ac_func in gsl_sf_hyperg_2F0_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_2F0_e" "ac_cv_func_gsl_sf_hyperg_2F0_e" if test "x$ac_cv_func_gsl_sf_hyperg_2F0_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_2F0_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hyperg_2F0" fi done for ac_func in gsl_sf_beta_inc_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_beta_inc_e" "ac_cv_func_gsl_sf_beta_inc_e" if test "x$ac_cv_func_gsl_sf_beta_inc_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BETA_INC_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_beta_inc" fi done for ac_func in gsl_sf_hyperg_2F1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hyperg_2F1_e" "ac_cv_func_gsl_sf_hyperg_2F1_e" if test "x$ac_cv_func_gsl_sf_hyperg_2F1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HYPERG_2F1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_2F1" fi done for ac_func in gsl_sf_fact_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_fact_e" "ac_cv_func_gsl_sf_fact_e" if test "x$ac_cv_func_gsl_sf_fact_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_FACT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_fact" fi done for ac_func in gsl_sf_doublefact_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_doublefact_e" "ac_cv_func_gsl_sf_doublefact_e" if test "x$ac_cv_func_gsl_sf_doublefact_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_DOUBLEFACT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_doublefact" fi done for ac_func in gsl_sf_lnfact_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnfact_e" "ac_cv_func_gsl_sf_lnfact_e" if test "x$ac_cv_func_gsl_sf_lnfact_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNFACT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lnfact" fi done for ac_func in gsl_sf_lndoublefact_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lndoublefact_e" "ac_cv_func_gsl_sf_lndoublefact_e" if test "x$ac_cv_func_gsl_sf_lndoublefact_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNDOUBLEFACT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lndoublefact" fi done for ac_func in gsl_sf_choose_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_choose_e" "ac_cv_func_gsl_sf_choose_e" if test "x$ac_cv_func_gsl_sf_choose_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_CHOOSE_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_choose" fi done for ac_func in gsl_sf_lnchoose_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_lnchoose_e" "ac_cv_func_gsl_sf_lnchoose_e" if test "x$ac_cv_func_gsl_sf_lnchoose_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LNCHOOSE_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_lnchoose" fi done for ac_func in gsl_sf_coupling_3j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_3j_e" "ac_cv_func_gsl_sf_coupling_3j_e" if test "x$ac_cv_func_gsl_sf_coupling_3j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_3J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_3j" fi done for ac_func in gsl_sf_coupling_3j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_3j_e" "ac_cv_func_gsl_sf_coupling_3j_e" if test "x$ac_cv_func_gsl_sf_coupling_3j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_3J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} coupling_3j" fi done for ac_func in gsl_sf_coupling_6j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_6j_e" "ac_cv_func_gsl_sf_coupling_6j_e" if test "x$ac_cv_func_gsl_sf_coupling_6j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_6J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_6j" fi done for ac_func in gsl_sf_coupling_6j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_6j_e" "ac_cv_func_gsl_sf_coupling_6j_e" if test "x$ac_cv_func_gsl_sf_coupling_6j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_6J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} coupling_6j" fi done for ac_func in gsl_sf_coupling_9j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_9j_e" "ac_cv_func_gsl_sf_coupling_9j_e" if test "x$ac_cv_func_gsl_sf_coupling_9j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_9J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_9j" fi done for ac_func in gsl_sf_coupling_9j_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_coupling_9j_e" "ac_cv_func_gsl_sf_coupling_9j_e" if test "x$ac_cv_func_gsl_sf_coupling_9j_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_COUPLING_9J_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} coupling_9j" fi done for ac_func in gsl_sf_bessel_jl_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_jl_array" "ac_cv_func_gsl_sf_bessel_jl_array" if test "x$ac_cv_func_gsl_sf_bessel_jl_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JL_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl_array" fi done for ac_func in gsl_sf_bessel_jl_steed_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_jl_steed_array" "ac_cv_func_gsl_sf_bessel_jl_steed_array" if test "x$ac_cv_func_gsl_sf_bessel_jl_steed_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JL_STEED_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl_steed_array" fi done for ac_func in gsl_sf_bessel_il_scaled_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_il_scaled_array" "ac_cv_func_gsl_sf_bessel_il_scaled_array" if test "x$ac_cv_func_gsl_sf_bessel_il_scaled_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IL_SCALED_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_il_scaled_array" fi done for ac_func in gsl_sf_bessel_kl_scaled_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_kl_scaled_array" "ac_cv_func_gsl_sf_bessel_kl_scaled_array" if test "x$ac_cv_func_gsl_sf_bessel_kl_scaled_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KL_SCALED_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_kl_scaled_array" fi done for ac_func in gsl_sf_bessel_yl_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_yl_array" "ac_cv_func_gsl_sf_bessel_yl_array" if test "x$ac_cv_func_gsl_sf_bessel_yl_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YL_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_yl_array" fi done for ac_func in gsl_sf_legendre_Pl_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Pl_array" "ac_cv_func_gsl_sf_legendre_Pl_array" if test "x$ac_cv_func_gsl_sf_legendre_Pl_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PL_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_Pl_array" fi done for ac_func in gsl_sf_gegenpoly_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_gegenpoly_array" "ac_cv_func_gsl_sf_gegenpoly_array" if test "x$ac_cv_func_gsl_sf_gegenpoly_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_GEGENPOLY_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_gegenpoly_array" fi done for ac_func in gsl_sf_bessel_In_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_array" "ac_cv_func_gsl_sf_bessel_In_array" if test "x$ac_cv_func_gsl_sf_bessel_In_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_array" fi done for ac_func in gsl_sf_bessel_In_scaled_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_In_scaled_array" "ac_cv_func_gsl_sf_bessel_In_scaled_array" if test "x$ac_cv_func_gsl_sf_bessel_In_scaled_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_IN_SCALED_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_scaled_array" fi done for ac_func in gsl_sf_bessel_Jn_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Jn_array" "ac_cv_func_gsl_sf_bessel_Jn_array" if test "x$ac_cv_func_gsl_sf_bessel_Jn_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_JN_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jn_array" fi done for ac_func in gsl_sf_bessel_Kn_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_array" "ac_cv_func_gsl_sf_bessel_Kn_array" if test "x$ac_cv_func_gsl_sf_bessel_Kn_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_array" fi done for ac_func in gsl_sf_bessel_Kn_scaled_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Kn_scaled_array" "ac_cv_func_gsl_sf_bessel_Kn_scaled_array" if test "x$ac_cv_func_gsl_sf_bessel_Kn_scaled_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_KN_SCALED_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_scaled_array" fi done for ac_func in gsl_sf_bessel_Yn_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_bessel_Yn_array" "ac_cv_func_gsl_sf_bessel_Yn_array" if test "x$ac_cv_func_gsl_sf_bessel_Yn_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_BESSEL_YN_ARRAY 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Yn_array" fi done for ac_func in gsl_sf_legendre_Plm_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Plm_array" "ac_cv_func_gsl_sf_legendre_Plm_array" if test "x$ac_cv_func_gsl_sf_legendre_Plm_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PLM_ARRAY 1 _ACEOF fi done for ac_func in gsl_sf_legendre_Plm_deriv_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_Plm_deriv_array" "ac_cv_func_gsl_sf_legendre_Plm_deriv_array" if test "x$ac_cv_func_gsl_sf_legendre_Plm_deriv_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_PLM_DERIV_ARRAY 1 _ACEOF fi done for ac_func in gsl_sf_legendre_sphPlm_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_sphPlm_array" "ac_cv_func_gsl_sf_legendre_sphPlm_array" if test "x$ac_cv_func_gsl_sf_legendre_sphPlm_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY 1 _ACEOF fi done for ac_func in gsl_sf_legendre_sphPlm_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_sphPlm_array" "ac_cv_func_gsl_sf_legendre_sphPlm_array" if test "x$ac_cv_func_gsl_sf_legendre_sphPlm_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY 1 _ACEOF fi done for ac_func in gsl_sf_legendre_sphPlm_deriv_array do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_sphPlm_deriv_array" "ac_cv_func_gsl_sf_legendre_sphPlm_deriv_array" if test "x$ac_cv_func_gsl_sf_legendre_sphPlm_deriv_array" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_SPHPLM_DERIV_ARRAY 1 _ACEOF fi done for ac_func in gsl_sf_legendre_array_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_array_e" "ac_cv_func_gsl_sf_legendre_array_e" if test "x$ac_cv_func_gsl_sf_legendre_array_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_ARRAY_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_array" fi done for ac_func in gsl_sf_legendre_deriv_array_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_deriv_array_e" "ac_cv_func_gsl_sf_legendre_deriv_array_e" if test "x$ac_cv_func_gsl_sf_legendre_deriv_array_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_DERIV_ARRAY_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_deriv_array" fi done for ac_func in gsl_sf_legendre_deriv2_array_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_legendre_deriv2_array_e" "ac_cv_func_gsl_sf_legendre_deriv2_array_e" if test "x$ac_cv_func_gsl_sf_legendre_deriv2_array_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_LEGENDRE_DERIV2_ARRAY_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} legendre_deriv2_array" fi done for ac_func in gsl_sf_zeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zeta_e" "ac_cv_func_gsl_sf_zeta_e" if test "x$ac_cv_func_gsl_sf_zeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_zeta" fi done for ac_func in gsl_sf_zeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zeta_e" "ac_cv_func_gsl_sf_zeta_e" if test "x$ac_cv_func_gsl_sf_zeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_zt_zeta" fi done for ac_func in gsl_sf_zeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zeta_e" "ac_cv_func_gsl_sf_zeta_e" if test "x$ac_cv_func_gsl_sf_zeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} zeta" fi done for ac_func in gsl_sf_zeta_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zeta_int_e" "ac_cv_func_gsl_sf_zeta_int_e" if test "x$ac_cv_func_gsl_sf_zeta_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETA_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_zeta_int" fi done for ac_func in gsl_sf_zeta_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zeta_int_e" "ac_cv_func_gsl_sf_zeta_int_e" if test "x$ac_cv_func_gsl_sf_zeta_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETA_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} zeta_int" fi done for ac_func in gsl_sf_zetam1_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zetam1_e" "ac_cv_func_gsl_sf_zetam1_e" if test "x$ac_cv_func_gsl_sf_zetam1_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETAM1_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_zetam1" fi done for ac_func in gsl_sf_zetam1_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_zetam1_int_e" "ac_cv_func_gsl_sf_zetam1_int_e" if test "x$ac_cv_func_gsl_sf_zetam1_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ZETAM1_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_zetam1_int" fi done for ac_func in gsl_sf_eta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_eta_e" "ac_cv_func_gsl_sf_eta_e" if test "x$ac_cv_func_gsl_sf_eta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_eta" fi done for ac_func in gsl_sf_eta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_eta_e" "ac_cv_func_gsl_sf_eta_e" if test "x$ac_cv_func_gsl_sf_eta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} eta" fi done for ac_func in gsl_sf_eta_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_eta_int_e" "ac_cv_func_gsl_sf_eta_int_e" if test "x$ac_cv_func_gsl_sf_eta_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ETA_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_eta_int" fi done for ac_func in gsl_sf_eta_int_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_eta_int_e" "ac_cv_func_gsl_sf_eta_int_e" if test "x$ac_cv_func_gsl_sf_eta_int_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_ETA_INT_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} eta_int" fi done for ac_func in gsl_sf_hzeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hzeta_e" "ac_cv_func_gsl_sf_hzeta_e" if test "x$ac_cv_func_gsl_sf_hzeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HZETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} gsl_sf_hzeta" fi done for ac_func in gsl_sf_hzeta_e do : ac_fn_cxx_check_func "$LINENO" "gsl_sf_hzeta_e" "ac_cv_func_gsl_sf_hzeta_e" if test "x$ac_cv_func_gsl_sf_hzeta_e" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GSL_SF_HZETA_E 1 _ACEOF else GSL_MISSING="${GSL_MISSING} hzeta" fi done if test -z "$GSL_MISSING"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: GSL special functions: all available" >&5 $as_echo "GSL special functions: all available" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Some GSL special functions are missing: $GSL_MISSING" >&5 $as_echo "$as_me: WARNING: Some GSL special functions are missing: $GSL_MISSING" >&2;} fi ac_config_files="$ac_config_files Makefile" 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_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$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+set}" = set || &/ 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 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$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 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$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}' DEFS=-DHAVE_CONFIG_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=`$as_echo "$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" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$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 if test -n "${ZSH_VERSION+set}" && (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 case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; 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 # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # 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 test -z "$as_dir" && as_dir=. 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 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # 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 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$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_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_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 || $as_echo 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 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 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=`$as_echo "$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 || $as_echo 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 Octave Forge gsl package $as_me 2.1.1, which was generated by GNU Autoconf 2.69. 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 case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" _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 --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Report bugs to the package provider." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ Octave Forge gsl package config.status 2.1.1 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 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 ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$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 \$as_echo "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 $as_echo "$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 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; *) 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+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 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" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS " 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=`$as_echo "$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 '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$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 || $as_echo 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=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$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@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$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"; } && { $as_echo "$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 $as_echo "$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 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi ;; 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 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi gsl-2.1.1/src/PaxHeaders.7911/IIDD_D.template.cc0000644000000000000000000000013213311744162015644 xustar0030 mtime=1529333874.195776735 30 atime=1529333875.831775412 30 ctime=1529333876.223775085 gsl-2.1.1/src/IIDD_D.template.cc0000644000175000017500000001150213311744162016101 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/generate_template.sh0000644000000000000000000000013213311744161016567 xustar0030 mtime=1529333873.207777499 30 atime=1529333874.059776844 30 ctime=1529333876.223775085 gsl-2.1.1/src/generate_template.sh0000755000175000017500000002337313311744161017040 0ustar00bectbect00000000000000#!/bin/bash ## Copyright (C) 2016 Susi Lehtola ## Copyright (C) 2016 Julien Bect ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . ## This script is used to generate templates for octave-gsl ## Need at least two arguments: type and output file MINPARAMS=2 ## Number of GSL parameters is let ngsl=${#}-1 let npars=${ngsl} ## Get the position of the 'mode' argument (if there is one) if [[ ${!npars} == "mode" ]]; then mode=$npars let npars-- else mode=0 fi ## Output file is outf=${!#} cat > $outf <> $outf for ((i=1; i<=npars; i++)); do if (( i > 1 )); then echo -n ", " >> $outf fi echo -n "@var{arg${i}}" >> $outf done if ((mode > 0)); then echo -n ", @var{mode}" >> $outf fi cat >> $outf < 0)); then cat >> $outf <> $outf < 0)); then let ic=mode-1 cat >> $outf <> $outf echo " NDArray arg1 = args(0).array_value();" >> $outf echo "" >> $outf ## Get the dimension of the array echo " // Get the dimension of the array" >> $outf echo " dim_vector dim (arg1.dims ());" >> $outf echo " octave_idx_type numel = dim.numel ();" >> $outf echo "" >> $outf ## Get a pointer to the data of the input array echo " // Get a pointer to the data of the input array" >> $outf echo " const double *arg1_data = arg1.data ();" >> $outf echo "" >> $outf else ## Get input arguments as NDArray objects echo " // Get input arguments as NDArray objects" >> $outf for ((i=1; i<=npars; i++)); do let ic=i-1 echo " NDArray arg${i} = args(${ic}).array_value();" >> $outf done echo "" >> $outf ## Get the dimensions of the arrays echo " // Get the dimensions of the arrays" >> $outf echo " dim_vector dim (1, 1);" >> $outf echo " octave_idx_type numel = 1;" >> $outf echo " bool conformant = true;" >> $outf for ((i=1; i<=npars; i++)); do echo " bool arg${i}_scalar = check_arg_dim (arg${i}, dim, numel, conformant);" >> $outf done echo "" >> $outf ## Check if sizes are compatible echo " // Error in case of non-conformant arguments" >> $outf echo " if (! conformant)" >> $outf echo " {" >> $outf echo " error (\"Non-scalar input arguments must all have the same size.\");" >> $outf echo " return octave_value ();" >> $outf echo " }" >> $outf echo "" >> $outf ## Create one separate index for each argument echo " // Create one separate index for each argument" >> $outf for ((i=1; i<=npars; i++)); do echo " octave_idx_type i${i} = 0;" >> $outf done echo "" >> $outf ## Create one separate increment for each argument echo " // Create one separate increment for each argument" >> $outf for ((i=1; i<=npars; i++)); do echo " octave_idx_type inc${i} = (arg${i}_scalar ? 0 : 1);" >> $outf done echo "" >> $outf ## Get pointers to the data of the input arrays echo " // Get pointers to the data of the input arrays" >> $outf for ((i=1; i<=npars; i++)); do echo " const double *arg${i}_data = arg${i}.data ();" >> $outf done echo "" >> $outf fi ## Access the data ## $1 = type: "double", "int" or "uint" ## $2 = argument number ## $3 = name of index variable access_data () { if [[ $1 == "double" ]]; then echo -n "arg$2_data[$3]" >> $outf elif [[ $1 == "int" ]]; then echo -n "x$2" >> $outf elif [[ $1 == "uint" ]]; then echo -n "x$2" >> $outf else echo "Unknown type $1" exit fi } ## Convert double-precision values to integers ## $1 = type: "double", "int" or "uint" ## $2 = argument number ## $3 = name of index variable ## $4 = nargout convert_check_data () { if [[ $1 == "double" ]]; then : elif [[ $1 == "int" ]]; then echo " // Convert argument #$2 to int" >> $outf echo " double t$2 = arg$2_data[$3];" >> $outf echo " int x$2 = static_cast (t$2);" >> $outf echo " if ((static_cast (x$2)) != t$2)" >> $outf set_nan_and_break $4 elif [[ $1 == "uint" ]]; then echo " // Convert argument #$2 to unsigned int" >> $outf echo " double t$2 = arg$2_data[$3];" >> $outf echo " unsigned int x$2 = static_cast (t$2);" >> $outf echo " if ((static_cast (x$2)) != t$2)" >> $outf set_nan_and_break $4 else echo "Unknown type $1" exit fi } ## Skip to the next iteration in case of incorrect input ## $1 = nargout set_nan_and_break () { echo " {" >> $outf echo " y.xelem(i) = lo_ieee_nan_value ();" >> $outf if [[ "$1" == "2" ]]; then echo " err.xelem(i) = lo_ieee_nan_value ();" >> $outf fi echo " continue;" >> $outf echo " }" >> $outf echo "" >> $outf } ## Run the calculation run_calculation () { echo " // Run the calculation" >> $outf echo -n " for (octave_idx_type i = 0; i < numel; i++" >> $outf if ((npars > 1)); then for ((i=1; i<=npars; i++)); do echo -n ", i${i} += inc${i}" >> $outf done fi echo ")" >> $outf echo " {" >> $outf if ((npars == 1)); then convert_check_data $1 1 i ${!#} else for ((i=1; i<=npars; i++)); do convert_check_data ${!i} $i i${i} ${!#} done fi echo -n " GSL_FUNC_NAME (" >> $outf if ((npars == 1)); then access_data $1 1 i else for ((i=1; i<=npars; i++)); do if (( i > 1 )); then echo -n ", " >> $outf fi access_data ${!i} $i i${i} done fi if ((mode > 0)); then echo -n ", mode" >> $outf fi echo ", &result);" >> $outf echo " y.xelem(i) = result.val;" >> $outf if [[ "${!#}" == "2" ]]; then echo " err.xelem(i) = result.err;" >> $outf fi echo " }" >> $outf } ## First case: only one output argument cat >> $outf <> $outf <> $outf <> $outf < (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); bool arg7_scalar = check_arg_dim (arg7, dim, numel, conformant); bool arg8_scalar = check_arg_dim (arg8, dim, numel, conformant); bool arg9_scalar = check_arg_dim (arg9, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; octave_idx_type i7 = 0; octave_idx_type i8 = 0; octave_idx_type i9 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); octave_idx_type inc7 = (arg7_scalar ? 0 : 1); octave_idx_type inc8 = (arg8_scalar ? 0 : 1); octave_idx_type inc9 = (arg9_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); const double *arg7_data = arg7.data (); const double *arg8_data = arg8.data (); const double *arg9_data = arg9.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/DDDM_D.template.cc0000644000000000000000000000013213311744162015643 xustar0030 mtime=1529333874.139776779 30 atime=1529333875.619775586 30 ctime=1529333876.223775085 gsl-2.1.1/src/DDDM_D.template.cc0000644000175000017500000001071513311744162016105 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(3).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(3).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/docstring.txt0000644000000000000000000000013213311744164015306 xustar0030 mtime=1529333876.207775099 30 atime=1529333876.211775095 30 ctime=1529333876.223775085 gsl-2.1.1/src/docstring.txt0000644000175000017500000000010013311744164015533 0ustar00bectbect00000000000000Computes the Hurwitz zeta function \zeta(s,q) for s > 1, q > 0. gsl-2.1.1/src/PaxHeaders.7911/Makefile.in0000644000000000000000000000013213311744161014613 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/src/Makefile.in0000644000175000017500000000204513311744161015052 0ustar00bectbect00000000000000## @configure_input@ ## Copyright (C) 2016 Julien Bect ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . MKOCTFILE=@MKOCTFILE@ GSL_DEFINES=@GSL_DEFINES@ #LIBGSL=$(shell gsl-config --libs-without-cblas) LIBGSL=-lgsl .PHONY: all clean distclean all: gsl_sf.oct %.oct: %.cc config.h Makefile $(MKOCTFILE) $(GSL_DEFINES) $< $(LIBGSL) distclean: |clean -rm -f config.status config.log Makefile config.h clean: -rm -f *.o *.oct gsl-2.1.1/src/PaxHeaders.7911/LD_DD_array.template.cc0000644000000000000000000000013213311744162016734 xustar0030 mtime=1529333874.247776694 30 atime=1529333874.243776698 30 ctime=1529333876.223775085 gsl-2.1.1/src/LD_DD_array.template.cc0000644000175000017500000000530113311744162017171 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); RowVector y2 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/DI_D.template.cc0000644000000000000000000000013213311744162015427 xustar0030 mtime=1529333874.163776761 30 atime=1529333875.851775396 30 ctime=1529333876.223775085 gsl-2.1.1/src/DI_D.template.cc0000644000175000017500000000726713311744162015701 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (arg1_data[i1], x2, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (arg1_data[i1], x2, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/gsl_sf.cc0000644000000000000000000000013213311744164014335 xustar0030 mtime=1529333876.219775089 30 atime=1529333874.311776643 30 ctime=1529333876.223775085 gsl-2.1.1/src/gsl_sf.cc0000644000175000017500000360446613311744164014616 0ustar00bectbect00000000000000/* Copyright (C) 2004 Teemu Ikonen Copyright (C) 2016 Susi Lehtola Copyright (C) 2016 Julien Bect This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . */ #include "config.h" #include #include #include #include #include #include #include #ifdef OCTAVE_HAS_OV_ISREAL_METHOD #define ISREAL(x) ((x).isreal ()) #else #define ISREAL(x) ((x).is_real_type ()) #endif void octave_gsl_errorhandler (const char * reason, const char * file, int line, int gsl_errno) { error("GSL error %d at %s, line %d: %s\n", gsl_errno, file, line, reason); } DEFUN_DLD (gsl_sf, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Loadable Function} gsl_sf ()\n\ \n\ gsl_sf is an oct-file containing Octave bindings to the \ special functions of the GNU Scientific Library (GSL).\n\ \n\ @end deftypefn\n") { #ifdef OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE octave::feval ("help", octave_value ("gsl_sf")); #else feval ("help", octave_value ("gsl_sf")); #endif return octave_value(); } template bool check_arg_dim ( A arg, dim_vector &dim, octave_idx_type &numel, bool &conformant ) { dim_vector arg_dim = arg.dims (); octave_idx_type arg_numel = arg.numel (); // If this is a scalar argument, nothing more to do. // The return value indicates that this is a scalar argument. if (arg_numel == 1) return true; if (numel == 1) { dim = arg_dim; numel = arg_numel; } else if (arg_dim != dim) { conformant = false; } return false; } // PKG_ADD: autoload ("gsl_sf_clausen", which ("gsl_sf")); DEFUN_DLD(gsl_sf_clausen, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_clausen (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_clausen (@dots{})\n\ \n\ The Clausen function is defined by the following integral,\n\ \n\ Cl_2(x) = - \\int_0^x dt \\log(2 \\sin(t/2))\n\ \n\ It is related to the dilogarithm by Cl_2(\\theta) = \\Im Li_2(\\exp(i \\theta)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CLAUSEN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_clausen_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_clausen_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CLAUSEN_E undefined error ("GSL function gsl_sf_clausen_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CLAUSEN_E } // PKG_ADD: autoload ("clausen", which ("gsl_sf")); DEFUN_DLD(clausen, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} clausen (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} clausen (@dots{})\n\ \n\ The Clausen function is defined by the following integral,\n\ \n\ Cl_2(x) = - \\int_0^x dt \\log(2 \\sin(t/2))\n\ \n\ It is related to the dilogarithm by Cl_2(\\theta) = \\Im Li_2(\\exp(i \\theta)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CLAUSEN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_clausen_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_clausen_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CLAUSEN_E undefined error ("GSL function gsl_sf_clausen_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CLAUSEN_E } // PKG_ADD: autoload ("gsl_sf_dawson", which ("gsl_sf")); DEFUN_DLD(gsl_sf_dawson, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_dawson (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_dawson (@dots{})\n\ \n\ The Dawson integral is defined by \\exp(-x^2) \\int_0^x dt \\exp(t^2).\n\ A table of Dawson integral can be found in Abramowitz & Stegun, Table 7.5.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DAWSON_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dawson_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dawson_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DAWSON_E undefined error ("GSL function gsl_sf_dawson_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DAWSON_E } // PKG_ADD: autoload ("dawson", which ("gsl_sf")); DEFUN_DLD(dawson, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} dawson (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} dawson (@dots{})\n\ \n\ The Dawson integral is defined by \\exp(-x^2) \\int_0^x dt \\exp(t^2).\n\ A table of Dawson integral can be found in Abramowitz & Stegun, Table 7.5.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DAWSON_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dawson_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dawson_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DAWSON_E undefined error ("GSL function gsl_sf_dawson_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DAWSON_E } // PKG_ADD: autoload ("gsl_sf_debye_1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_1 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_1_E undefined error ("GSL function gsl_sf_debye_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_1_E } // PKG_ADD: autoload ("debye_1", which ("gsl_sf")); DEFUN_DLD(debye_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} debye_1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} debye_1 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_1_E undefined error ("GSL function gsl_sf_debye_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_1_E } // PKG_ADD: autoload ("gsl_sf_debye_2", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_2 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_2_E undefined error ("GSL function gsl_sf_debye_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_2_E } // PKG_ADD: autoload ("debye_2", which ("gsl_sf")); DEFUN_DLD(debye_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} debye_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} debye_2 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_2_E undefined error ("GSL function gsl_sf_debye_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_2_E } // PKG_ADD: autoload ("gsl_sf_debye_3", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_3 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_3_E undefined error ("GSL function gsl_sf_debye_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_3_E } // PKG_ADD: autoload ("debye_3", which ("gsl_sf")); DEFUN_DLD(debye_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} debye_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} debye_3 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_3_E undefined error ("GSL function gsl_sf_debye_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_3_E } // PKG_ADD: autoload ("gsl_sf_debye_4", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_4, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_4 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_4 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_4_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_4_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_4_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_4_E undefined error ("GSL function gsl_sf_debye_4_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_4_E } // PKG_ADD: autoload ("debye_4", which ("gsl_sf")); DEFUN_DLD(debye_4, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} debye_4 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} debye_4 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_4_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_4_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_4_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_4_E undefined error ("GSL function gsl_sf_debye_4_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_4_E } // PKG_ADD: autoload ("gsl_sf_debye_5", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_5, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_5 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_5 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_5_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_5_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_5_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_5_E undefined error ("GSL function gsl_sf_debye_5_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_5_E } // PKG_ADD: autoload ("gsl_sf_debye_6", which ("gsl_sf")); DEFUN_DLD(gsl_sf_debye_6, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_debye_6 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_debye_6 (@dots{})\n\ \n\ The Debye functions are defined by the integral\n\ \n\ D_n(x) = n/x^n \\int_0^x dt (t^n/(e^t - 1)).\n\ \n\ For further information see Abramowitz & Stegun, Section 27.1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DEBYE_6_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_6_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_debye_6_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DEBYE_6_E undefined error ("GSL function gsl_sf_debye_6_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DEBYE_6_E } // PKG_ADD: autoload ("gsl_sf_dilog", which ("gsl_sf")); DEFUN_DLD(gsl_sf_dilog, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_dilog (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_dilog (@dots{})\n\ \n\ Computes the dilogarithm for a real argument.\n\ In Lewin’s notation this is Li_2(x), the real part of the\n\ dilogarithm of a real x. It is defined by the integral\n\ representation\n\ \n\ Li_2(x) = - \\Re \\int_0^x ds \\log(1-s) / s.\n\ \n\ Note that \\Im(Li_2(x)) = 0 for x <= 1, and -\\pi\\log(x)\n\ for x > 1.\n\ \n\ Note that Abramowitz & Stegun refer to the Spence integral\n\ S(x)=Li_2(1-x) as the dilogarithm rather than Li_2(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DILOG_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dilog_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_dilog_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DILOG_E undefined error ("GSL function gsl_sf_dilog_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DILOG_E } // PKG_ADD: autoload ("gsl_sf_erf", which ("gsl_sf")); DEFUN_DLD(gsl_sf_erf, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_erf (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_erf (@dots{})\n\ \n\ Computes the error function\n\ erf(x) = (2/\\sqrt(\\pi)) \\int_0^x dt \\exp(-t^2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_E undefined error ("GSL function gsl_sf_erf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_E } // PKG_ADD: autoload ("erf_gsl", which ("gsl_sf")); DEFUN_DLD(erf_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} erf_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} erf_gsl (@dots{})\n\ \n\ Computes the error function\n\ erf(x) = (2/\\sqrt(\\pi)) \\int_0^x dt \\exp(-t^2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_E undefined error ("GSL function gsl_sf_erf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_E } // PKG_ADD: autoload ("gsl_sf_erfc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_erfc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_erfc (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_erfc (@dots{})\n\ \n\ Computes the complementary error function\n\ erfc(x) = 1 - erf(x) = (2/\\sqrt(\\pi)) \\int_x^\\infty \\exp(-t^2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERFC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERFC_E undefined error ("GSL function gsl_sf_erfc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERFC_E } // PKG_ADD: autoload ("erfc_gsl", which ("gsl_sf")); DEFUN_DLD(erfc_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} erfc_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} erfc_gsl (@dots{})\n\ \n\ Computes the complementary error function\n\ erfc(x) = 1 - erf(x) = (2/\\sqrt(\\pi)) \\int_x^\\infty \\exp(-t^2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERFC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERFC_E undefined error ("GSL function gsl_sf_erfc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERFC_E } // PKG_ADD: autoload ("gsl_sf_log_erfc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_log_erfc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_log_erfc (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_log_erfc (@dots{})\n\ \n\ Computes the logarithm of the complementary error\n\ function \\log(\\erfc(x)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_ERFC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_ERFC_E undefined error ("GSL function gsl_sf_log_erfc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_ERFC_E } // PKG_ADD: autoload ("log_erfc", which ("gsl_sf")); DEFUN_DLD(log_erfc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} log_erfc (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} log_erfc (@dots{})\n\ \n\ Computes the logarithm of the complementary error\n\ function \\log(\\erfc(x)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_ERFC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_erfc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_ERFC_E undefined error ("GSL function gsl_sf_log_erfc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_ERFC_E } // PKG_ADD: autoload ("gsl_sf_erf_Z", which ("gsl_sf")); DEFUN_DLD(gsl_sf_erf_Z, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_erf_Z (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_erf_Z (@dots{})\n\ \n\ Computes the Gaussian probability function\n\ Z(x) = (1/(2\\pi)) \\exp(-x^2/2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_Z_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Z_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Z_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_Z_E undefined error ("GSL function gsl_sf_erf_Z_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_Z_E } // PKG_ADD: autoload ("erf_Z", which ("gsl_sf")); DEFUN_DLD(erf_Z, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} erf_Z (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} erf_Z (@dots{})\n\ \n\ Computes the Gaussian probability function\n\ Z(x) = (1/(2\\pi)) \\exp(-x^2/2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_Z_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Z_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Z_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_Z_E undefined error ("GSL function gsl_sf_erf_Z_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_Z_E } // PKG_ADD: autoload ("gsl_sf_erf_Q", which ("gsl_sf")); DEFUN_DLD(gsl_sf_erf_Q, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_erf_Q (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_erf_Q (@dots{})\n\ \n\ Computes the upper tail of the Gaussian probability\n\ function Q(x) = (1/(2\\pi)) \\int_x^\\infty dt \\exp(-t^2/2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_Q_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Q_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Q_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_Q_E undefined error ("GSL function gsl_sf_erf_Q_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_Q_E } // PKG_ADD: autoload ("erf_Q", which ("gsl_sf")); DEFUN_DLD(erf_Q, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} erf_Q (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} erf_Q (@dots{})\n\ \n\ Computes the upper tail of the Gaussian probability\n\ function Q(x) = (1/(2\\pi)) \\int_x^\\infty dt \\exp(-t^2/2).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ERF_Q_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Q_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_erf_Q_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ERF_Q_E undefined error ("GSL function gsl_sf_erf_Q_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ERF_Q_E } // PKG_ADD: autoload ("gsl_sf_hazard", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hazard, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hazard (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hazard (@dots{})\n\ \n\ The hazard function for the normal distrbution, also known as the\n\ inverse Mill\\'s ratio, is defined as\n\ h(x) = Z(x)/Q(x) = \\sqrt@{2/\\pi \\exp(-x^2 / 2) / \\erfc(x/\\sqrt 2)@}.\n\ It decreases rapidly as x approaches -\\infty and asymptotes to\n\ h(x) \\sim x as x approaches +\\infty.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HAZARD_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_hazard_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_hazard_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HAZARD_E undefined error ("GSL function gsl_sf_hazard_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HAZARD_E } // PKG_ADD: autoload ("hazard", which ("gsl_sf")); DEFUN_DLD(hazard, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hazard (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hazard (@dots{})\n\ \n\ The hazard function for the normal distrbution, also known as the\n\ inverse Mill\\'s ratio, is defined as\n\ h(x) = Z(x)/Q(x) = \\sqrt@{2/\\pi \\exp(-x^2 / 2) / \\erfc(x/\\sqrt 2)@}.\n\ It decreases rapidly as x approaches -\\infty and asymptotes to\n\ h(x) \\sim x as x approaches +\\infty.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HAZARD_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_hazard_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_hazard_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HAZARD_E undefined error ("GSL function gsl_sf_hazard_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HAZARD_E } // PKG_ADD: autoload ("gsl_sf_expm1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_expm1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_expm1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_expm1 (@dots{})\n\ \n\ Computes the quantity \\exp(x)-1 using an algorithm that\n\ is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPM1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expm1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expm1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPM1_E undefined error ("GSL function gsl_sf_expm1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPM1_E } // PKG_ADD: autoload ("expm1", which ("gsl_sf")); DEFUN_DLD(expm1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} expm1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} expm1 (@dots{})\n\ \n\ Computes the quantity \\exp(x)-1 using an algorithm that\n\ is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPM1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expm1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expm1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPM1_E undefined error ("GSL function gsl_sf_expm1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPM1_E } // PKG_ADD: autoload ("gsl_sf_exprel", which ("gsl_sf")); DEFUN_DLD(gsl_sf_exprel, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_exprel (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_exprel (@dots{})\n\ \n\ Computes the quantity (\\exp(x)-1)/x using an algorithm\n\ that is accurate for small x. For small x the algorithm is based on\n\ the expansion (\\exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + \\dots.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_E undefined error ("GSL function gsl_sf_exprel_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_E } // PKG_ADD: autoload ("exprel", which ("gsl_sf")); DEFUN_DLD(exprel, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} exprel (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} exprel (@dots{})\n\ \n\ Computes the quantity (\\exp(x)-1)/x using an algorithm\n\ that is accurate for small x. For small x the algorithm is based on\n\ the expansion (\\exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + \\dots.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_E undefined error ("GSL function gsl_sf_exprel_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_E } // PKG_ADD: autoload ("gsl_sf_exprel_2", which ("gsl_sf")); DEFUN_DLD(gsl_sf_exprel_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_exprel_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_exprel_2 (@dots{})\n\ \n\ Computes the quantity 2(\\exp(x)-1-x)/x^2 using an\n\ algorithm that is accurate for small x. For small x the algorithm is\n\ based on the expansion\n\ 2(\\exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + \\dots.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_2_E undefined error ("GSL function gsl_sf_exprel_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_2_E } // PKG_ADD: autoload ("exprel_2", which ("gsl_sf")); DEFUN_DLD(exprel_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} exprel_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} exprel_2 (@dots{})\n\ \n\ Computes the quantity 2(\\exp(x)-1-x)/x^2 using an\n\ algorithm that is accurate for small x. For small x the algorithm is\n\ based on the expansion\n\ 2(\\exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + \\dots.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_exprel_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_2_E undefined error ("GSL function gsl_sf_exprel_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_2_E } // PKG_ADD: autoload ("gsl_sf_expint_E1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_expint_E1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_expint_E1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_expint_E1 (@dots{})\n\ \n\ Computes the exponential integral E_1(x),\n\ \n\ E_1(x) := Re \\int_1^\\infty dt \\exp(-xt)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_E1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_E1_E undefined error ("GSL function gsl_sf_expint_E1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_E1_E } // PKG_ADD: autoload ("expint_E1", which ("gsl_sf")); DEFUN_DLD(expint_E1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} expint_E1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} expint_E1 (@dots{})\n\ \n\ Computes the exponential integral E_1(x),\n\ \n\ E_1(x) := Re \\int_1^\\infty dt \\exp(-xt)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_E1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_E1_E undefined error ("GSL function gsl_sf_expint_E1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_E1_E } // PKG_ADD: autoload ("gsl_sf_expint_E2", which ("gsl_sf")); DEFUN_DLD(gsl_sf_expint_E2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_expint_E2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_expint_E2 (@dots{})\n\ \n\ Computes the second-order exponential integral E_2(x),\n\ \n\ E_2(x) := \\Re \\int_1^\\infty dt \\exp(-xt)/t^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_E2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_E2_E undefined error ("GSL function gsl_sf_expint_E2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_E2_E } // PKG_ADD: autoload ("expint_E2", which ("gsl_sf")); DEFUN_DLD(expint_E2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} expint_E2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} expint_E2 (@dots{})\n\ \n\ Computes the second-order exponential integral E_2(x),\n\ \n\ E_2(x) := \\Re \\int_1^\\infty dt \\exp(-xt)/t^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_E2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_E2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_E2_E undefined error ("GSL function gsl_sf_expint_E2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_E2_E } // PKG_ADD: autoload ("gsl_sf_expint_Ei", which ("gsl_sf")); DEFUN_DLD(gsl_sf_expint_Ei, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_expint_Ei (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_expint_Ei (@dots{})\n\ \n\ Computes the exponential integral E_i(x),\n\ \n\ Ei(x) := - PV(\\int_@{-x@}^\\infty dt \\exp(-t)/t)\n\ \n\ where PV denotes the principal value of the integral.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_EI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_Ei_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_Ei_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_EI_E undefined error ("GSL function gsl_sf_expint_Ei_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_EI_E } // PKG_ADD: autoload ("expint_Ei", which ("gsl_sf")); DEFUN_DLD(expint_Ei, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} expint_Ei (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} expint_Ei (@dots{})\n\ \n\ Computes the exponential integral E_i(x),\n\ \n\ Ei(x) := - PV(\\int_@{-x@}^\\infty dt \\exp(-t)/t)\n\ \n\ where PV denotes the principal value of the integral.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_EI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_Ei_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_Ei_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_EI_E undefined error ("GSL function gsl_sf_expint_Ei_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_EI_E } // PKG_ADD: autoload ("gsl_sf_Shi", which ("gsl_sf")); DEFUN_DLD(gsl_sf_Shi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_Shi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_Shi (@dots{})\n\ \n\ Computes the integral Shi(x) = \\int_0^x dt \\sinh(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SHI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Shi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Shi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SHI_E undefined error ("GSL function gsl_sf_Shi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SHI_E } // PKG_ADD: autoload ("Shi", which ("gsl_sf")); DEFUN_DLD(Shi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} Shi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} Shi (@dots{})\n\ \n\ Computes the integral Shi(x) = \\int_0^x dt \\sinh(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SHI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Shi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Shi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SHI_E undefined error ("GSL function gsl_sf_Shi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SHI_E } // PKG_ADD: autoload ("gsl_sf_Chi", which ("gsl_sf")); DEFUN_DLD(gsl_sf_Chi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_Chi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_Chi (@dots{})\n\ \n\ Computes the integral \n\ \n\ Chi(x) := Re[ \\gamma_E + \\log(x) + \\int_0^x dt (\\cosh[t]-1)/t] ,\n\ \n\ where \\gamma_E is the Euler constant.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CHI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Chi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Chi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CHI_E undefined error ("GSL function gsl_sf_Chi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CHI_E } // PKG_ADD: autoload ("Chi", which ("gsl_sf")); DEFUN_DLD(Chi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} Chi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} Chi (@dots{})\n\ \n\ Computes the integral \n\ \n\ Chi(x) := Re[ \\gamma_E + \\log(x) + \\int_0^x dt (\\cosh[t]-1)/t] ,\n\ \n\ where \\gamma_E is the Euler constant.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CHI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Chi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Chi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CHI_E undefined error ("GSL function gsl_sf_Chi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CHI_E } // PKG_ADD: autoload ("gsl_sf_expint_3", which ("gsl_sf")); DEFUN_DLD(gsl_sf_expint_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_expint_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_expint_3 (@dots{})\n\ \n\ Computes the exponential integral\n\ Ei_3(x) = \\int_0^x dt \\exp(-t^3) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_3_E undefined error ("GSL function gsl_sf_expint_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_3_E } // PKG_ADD: autoload ("expint_3", which ("gsl_sf")); DEFUN_DLD(expint_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} expint_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} expint_3 (@dots{})\n\ \n\ Computes the exponential integral\n\ Ei_3(x) = \\int_0^x dt \\exp(-t^3) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPINT_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_expint_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPINT_3_E undefined error ("GSL function gsl_sf_expint_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPINT_3_E } // PKG_ADD: autoload ("gsl_sf_Si", which ("gsl_sf")); DEFUN_DLD(gsl_sf_Si, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_Si (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_Si (@dots{})\n\ \n\ Computes the Sine integral Si(x) = \\int_0^x dt \\sin(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Si_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Si_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SI_E undefined error ("GSL function gsl_sf_Si_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SI_E } // PKG_ADD: autoload ("Si", which ("gsl_sf")); DEFUN_DLD(Si, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} Si (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} Si (@dots{})\n\ \n\ Computes the Sine integral Si(x) = \\int_0^x dt \\sin(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Si_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Si_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SI_E undefined error ("GSL function gsl_sf_Si_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SI_E } // PKG_ADD: autoload ("gsl_sf_Ci", which ("gsl_sf")); DEFUN_DLD(gsl_sf_Ci, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_Ci (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_Ci (@dots{})\n\ \n\ Computes the Cosine integral\n\ Ci(x) = -\\int_x^\\infty dt \\cos(t)/t for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Ci_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Ci_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CI_E undefined error ("GSL function gsl_sf_Ci_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CI_E } // PKG_ADD: autoload ("Ci", which ("gsl_sf")); DEFUN_DLD(Ci, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} Ci (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} Ci (@dots{})\n\ \n\ Computes the Cosine integral\n\ Ci(x) = -\\int_x^\\infty dt \\cos(t)/t for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Ci_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_Ci_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CI_E undefined error ("GSL function gsl_sf_Ci_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CI_E } // PKG_ADD: autoload ("gsl_sf_atanint", which ("gsl_sf")); DEFUN_DLD(gsl_sf_atanint, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_atanint (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_atanint (@dots{})\n\ \n\ Computes the Arctangent integral\n\ AtanInt(x) = \\int_0^x dt \\arctan(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ATANINT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_atanint_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_atanint_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ATANINT_E undefined error ("GSL function gsl_sf_atanint_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ATANINT_E } // PKG_ADD: autoload ("atanint", which ("gsl_sf")); DEFUN_DLD(atanint, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} atanint (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} atanint (@dots{})\n\ \n\ Computes the Arctangent integral\n\ AtanInt(x) = \\int_0^x dt \\arctan(t)/t.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ATANINT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_atanint_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_atanint_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ATANINT_E undefined error ("GSL function gsl_sf_atanint_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ATANINT_E } // PKG_ADD: autoload ("gsl_sf_fermi_dirac_mhalf", which ("gsl_sf")); DEFUN_DLD(gsl_sf_fermi_dirac_mhalf, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_fermi_dirac_mhalf (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_fermi_dirac_mhalf (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{-1/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_MHALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_mhalf_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_mhalf_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_MHALF_E undefined error ("GSL function gsl_sf_fermi_dirac_mhalf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_MHALF_E } // PKG_ADD: autoload ("fermi_dirac_mhalf", which ("gsl_sf")); DEFUN_DLD(fermi_dirac_mhalf, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} fermi_dirac_mhalf (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} fermi_dirac_mhalf (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{-1/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_MHALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_mhalf_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_mhalf_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_MHALF_E undefined error ("GSL function gsl_sf_fermi_dirac_mhalf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_MHALF_E } // PKG_ADD: autoload ("gsl_sf_fermi_dirac_half", which ("gsl_sf")); DEFUN_DLD(gsl_sf_fermi_dirac_half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_fermi_dirac_half (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_fermi_dirac_half (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{1/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_half_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_half_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_HALF_E undefined error ("GSL function gsl_sf_fermi_dirac_half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_HALF_E } // PKG_ADD: autoload ("fermi_dirac_half", which ("gsl_sf")); DEFUN_DLD(fermi_dirac_half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} fermi_dirac_half (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} fermi_dirac_half (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{1/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_half_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_half_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_HALF_E undefined error ("GSL function gsl_sf_fermi_dirac_half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_HALF_E } // PKG_ADD: autoload ("gsm_sf_fermi_dirac_3half", which ("gsl_sf")); DEFUN_DLD(gsm_sf_fermi_dirac_3half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsm_sf_fermi_dirac_3half (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsm_sf_fermi_dirac_3half (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{3/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_3HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_3half_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_3half_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_3HALF_E undefined error ("GSL function gsl_sf_fermi_dirac_3half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_3HALF_E } // PKG_ADD: autoload ("fermi_dirac_3half", which ("gsl_sf")); DEFUN_DLD(fermi_dirac_3half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} fermi_dirac_3half (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} fermi_dirac_3half (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral F_@{3/2@}(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_3HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_3half_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_fermi_dirac_3half_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_3HALF_E undefined error ("GSL function gsl_sf_fermi_dirac_3half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_3HALF_E } // PKG_ADD: autoload ("gsl_sf_gamma", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gamma, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gamma (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gamma (@dots{})\n\ \n\ Computes the Gamma function \\Gamma(x), subject to x not\n\ being a negative integer. The function is computed using the real\n\ Lanczos method. The maximum value of x such that \\Gamma(x) is not\n\ considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gamma_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gamma_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_E undefined error ("GSL function gsl_sf_gamma_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_E } // PKG_ADD: autoload ("gamma_gsl", which ("gsl_sf")); DEFUN_DLD(gamma_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gamma_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gamma_gsl (@dots{})\n\ \n\ Computes the Gamma function \\Gamma(x), subject to x not\n\ being a negative integer. The function is computed using the real\n\ Lanczos method. The maximum value of x such that \\Gamma(x) is not\n\ considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gamma_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gamma_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_E undefined error ("GSL function gsl_sf_gamma_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_E } // PKG_ADD: autoload ("gsl_sf_lngamma", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lngamma, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lngamma (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lngamma (@dots{})\n\ \n\ Computes the logarithm of the Gamma function,\n\ \\log(\\Gamma(x)), subject to x not a being negative integer.\n\ For x<0 the real part of \\log(\\Gamma(x)) is returned, which is\n\ equivalent to \\log(|\\Gamma(x)|). The function is computed using\n\ the real Lanczos method.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNGAMMA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lngamma_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lngamma_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNGAMMA_E undefined error ("GSL function gsl_sf_lngamma_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNGAMMA_E } // PKG_ADD: autoload ("lngamma_gsl", which ("gsl_sf")); DEFUN_DLD(lngamma_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lngamma_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lngamma_gsl (@dots{})\n\ \n\ Computes the logarithm of the Gamma function,\n\ \\log(\\Gamma(x)), subject to x not a being negative integer.\n\ For x<0 the real part of \\log(\\Gamma(x)) is returned, which is\n\ equivalent to \\log(|\\Gamma(x)|). The function is computed using\n\ the real Lanczos method.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNGAMMA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lngamma_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lngamma_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNGAMMA_E undefined error ("GSL function gsl_sf_lngamma_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNGAMMA_E } // PKG_ADD: autoload ("gsl_sf_gammastar", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gammastar, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gammastar (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gammastar (@dots{})\n\ \n\ Computes the regulated Gamma Function \\Gamma^*(x)\n\ for x > 0. The regulated gamma function is given by,\n\ \n\ \\Gamma^*(x) = \\Gamma(x)/(\\sqrt@{2\\pi@} x^@{(x-1/2)@} \\exp(-x))\n\ = (1 + (1/12x) + ...) for x \\to \\infty\n\ \n\ and is a useful suggestion of Temme.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMASTAR_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammastar_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammastar_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMASTAR_E undefined error ("GSL function gsl_sf_gammastar_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMASTAR_E } // PKG_ADD: autoload ("gammastar", which ("gsl_sf")); DEFUN_DLD(gammastar, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gammastar (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gammastar (@dots{})\n\ \n\ Computes the regulated Gamma Function \\Gamma^*(x)\n\ for x > 0. The regulated gamma function is given by,\n\ \n\ \\Gamma^*(x) = \\Gamma(x)/(\\sqrt@{2\\pi@} x^@{(x-1/2)@} \\exp(-x))\n\ = (1 + (1/12x) + ...) for x \\to \\infty\n\ \n\ and is a useful suggestion of Temme.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMASTAR_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammastar_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammastar_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMASTAR_E undefined error ("GSL function gsl_sf_gammastar_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMASTAR_E } // PKG_ADD: autoload ("gsl_sf_gammainv", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gammainv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gammainv (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gammainv (@dots{})\n\ \n\ Computes the reciprocal of the gamma function, 1/\\Gamma(x) using the real Lanczos method.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMAINV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammainv_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammainv_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMAINV_E undefined error ("GSL function gsl_sf_gammainv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMAINV_E } // PKG_ADD: autoload ("gammainv_gsl", which ("gsl_sf")); DEFUN_DLD(gammainv_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gammainv_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gammainv_gsl (@dots{})\n\ \n\ Computes the reciprocal of the gamma function, 1/\\Gamma(x) using the real Lanczos method.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMAINV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammainv_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_gammainv_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMAINV_E undefined error ("GSL function gsl_sf_gammainv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMAINV_E } // PKG_ADD: autoload ("gsl_sf_lambert_W0", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lambert_W0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lambert_W0 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lambert_W0 (@dots{})\n\ \n\ These compute the principal branch of the Lambert W function, W_0(x).\n\ \n\ Lambert\\'s W functions, W(x), are defined to be solutions of the\n\ export octave_name=gammastar\n\ export funcname=gsl_sf_gammastar_e\n\ equation W(x) \\exp(W(x)) = x. This function has multiple branches\n\ for x < 0; however, it has only two real-valued branches.\n\ We define W_0(x) to be the principal branch, where W > -1 for x < 0,\n\ and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LAMBERT_W0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_W0_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_W0_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LAMBERT_W0_E undefined error ("GSL function gsl_sf_lambert_W0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LAMBERT_W0_E } // PKG_ADD: autoload ("lambert_W0", which ("gsl_sf")); DEFUN_DLD(lambert_W0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lambert_W0 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lambert_W0 (@dots{})\n\ \n\ These compute the principal branch of the Lambert W function, W_0(x).\n\ \n\ Lambert\\'s W functions, W(x), are defined to be solutions of the\n\ export octave_name=gammastar\n\ export funcname=gsl_sf_gammastar_e\n\ equation W(x) \\exp(W(x)) = x. This function has multiple branches\n\ for x < 0; however, it has only two real-valued branches.\n\ We define W_0(x) to be the principal branch, where W > -1 for x < 0,\n\ and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LAMBERT_W0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_W0_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_W0_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LAMBERT_W0_E undefined error ("GSL function gsl_sf_lambert_W0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LAMBERT_W0_E } // PKG_ADD: autoload ("gsl_sf_lambert_Wm1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lambert_Wm1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lambert_Wm1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lambert_Wm1 (@dots{})\n\ \n\ These compute the secondary real-valued branch of the Lambert\n\ W function, W_@{-1@}(x).\n\ \n\ Lambert\\'s W functions, W(x), are defined to be solutions of the\n\ equation W(x) \\exp(W(x)) = x. This function has multiple branches\n\ for x < 0; however, it has only two real-valued branches.\n\ We define W_0(x) to be the principal branch, where W > -1 for x < 0,\n\ and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LAMBERT_WM1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_Wm1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_Wm1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LAMBERT_WM1_E undefined error ("GSL function gsl_sf_lambert_Wm1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LAMBERT_WM1_E } // PKG_ADD: autoload ("lambert_Wm1", which ("gsl_sf")); DEFUN_DLD(lambert_Wm1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lambert_Wm1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lambert_Wm1 (@dots{})\n\ \n\ These compute the secondary real-valued branch of the Lambert\n\ W function, W_@{-1@}(x).\n\ \n\ Lambert\\'s W functions, W(x), are defined to be solutions of the\n\ equation W(x) \\exp(W(x)) = x. This function has multiple branches\n\ for x < 0; however, it has only two real-valued branches.\n\ We define W_0(x) to be the principal branch, where W > -1 for x < 0,\n\ and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LAMBERT_WM1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_Wm1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lambert_Wm1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LAMBERT_WM1_E undefined error ("GSL function gsl_sf_lambert_Wm1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LAMBERT_WM1_E } // PKG_ADD: autoload ("gsl_sf_log_1plusx", which ("gsl_sf")); DEFUN_DLD(gsl_sf_log_1plusx, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_log_1plusx (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_log_1plusx (@dots{})\n\ \n\ Computes \\log(1 + x) for x > -1 using an algorithm that\n\ is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_1PLUSX_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_1PLUSX_E undefined error ("GSL function gsl_sf_log_1plusx_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_1PLUSX_E } // PKG_ADD: autoload ("log_1plusx", which ("gsl_sf")); DEFUN_DLD(log_1plusx, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} log_1plusx (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} log_1plusx (@dots{})\n\ \n\ Computes \\log(1 + x) for x > -1 using an algorithm that\n\ is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_1PLUSX_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_1PLUSX_E undefined error ("GSL function gsl_sf_log_1plusx_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_1PLUSX_E } // PKG_ADD: autoload ("gsl_sf_log_1plusx_mx", which ("gsl_sf")); DEFUN_DLD(gsl_sf_log_1plusx_mx, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_log_1plusx_mx (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_log_1plusx_mx (@dots{})\n\ \n\ Computes \\log(1 + x) - x for x > -1 using an algorithm\n\ that is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_1PLUSX_MX_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_mx_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_mx_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_1PLUSX_MX_E undefined error ("GSL function gsl_sf_log_1plusx_mx_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_1PLUSX_MX_E } // PKG_ADD: autoload ("log_1plusx_mx", which ("gsl_sf")); DEFUN_DLD(log_1plusx_mx, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} log_1plusx_mx (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} log_1plusx_mx (@dots{})\n\ \n\ Computes \\log(1 + x) - x for x > -1 using an algorithm\n\ that is accurate for small x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LOG_1PLUSX_MX_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_mx_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_log_1plusx_mx_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LOG_1PLUSX_MX_E undefined error ("GSL function gsl_sf_log_1plusx_mx_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LOG_1PLUSX_MX_E } // PKG_ADD: autoload ("gsl_sf_psi", which ("gsl_sf")); DEFUN_DLD(gsl_sf_psi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_psi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_psi (@dots{})\n\ \n\ Computes the digamma function \\psi(x) for general x,\n\ x \\ne 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_E undefined error ("GSL function gsl_sf_psi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_E } // PKG_ADD: autoload ("psi", which ("gsl_sf")); DEFUN_DLD(psi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} psi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} psi (@dots{})\n\ \n\ Computes the digamma function \\psi(x) for general x,\n\ x \\ne 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_E undefined error ("GSL function gsl_sf_psi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_E } // PKG_ADD: autoload ("gsl_sf_psi_1piy", which ("gsl_sf")); DEFUN_DLD(gsl_sf_psi_1piy, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_psi_1piy (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_psi_1piy (@dots{})\n\ \n\ Computes the real part of the digamma function on\n\ the line 1+i y, Re[\\psi(1 + i y)].\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_1PIY_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_1piy_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_1piy_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_1PIY_E undefined error ("GSL function gsl_sf_psi_1piy_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_1PIY_E } // PKG_ADD: autoload ("psi_1piy", which ("gsl_sf")); DEFUN_DLD(psi_1piy, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} psi_1piy (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} psi_1piy (@dots{})\n\ \n\ Computes the real part of the digamma function on\n\ the line 1+i y, Re[\\psi(1 + i y)].\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_1PIY_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_1piy_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_psi_1piy_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_1PIY_E undefined error ("GSL function gsl_sf_psi_1piy_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_1PIY_E } // PKG_ADD: autoload ("gsl_sf_synchrotron_1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_synchrotron_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_synchrotron_1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_synchrotron_1 (@dots{})\n\ \n\ Computes the first synchrotron function\n\ x \\int_x^\\infty dt K_@{5/3@}(t) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SYNCHROTRON_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SYNCHROTRON_1_E undefined error ("GSL function gsl_sf_synchrotron_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SYNCHROTRON_1_E } // PKG_ADD: autoload ("synchrotron_1", which ("gsl_sf")); DEFUN_DLD(synchrotron_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} synchrotron_1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} synchrotron_1 (@dots{})\n\ \n\ Computes the first synchrotron function\n\ x \\int_x^\\infty dt K_@{5/3@}(t) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SYNCHROTRON_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SYNCHROTRON_1_E undefined error ("GSL function gsl_sf_synchrotron_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SYNCHROTRON_1_E } // PKG_ADD: autoload ("gsl_sf_synchrotron_2", which ("gsl_sf")); DEFUN_DLD(gsl_sf_synchrotron_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_synchrotron_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_synchrotron_2 (@dots{})\n\ \n\ Computes the second synchrotron function\n\ x K_@{2/3@}(x) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SYNCHROTRON_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SYNCHROTRON_2_E undefined error ("GSL function gsl_sf_synchrotron_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SYNCHROTRON_2_E } // PKG_ADD: autoload ("synchrotron_2", which ("gsl_sf")); DEFUN_DLD(synchrotron_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} synchrotron_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} synchrotron_2 (@dots{})\n\ \n\ Computes the second synchrotron function\n\ x K_@{2/3@}(x) for x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SYNCHROTRON_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_synchrotron_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SYNCHROTRON_2_E undefined error ("GSL function gsl_sf_synchrotron_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SYNCHROTRON_2_E } // PKG_ADD: autoload ("gsl_sf_transport_2", which ("gsl_sf")); DEFUN_DLD(gsl_sf_transport_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_transport_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_transport_2 (@dots{})\n\ \n\ Computes the transport function J(2,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_2_E undefined error ("GSL function gsl_sf_transport_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_2_E } // PKG_ADD: autoload ("transport_2", which ("gsl_sf")); DEFUN_DLD(transport_2, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} transport_2 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} transport_2 (@dots{})\n\ \n\ Computes the transport function J(2,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_2_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_2_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_2_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_2_E undefined error ("GSL function gsl_sf_transport_2_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_2_E } // PKG_ADD: autoload ("gsl_sf_transport_3", which ("gsl_sf")); DEFUN_DLD(gsl_sf_transport_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_transport_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_transport_3 (@dots{})\n\ \n\ Computes the transport function J(3,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_3_E undefined error ("GSL function gsl_sf_transport_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_3_E } // PKG_ADD: autoload ("transport_3", which ("gsl_sf")); DEFUN_DLD(transport_3, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} transport_3 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} transport_3 (@dots{})\n\ \n\ Computes the transport function J(3,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_3_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_3_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_3_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_3_E undefined error ("GSL function gsl_sf_transport_3_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_3_E } // PKG_ADD: autoload ("gsl_sf_transport_4", which ("gsl_sf")); DEFUN_DLD(gsl_sf_transport_4, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_transport_4 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_transport_4 (@dots{})\n\ \n\ Computes the transport function J(4,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_4_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_4_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_4_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_4_E undefined error ("GSL function gsl_sf_transport_4_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_4_E } // PKG_ADD: autoload ("transport_4", which ("gsl_sf")); DEFUN_DLD(transport_4, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} transport_4 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} transport_4 (@dots{})\n\ \n\ Computes the transport function J(4,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_4_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_4_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_4_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_4_E undefined error ("GSL function gsl_sf_transport_4_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_4_E } // PKG_ADD: autoload ("gsl_sf_transport_5", which ("gsl_sf")); DEFUN_DLD(gsl_sf_transport_5, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_transport_5 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_transport_5 (@dots{})\n\ \n\ Computes the transport function J(5,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_5_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_5_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_5_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_5_E undefined error ("GSL function gsl_sf_transport_5_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_5_E } // PKG_ADD: autoload ("transport_5", which ("gsl_sf")); DEFUN_DLD(transport_5, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} transport_5 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} transport_5 (@dots{})\n\ \n\ Computes the transport function J(5,x).\n\ \n\ The transport functions J(n,x) are defined by the integral\n\ representations J(n,x) := \\int_0^x dt t^n e^t /(e^t - 1)^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TRANSPORT_5_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_5_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_transport_5_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TRANSPORT_5_E undefined error ("GSL function gsl_sf_transport_5_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TRANSPORT_5_E } // PKG_ADD: autoload ("gsl_sf_sinc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_sinc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_sinc (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_sinc (@dots{})\n\ \n\ Computes \\sinc(x) = \\sin(\\pi x) / (\\pi x) for any value of x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SINC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_sinc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_sinc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SINC_E undefined error ("GSL function gsl_sf_sinc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SINC_E } // PKG_ADD: autoload ("sinc_gsl", which ("gsl_sf")); DEFUN_DLD(sinc_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} sinc_gsl (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} sinc_gsl (@dots{})\n\ \n\ Computes \\sinc(x) = \\sin(\\pi x) / (\\pi x) for any value of x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_SINC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_sinc_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_sinc_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_SINC_E undefined error ("GSL function gsl_sf_sinc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_SINC_E } // PKG_ADD: autoload ("gsl_sf_lnsinh", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lnsinh, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lnsinh (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lnsinh (@dots{})\n\ \n\ Computes \\log(\\sinh(x)) for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNSINH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lnsinh_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lnsinh_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNSINH_E undefined error ("GSL function gsl_sf_lnsinh_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNSINH_E } // PKG_ADD: autoload ("lnsinh", which ("gsl_sf")); DEFUN_DLD(lnsinh, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lnsinh (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lnsinh (@dots{})\n\ \n\ Computes \\log(\\sinh(x)) for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNSINH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lnsinh_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lnsinh_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNSINH_E undefined error ("GSL function gsl_sf_lnsinh_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNSINH_E } // PKG_ADD: autoload ("gsl_sf_lncosh", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lncosh, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lncosh (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lncosh (@dots{})\n\ \n\ Computes \\log(\\cosh(x)) for any x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNCOSH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lncosh_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lncosh_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNCOSH_E undefined error ("GSL function gsl_sf_lncosh_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNCOSH_E } // PKG_ADD: autoload ("lncosh", which ("gsl_sf")); DEFUN_DLD(lncosh, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lncosh (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lncosh (@dots{})\n\ \n\ Computes \\log(\\cosh(x)) for any x.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNCOSH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lncosh_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_lncosh_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNCOSH_E undefined error ("GSL function gsl_sf_lncosh_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNCOSH_E } // PKG_ADD: autoload ("gsl_sf_bessel_Jn", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Jn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Jn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Jn (@dots{})\n\ \n\ Computes the regular cylindrical Bessel function of\n\ order n, J_n(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Jn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Jn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JN_E undefined error ("GSL function gsl_sf_bessel_Jn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JN_E } // PKG_ADD: autoload ("bessel_Jn", which ("gsl_sf")); DEFUN_DLD(bessel_Jn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Jn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Jn (@dots{})\n\ \n\ Computes the regular cylindrical Bessel function of\n\ order n, J_n(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Jn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Jn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JN_E undefined error ("GSL function gsl_sf_bessel_Jn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JN_E } // PKG_ADD: autoload ("gsl_sf_bessel_Yn", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Yn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Yn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Yn (@dots{})\n\ \n\ Computes the irregular cylindrical Bessel function of\n\ order n, Y_n(x), for x>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Yn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Yn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YN_E undefined error ("GSL function gsl_sf_bessel_Yn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YN_E } // PKG_ADD: autoload ("bessel_Yn", which ("gsl_sf")); DEFUN_DLD(bessel_Yn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Yn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Yn (@dots{})\n\ \n\ Computes the irregular cylindrical Bessel function of\n\ order n, Y_n(x), for x>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Yn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Yn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YN_E undefined error ("GSL function gsl_sf_bessel_Yn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YN_E } // PKG_ADD: autoload ("gsl_sf_bessel_In", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_In, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_In (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_In (@dots{})\n\ \n\ Computes the regular modified cylindrical Bessel\n\ function of order n, I_n(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IN_E undefined error ("GSL function gsl_sf_bessel_In_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_E } // PKG_ADD: autoload ("bessel_In", which ("gsl_sf")); DEFUN_DLD(bessel_In, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_In (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_In (@dots{})\n\ \n\ Computes the regular modified cylindrical Bessel\n\ function of order n, I_n(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IN_E undefined error ("GSL function gsl_sf_bessel_In_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_E } // PKG_ADD: autoload ("gsl_sf_bessel_In_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_In_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_In_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_In_scaled (@dots{})\n\ \n\ Computes the scaled regular modified cylindrical Bessel\n\ function of order n, \\exp(-|x|) I_n(x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IN_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IN_SCALED_E undefined error ("GSL function gsl_sf_bessel_In_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_SCALED_E } // PKG_ADD: autoload ("bessel_In_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_In_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_In_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_In_scaled (@dots{})\n\ \n\ Computes the scaled regular modified cylindrical Bessel\n\ function of order n, \\exp(-|x|) I_n(x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IN_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_In_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IN_SCALED_E undefined error ("GSL function gsl_sf_bessel_In_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_SCALED_E } // PKG_ADD: autoload ("gsl_sf_bessel_Kn", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Kn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Kn (@dots{})\n\ \n\ Computes the irregular modified cylindrical Bessel\n\ function of order n, K_n(x), for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KN_E undefined error ("GSL function gsl_sf_bessel_Kn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_E } // PKG_ADD: autoload ("bessel_Kn", which ("gsl_sf")); DEFUN_DLD(bessel_Kn, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Kn (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Kn (@dots{})\n\ \n\ Computes the irregular modified cylindrical Bessel\n\ function of order n, K_n(x), for x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KN_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KN_E undefined error ("GSL function gsl_sf_bessel_Kn_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_E } // PKG_ADD: autoload ("gsl_sf_bessel_Kn_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Kn_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Kn_scaled (@dots{})\n\ \n\ \n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KN_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KN_SCALED_E undefined error ("GSL function gsl_sf_bessel_Kn_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_SCALED_E } // PKG_ADD: autoload ("bessel_Kn_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_Kn_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Kn_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Kn_scaled (@dots{})\n\ \n\ \n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KN_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_Kn_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KN_SCALED_E undefined error ("GSL function gsl_sf_bessel_Kn_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_SCALED_E } // PKG_ADD: autoload ("gsl_sf_bessel_jl", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_jl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_jl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_jl (@dots{})\n\ \n\ Computes the regular spherical Bessel function of\n\ order l, j_l(x), for l >= 0 and x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_jl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_jl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JL_E undefined error ("GSL function gsl_sf_bessel_jl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JL_E } // PKG_ADD: autoload ("bessel_jl", which ("gsl_sf")); DEFUN_DLD(bessel_jl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_jl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_jl (@dots{})\n\ \n\ Computes the regular spherical Bessel function of\n\ order l, j_l(x), for l >= 0 and x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_jl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_jl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JL_E undefined error ("GSL function gsl_sf_bessel_jl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JL_E } // PKG_ADD: autoload ("gsl_sf_bessel_yl", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_yl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_yl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_yl (@dots{})\n\ \n\ Computes the irregular spherical Bessel function of\n\ order l, y_l(x), for l >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_yl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_yl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YL_E undefined error ("GSL function gsl_sf_bessel_yl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YL_E } // PKG_ADD: autoload ("bessel_yl", which ("gsl_sf")); DEFUN_DLD(bessel_yl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_yl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_yl (@dots{})\n\ \n\ Computes the irregular spherical Bessel function of\n\ order l, y_l(x), for l >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_yl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_yl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YL_E undefined error ("GSL function gsl_sf_bessel_yl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YL_E } // PKG_ADD: autoload ("gsl_sf_bessel_il_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_il_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_il_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_il_scaled (@dots{})\n\ \n\ Computes the scaled regular modified spherical Bessel\n\ function of order l, \\exp(-|x|) i_l(x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IL_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_il_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_il_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IL_SCALED_E undefined error ("GSL function gsl_sf_bessel_il_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IL_SCALED_E } // PKG_ADD: autoload ("bessel_il_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_il_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_il_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_il_scaled (@dots{})\n\ \n\ Computes the scaled regular modified spherical Bessel\n\ function of order l, \\exp(-|x|) i_l(x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_IL_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_il_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_il_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_IL_SCALED_E undefined error ("GSL function gsl_sf_bessel_il_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IL_SCALED_E } // PKG_ADD: autoload ("gsl_sf_bessel_kl_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_kl_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_kl_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_kl_scaled (@dots{})\n\ \n\ Computes the scaled irregular modified spherical Bessel\n\ function of order l, \\exp(x) k_l(x), for x>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KL_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_kl_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_kl_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KL_SCALED_E undefined error ("GSL function gsl_sf_bessel_kl_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KL_SCALED_E } // PKG_ADD: autoload ("bessel_kl_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_kl_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_kl_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_kl_scaled (@dots{})\n\ \n\ Computes the scaled irregular modified spherical Bessel\n\ function of order l, \\exp(x) k_l(x), for x>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KL_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_kl_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_kl_scaled_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KL_SCALED_E undefined error ("GSL function gsl_sf_bessel_kl_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KL_SCALED_E } // PKG_ADD: autoload ("gsl_sf_exprel_n", which ("gsl_sf")); DEFUN_DLD(gsl_sf_exprel_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_exprel_n (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_exprel_n (@dots{})\n\ \n\ Computes the N-relative exponential, which is the n-th\n\ generalization of the functions gsl_sf_exprel and gsl_sf_exprel2. The\n\ N-relative exponential is given by,\n\ \n\ exprel_N(x) = N!/x^N (\\exp(x) - \\sum_@{k=0@}^@{N-1@} x^k/k!)\n\ = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...\n\ = 1F1 (1,1+N,x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_exprel_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_exprel_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_N_E undefined error ("GSL function gsl_sf_exprel_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_N_E } // PKG_ADD: autoload ("exprel_n", which ("gsl_sf")); DEFUN_DLD(exprel_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} exprel_n (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} exprel_n (@dots{})\n\ \n\ Computes the N-relative exponential, which is the n-th\n\ generalization of the functions gsl_sf_exprel and gsl_sf_exprel2. The\n\ N-relative exponential is given by,\n\ \n\ exprel_N(x) = N!/x^N (\\exp(x) - \\sum_@{k=0@}^@{N-1@} x^k/k!)\n\ = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ...\n\ = 1F1 (1,1+N,x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXPREL_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_exprel_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_exprel_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXPREL_N_E undefined error ("GSL function gsl_sf_exprel_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXPREL_N_E } // PKG_ADD: autoload ("gsl_sf_fermi_dirac_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_fermi_dirac_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_fermi_dirac_int (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_fermi_dirac_int (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral with an\n\ integer index of j, F_j(x) = (1/\\Gamma(j+1)) \\int_0^\\infty dt (t^j\n\ /(\\exp(t-x)+1)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fermi_dirac_int_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fermi_dirac_int_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_INT_E undefined error ("GSL function gsl_sf_fermi_dirac_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_INT_E } // PKG_ADD: autoload ("fermi_dirac_int", which ("gsl_sf")); DEFUN_DLD(fermi_dirac_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} fermi_dirac_int (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} fermi_dirac_int (@dots{})\n\ \n\ Computes the complete Fermi-Dirac integral with an\n\ integer index of j, F_j(x) = (1/\\Gamma(j+1)) \\int_0^\\infty dt (t^j\n\ /(\\exp(t-x)+1)).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fermi_dirac_int_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fermi_dirac_int_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_INT_E undefined error ("GSL function gsl_sf_fermi_dirac_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_INT_E } // PKG_ADD: autoload ("gsl_sf_taylorcoeff", which ("gsl_sf")); DEFUN_DLD(gsl_sf_taylorcoeff, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_taylorcoeff (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_taylorcoeff (@dots{})\n\ \n\ Computes the Taylor coefficient x^n / n!\n\ for x >= 0, n >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TAYLORCOEFF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_taylorcoeff_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_taylorcoeff_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TAYLORCOEFF_E undefined error ("GSL function gsl_sf_taylorcoeff_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TAYLORCOEFF_E } // PKG_ADD: autoload ("taylorcoeff", which ("gsl_sf")); DEFUN_DLD(taylorcoeff, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} taylorcoeff (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} taylorcoeff (@dots{})\n\ \n\ Computes the Taylor coefficient x^n / n!\n\ for x >= 0, n >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_TAYLORCOEFF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_taylorcoeff_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_taylorcoeff_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_TAYLORCOEFF_E undefined error ("GSL function gsl_sf_taylorcoeff_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_TAYLORCOEFF_E } // PKG_ADD: autoload ("gsl_sf_legendre_Pl", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Pl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_Pl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_legendre_Pl (@dots{})\n\ \n\ These functions evaluate the Legendre polynomial P_l(x) for a specific\n\ value of l, x subject to l >= 0, |x| <= 1\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_PL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Pl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Pl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_PL_E undefined error ("GSL function gsl_sf_legendre_Pl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PL_E } // PKG_ADD: autoload ("legendre_Pl", which ("gsl_sf")); DEFUN_DLD(legendre_Pl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} legendre_Pl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} legendre_Pl (@dots{})\n\ \n\ These functions evaluate the Legendre polynomial P_l(x) for a specific\n\ value of l, x subject to l >= 0, |x| <= 1\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_PL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Pl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Pl_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_PL_E undefined error ("GSL function gsl_sf_legendre_Pl_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PL_E } // PKG_ADD: autoload ("gsl_sf_legendre_Ql", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Ql, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_Ql (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_legendre_Ql (@dots{})\n\ \n\ Computes the Legendre function Q_l(x) for x > -1, x != 1\n\ and l >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_QL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Ql_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Ql_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_QL_E undefined error ("GSL function gsl_sf_legendre_Ql_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_QL_E } // PKG_ADD: autoload ("legendre_Ql", which ("gsl_sf")); DEFUN_DLD(legendre_Ql, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} legendre_Ql (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} legendre_Ql (@dots{})\n\ \n\ Computes the Legendre function Q_l(x) for x > -1, x != 1\n\ and l >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_QL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Ql_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Ql_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_QL_E undefined error ("GSL function gsl_sf_legendre_Ql_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_QL_E } // PKG_ADD: autoload ("gsl_sf_mathieu_a", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_a, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_a (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_a (@dots{})\n\ \n\ Computes the characteristic values a_n(q) of the\n\ Mathieu function ce_n(q,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_A_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_a_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_a_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_A_E undefined error ("GSL function gsl_sf_mathieu_a_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_A_E } // PKG_ADD: autoload ("gsl_sf_mathieu_b", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_b, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_b (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_b (@dots{})\n\ \n\ Computes the characteristic values b_n(q) of the\n\ Mathieu function se_n(q,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_B_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_b_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_b_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_B_E undefined error ("GSL function gsl_sf_mathieu_b_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_B_E } // PKG_ADD: autoload ("gsl_sf_psi_n", which ("gsl_sf")); DEFUN_DLD(gsl_sf_psi_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_psi_n (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_psi_n (@dots{})\n\ \n\ Computes the polygamma function \\psi^@{(m)@}(x)\n\ for m >= 0, x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_N_E undefined error ("GSL function gsl_sf_psi_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_N_E } // PKG_ADD: autoload ("psi_n", which ("gsl_sf")); DEFUN_DLD(psi_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} psi_n (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} psi_n (@dots{})\n\ \n\ Computes the polygamma function \\psi^@{(m)@}(x)\n\ for m >= 0, x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_n_e (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_N_E undefined error ("GSL function gsl_sf_psi_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_N_E } // PKG_ADD: autoload ("gsl_sf_bessel_Jnu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Jnu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Jnu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Jnu (@dots{})\n\ \n\ Computes the regular cylindrical Bessel function of\n\ fractional order nu, J_\\nu(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Jnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Jnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JNU_E undefined error ("GSL function gsl_sf_bessel_Jnu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JNU_E } // PKG_ADD: autoload ("bessel_Jnu", which ("gsl_sf")); DEFUN_DLD(bessel_Jnu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Jnu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Jnu (@dots{})\n\ \n\ Computes the regular cylindrical Bessel function of\n\ fractional order nu, J_\\nu(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_JNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Jnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Jnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_JNU_E undefined error ("GSL function gsl_sf_bessel_Jnu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JNU_E } // PKG_ADD: autoload ("gsl_sf_bessel_Ynu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Ynu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Ynu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Ynu (@dots{})\n\ \n\ Computes the irregular cylindrical Bessel function of\n\ fractional order nu, Y_\\nu(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Ynu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Ynu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YNU_E undefined error ("GSL function gsl_sf_bessel_Ynu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YNU_E } // PKG_ADD: autoload ("bessel_Ynu", which ("gsl_sf")); DEFUN_DLD(bessel_Ynu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Ynu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Ynu (@dots{})\n\ \n\ Computes the irregular cylindrical Bessel function of\n\ fractional order nu, Y_\\nu(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_YNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Ynu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Ynu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_YNU_E undefined error ("GSL function gsl_sf_bessel_Ynu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YNU_E } // PKG_ADD: autoload ("gsl_sf_bessel_Inu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Inu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Inu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Inu (@dots{})\n\ \n\ Computes the regular modified Bessel function of\n\ fractional order nu, I_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_INU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_INU_E undefined error ("GSL function gsl_sf_bessel_Inu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_INU_E } // PKG_ADD: autoload ("bessel_Inu", which ("gsl_sf")); DEFUN_DLD(bessel_Inu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Inu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Inu (@dots{})\n\ \n\ Computes the regular modified Bessel function of\n\ fractional order nu, I_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_INU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_INU_E undefined error ("GSL function gsl_sf_bessel_Inu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_INU_E } // PKG_ADD: autoload ("gsl_sf_bessel_Inu_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Inu_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Inu_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Inu_scaled (@dots{})\n\ \n\ Computes the scaled regular modified Bessel function of\n\ fractional order nu, \\exp(-|x|)I_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_INU_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_INU_SCALED_E undefined error ("GSL function gsl_sf_bessel_Inu_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_INU_SCALED_E } // PKG_ADD: autoload ("bessel_Inu_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_Inu_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Inu_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Inu_scaled (@dots{})\n\ \n\ Computes the scaled regular modified Bessel function of\n\ fractional order nu, \\exp(-|x|)I_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_INU_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Inu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_INU_SCALED_E undefined error ("GSL function gsl_sf_bessel_Inu_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_INU_SCALED_E } // PKG_ADD: autoload ("gsl_sf_bessel_Knu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Knu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Knu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Knu (@dots{})\n\ \n\ Computes the irregular modified Bessel function of\n\ fractional order nu, K_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KNU_E undefined error ("GSL function gsl_sf_bessel_Knu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KNU_E } // PKG_ADD: autoload ("bessel_Knu", which ("gsl_sf")); DEFUN_DLD(bessel_Knu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Knu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Knu (@dots{})\n\ \n\ Computes the irregular modified Bessel function of\n\ fractional order nu, K_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KNU_E undefined error ("GSL function gsl_sf_bessel_Knu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KNU_E } // PKG_ADD: autoload ("gsl_sf_bessel_lnKnu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_lnKnu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_lnKnu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_lnKnu (@dots{})\n\ \n\ Computes the logarithm of the irregular modified Bessel\n\ function of fractional order nu, \\ln(K_\\nu(x)) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_LNKNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_lnKnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_lnKnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_LNKNU_E undefined error ("GSL function gsl_sf_bessel_lnKnu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_LNKNU_E } // PKG_ADD: autoload ("bessel_lnKnu", which ("gsl_sf")); DEFUN_DLD(bessel_lnKnu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_lnKnu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_lnKnu (@dots{})\n\ \n\ Computes the logarithm of the irregular modified Bessel\n\ function of fractional order nu, \\ln(K_\\nu(x)) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_LNKNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_lnKnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_lnKnu_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_LNKNU_E undefined error ("GSL function gsl_sf_bessel_lnKnu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_LNKNU_E } // PKG_ADD: autoload ("gsl_sf_bessel_Knu_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Knu_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Knu_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_Knu_scaled (@dots{})\n\ \n\ Computes the scaled irregular modified Bessel function\n\ of fractional order nu, \\exp(+|x|) K_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KNU_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KNU_SCALED_E undefined error ("GSL function gsl_sf_bessel_Knu_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KNU_SCALED_E } // PKG_ADD: autoload ("bessel_Knu_scaled", which ("gsl_sf")); DEFUN_DLD(bessel_Knu_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_Knu_scaled (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_Knu_scaled (@dots{})\n\ \n\ Computes the scaled irregular modified Bessel function\n\ of fractional order nu, \\exp(+|x|) K_\\nu(x) for x>0, \\nu>0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_KNU_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_bessel_Knu_scaled_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_KNU_SCALED_E undefined error ("GSL function gsl_sf_bessel_Knu_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KNU_SCALED_E } // PKG_ADD: autoload ("gsl_sf_exp_mult", which ("gsl_sf")); DEFUN_DLD(gsl_sf_exp_mult, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_exp_mult (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_exp_mult (@dots{})\n\ \n\ These routines exponentiate x and multiply by the factor y to return\n\ the product y \\exp(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXP_MULT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_exp_mult_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_exp_mult_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXP_MULT_E undefined error ("GSL function gsl_sf_exp_mult_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXP_MULT_E } // PKG_ADD: autoload ("exp_mult", which ("gsl_sf")); DEFUN_DLD(exp_mult, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} exp_mult (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} exp_mult (@dots{})\n\ \n\ These routines exponentiate x and multiply by the factor y to return\n\ the product y \\exp(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_EXP_MULT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_exp_mult_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_exp_mult_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_EXP_MULT_E undefined error ("GSL function gsl_sf_exp_mult_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_EXP_MULT_E } // PKG_ADD: autoload ("gsl_sf_fermi_dirac_inc_0", which ("gsl_sf")); DEFUN_DLD(gsl_sf_fermi_dirac_inc_0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_fermi_dirac_inc_0 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_fermi_dirac_inc_0 (@dots{})\n\ \n\ Computes the incomplete Fermi-Dirac integral with an\n\ index of zero, F_0(x,b) = \\ln(1 + e^@{b-x@}) - (b-x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_INC_0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_fermi_dirac_inc_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_fermi_dirac_inc_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_INC_0_E undefined error ("GSL function gsl_sf_fermi_dirac_inc_0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_INC_0_E } // PKG_ADD: autoload ("fermi_dirac_inc_0", which ("gsl_sf")); DEFUN_DLD(fermi_dirac_inc_0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} fermi_dirac_inc_0 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} fermi_dirac_inc_0 (@dots{})\n\ \n\ Computes the incomplete Fermi-Dirac integral with an\n\ index of zero, F_0(x,b) = \\ln(1 + e^@{b-x@}) - (b-x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FERMI_DIRAC_INC_0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_fermi_dirac_inc_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_fermi_dirac_inc_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FERMI_DIRAC_INC_0_E undefined error ("GSL function gsl_sf_fermi_dirac_inc_0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FERMI_DIRAC_INC_0_E } // PKG_ADD: autoload ("gsl_sf_poch", which ("gsl_sf")); DEFUN_DLD(gsl_sf_poch, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_poch (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_poch (@dots{})\n\ \n\ Computes the Pochhammer symbol\n\ \n\ (a)_x := \\Gamma(a + x)/\\Gamma(a),\n\ \n\ subject to a and a+x not being negative integers. The Pochhammer\n\ symbol is also known as the Apell symbol.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_POCH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_poch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_poch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_POCH_E undefined error ("GSL function gsl_sf_poch_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_POCH_E } // PKG_ADD: autoload ("poch", which ("gsl_sf")); DEFUN_DLD(poch, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} poch (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} poch (@dots{})\n\ \n\ Computes the Pochhammer symbol\n\ \n\ (a)_x := \\Gamma(a + x)/\\Gamma(a),\n\ \n\ subject to a and a+x not being negative integers. The Pochhammer\n\ symbol is also known as the Apell symbol.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_POCH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_poch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_poch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_POCH_E undefined error ("GSL function gsl_sf_poch_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_POCH_E } // PKG_ADD: autoload ("gsl_sf_lnpoch", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lnpoch, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lnpoch (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lnpoch (@dots{})\n\ \n\ Computes the logarithm of the Pochhammer symbol,\n\ \\log((a)_x) = \\log(\\Gamma(a + x)/\\Gamma(a)) for a > 0, a+x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNPOCH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnpoch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnpoch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNPOCH_E undefined error ("GSL function gsl_sf_lnpoch_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNPOCH_E } // PKG_ADD: autoload ("lnpoch", which ("gsl_sf")); DEFUN_DLD(lnpoch, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lnpoch (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lnpoch (@dots{})\n\ \n\ Computes the logarithm of the Pochhammer symbol,\n\ \\log((a)_x) = \\log(\\Gamma(a + x)/\\Gamma(a)) for a > 0, a+x > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNPOCH_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnpoch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnpoch_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNPOCH_E undefined error ("GSL function gsl_sf_lnpoch_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNPOCH_E } // PKG_ADD: autoload ("gsl_sf_pochrel", which ("gsl_sf")); DEFUN_DLD(gsl_sf_pochrel, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_pochrel (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_pochrel (@dots{})\n\ \n\ Computes the relative Pochhammer symbol ((a,x) - 1)/x\n\ where (a,x) = (a)_x := \\Gamma(a + x)/\\Gamma(a).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_POCHREL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_pochrel_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_pochrel_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_POCHREL_E undefined error ("GSL function gsl_sf_pochrel_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_POCHREL_E } // PKG_ADD: autoload ("pochrel", which ("gsl_sf")); DEFUN_DLD(pochrel, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} pochrel (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} pochrel (@dots{})\n\ \n\ Computes the relative Pochhammer symbol ((a,x) - 1)/x\n\ where (a,x) = (a)_x := \\Gamma(a + x)/\\Gamma(a).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_POCHREL_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_pochrel_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_pochrel_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_POCHREL_E undefined error ("GSL function gsl_sf_pochrel_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_POCHREL_E } // PKG_ADD: autoload ("gsl_sf_gamma_inc_Q", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gamma_inc_Q, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gamma_inc_Q (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gamma_inc_Q (@dots{})\n\ \n\ Computes the normalized incomplete Gamma Function\n\ Q(a,x) = 1/\\Gamma(a) \\int_x\\infty dt t^@{a-1@} \\exp(-t) for a > 0, x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_Q_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_Q_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_Q_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_Q_E undefined error ("GSL function gsl_sf_gamma_inc_Q_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_Q_E } // PKG_ADD: autoload ("gamma_inc_Q", which ("gsl_sf")); DEFUN_DLD(gamma_inc_Q, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gamma_inc_Q (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gamma_inc_Q (@dots{})\n\ \n\ Computes the normalized incomplete Gamma Function\n\ Q(a,x) = 1/\\Gamma(a) \\int_x\\infty dt t^@{a-1@} \\exp(-t) for a > 0, x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_Q_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_Q_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_Q_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_Q_E undefined error ("GSL function gsl_sf_gamma_inc_Q_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_Q_E } // PKG_ADD: autoload ("gsl_sf_gamma_inc_P", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gamma_inc_P, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gamma_inc_P (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gamma_inc_P (@dots{})\n\ \n\ Computes the complementary normalized incomplete Gamma\n\ Function P(a,x) = 1/\\Gamma(a) \\int_0^x dt t^@{a-1@} \\exp(-t)\n\ for a > 0, x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_P_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_P_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_P_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_P_E undefined error ("GSL function gsl_sf_gamma_inc_P_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_P_E } // PKG_ADD: autoload ("gamma_inc_P", which ("gsl_sf")); DEFUN_DLD(gamma_inc_P, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gamma_inc_P (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gamma_inc_P (@dots{})\n\ \n\ Computes the complementary normalized incomplete Gamma\n\ Function P(a,x) = 1/\\Gamma(a) \\int_0^x dt t^@{a-1@} \\exp(-t)\n\ for a > 0, x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_P_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_P_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_P_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_P_E undefined error ("GSL function gsl_sf_gamma_inc_P_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_P_E } // PKG_ADD: autoload ("gsl_sf_gamma_inc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gamma_inc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gamma_inc (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gamma_inc (@dots{})\n\ \n\ These functions compute the incomplete Gamma Function the\n\ normalization factor included in the previously defined functions:\n\ \\Gamma(a,x) = \\int_x\\infty dt t^@{a-1@} \\exp(-t) for a real and x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_E undefined error ("GSL function gsl_sf_gamma_inc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_E } // PKG_ADD: autoload ("gamma_inc", which ("gsl_sf")); DEFUN_DLD(gamma_inc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gamma_inc (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gamma_inc (@dots{})\n\ \n\ These functions compute the incomplete Gamma Function the\n\ normalization factor included in the previously defined functions:\n\ \\Gamma(a,x) = \\int_x\\infty dt t^@{a-1@} \\exp(-t) for a real and x >= 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GAMMA_INC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_gamma_inc_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GAMMA_INC_E undefined error ("GSL function gsl_sf_gamma_inc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GAMMA_INC_E } // PKG_ADD: autoload ("gsl_sf_beta", which ("gsl_sf")); DEFUN_DLD(gsl_sf_beta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_beta (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_beta (@dots{})\n\ \n\ Computes the Beta Function,\n\ B(a,b) = \\Gamma(a)\\Gamma(b)/\\Gamma(a+b) for a > 0, b > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_beta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_beta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BETA_E undefined error ("GSL function gsl_sf_beta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BETA_E } // PKG_ADD: autoload ("beta_gsl", which ("gsl_sf")); DEFUN_DLD(beta_gsl, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} beta_gsl (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} beta_gsl (@dots{})\n\ \n\ Computes the Beta Function,\n\ B(a,b) = \\Gamma(a)\\Gamma(b)/\\Gamma(a+b) for a > 0, b > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_beta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_beta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BETA_E undefined error ("GSL function gsl_sf_beta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BETA_E } // PKG_ADD: autoload ("gsl_sf_lnbeta", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lnbeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lnbeta (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lnbeta (@dots{})\n\ \n\ Computes the logarithm of the Beta Function,\n\ \\log(B(a,b)) for a > 0, b > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNBETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnbeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnbeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNBETA_E undefined error ("GSL function gsl_sf_lnbeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNBETA_E } // PKG_ADD: autoload ("lnbeta", which ("gsl_sf")); DEFUN_DLD(lnbeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} lnbeta (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} lnbeta (@dots{})\n\ \n\ Computes the logarithm of the Beta Function,\n\ \\log(B(a,b)) for a > 0, b > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNBETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnbeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_lnbeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNBETA_E undefined error ("GSL function gsl_sf_lnbeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNBETA_E } // PKG_ADD: autoload ("gsl_sf_hyperg_0F1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_0F1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_0F1 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_0F1 (@dots{})\n\ \n\ Computes the hypergeometric function 0F1(c,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_0F1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hyperg_0F1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hyperg_0F1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_0F1_E undefined error ("GSL function gsl_sf_hyperg_0F1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_0F1_E } // PKG_ADD: autoload ("hyperg_0F1", which ("gsl_sf")); DEFUN_DLD(hyperg_0F1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hyperg_0F1 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hyperg_0F1 (@dots{})\n\ \n\ Computes the hypergeometric function 0F1(c,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_0F1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hyperg_0F1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hyperg_0F1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_0F1_E undefined error ("GSL function gsl_sf_hyperg_0F1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_0F1_E } // PKG_ADD: autoload ("gsl_sf_conicalP_half", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_half (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_half (@dots{})\n\ \n\ Computes the irregular Spherical Conical Function\n\ P^@{1/2@}_@{-1/2 + i \\lambda@}(x) for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_half_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_half_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_HALF_E undefined error ("GSL function gsl_sf_conicalP_half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_HALF_E } // PKG_ADD: autoload ("conicalP_half", which ("gsl_sf")); DEFUN_DLD(conicalP_half, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} conicalP_half (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} conicalP_half (@dots{})\n\ \n\ Computes the irregular Spherical Conical Function\n\ P^@{1/2@}_@{-1/2 + i \\lambda@}(x) for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_HALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_half_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_half_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_HALF_E undefined error ("GSL function gsl_sf_conicalP_half_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_HALF_E } // PKG_ADD: autoload ("gsl_sf_conicalP_mhalf", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_mhalf, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_mhalf (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_mhalf (@dots{})\n\ \n\ Computes the regular Spherical Conical Function\n\ P^@{-1/2@}_@{-1/2 + i \\lambda@}(x) for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_MHALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_mhalf_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_mhalf_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_MHALF_E undefined error ("GSL function gsl_sf_conicalP_mhalf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_MHALF_E } // PKG_ADD: autoload ("conicalP_mhalf", which ("gsl_sf")); DEFUN_DLD(conicalP_mhalf, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} conicalP_mhalf (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} conicalP_mhalf (@dots{})\n\ \n\ Computes the regular Spherical Conical Function\n\ P^@{-1/2@}_@{-1/2 + i \\lambda@}(x) for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_MHALF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_mhalf_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_mhalf_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_MHALF_E undefined error ("GSL function gsl_sf_conicalP_mhalf_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_MHALF_E } // PKG_ADD: autoload ("gsl_sf_conicalP_0", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_0 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_0 (@dots{})\n\ \n\ Computes the conical function P^0_@{-1/2 + i \\lambda@}(x)\n\ for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_0_E undefined error ("GSL function gsl_sf_conicalP_0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_0_E } // PKG_ADD: autoload ("conicalP_0", which ("gsl_sf")); DEFUN_DLD(conicalP_0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} conicalP_0 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} conicalP_0 (@dots{})\n\ \n\ Computes the conical function P^0_@{-1/2 + i \\lambda@}(x)\n\ for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_0_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_0_E undefined error ("GSL function gsl_sf_conicalP_0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_0_E } // PKG_ADD: autoload ("gsl_sf_conicalP_1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_1 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_1 (@dots{})\n\ \n\ Computes the conical function P^1_@{-1/2 + i \\lambda@}(x)\n\ for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_1_E undefined error ("GSL function gsl_sf_conicalP_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_1_E } // PKG_ADD: autoload ("conicalP_1", which ("gsl_sf")); DEFUN_DLD(conicalP_1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} conicalP_1 (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} conicalP_1 (@dots{})\n\ \n\ Computes the conical function P^1_@{-1/2 + i \\lambda@}(x)\n\ for x > -1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_conicalP_1_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_1_E undefined error ("GSL function gsl_sf_conicalP_1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_1_E } // PKG_ADD: autoload ("gsl_sf_airy_Ai", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Ai, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Ai (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Ai (@dots{})\n\ \n\ Computes the Airy function Ai(x) with an accuracy\n\ specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_E undefined error ("GSL function gsl_sf_airy_Ai_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_E } // PKG_ADD: autoload ("airy_Ai", which ("gsl_sf")); DEFUN_DLD(airy_Ai, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Ai (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Ai (@dots{})\n\ \n\ Computes the Airy function Ai(x) with an accuracy\n\ specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_E undefined error ("GSL function gsl_sf_airy_Ai_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_E } // PKG_ADD: autoload ("gsl_sf_airy_Bi", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Bi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Bi (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Bi (@dots{})\n\ \n\ Computes the Airy function Bi(x) with an accuracy\n\ specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_E undefined error ("GSL function gsl_sf_airy_Bi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_E } // PKG_ADD: autoload ("airy_Bi", which ("gsl_sf")); DEFUN_DLD(airy_Bi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Bi (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Bi (@dots{})\n\ \n\ Computes the Airy function Bi(x) with an accuracy\n\ specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_E undefined error ("GSL function gsl_sf_airy_Bi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_E } // PKG_ADD: autoload ("gsl_sf_airy_Ai_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Ai_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Ai_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Ai_scaled (@dots{})\n\ \n\ Computes a scaled version of the Airy function\n\ S_A(x) Ai(x). For x>0 the scaling factor S_A(x) is \\exp(+(2/3) x^(3/2)), and\n\ is 1 for x<0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_SCALED_E undefined error ("GSL function gsl_sf_airy_Ai_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_SCALED_E } // PKG_ADD: autoload ("airy_Ai_scaled", which ("gsl_sf")); DEFUN_DLD(airy_Ai_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Ai_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Ai_scaled (@dots{})\n\ \n\ Computes a scaled version of the Airy function\n\ S_A(x) Ai(x). For x>0 the scaling factor S_A(x) is \\exp(+(2/3) x^(3/2)), and\n\ is 1 for x<0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_SCALED_E undefined error ("GSL function gsl_sf_airy_Ai_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_SCALED_E } // PKG_ADD: autoload ("gsl_sf_airy_Bi_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Bi_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Bi_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Bi_scaled (@dots{})\n\ \n\ Computes a scaled version of the Airy function\n\ S_B(x) Bi(x). For x>0 the scaling factor S_B(x) is exp(-(2/3) x^(3/2)), and\n\ is 1 for x<0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_SCALED_E undefined error ("GSL function gsl_sf_airy_Bi_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_SCALED_E } // PKG_ADD: autoload ("airy_Bi_scaled", which ("gsl_sf")); DEFUN_DLD(airy_Bi_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Bi_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Bi_scaled (@dots{})\n\ \n\ Computes a scaled version of the Airy function\n\ S_B(x) Bi(x). For x>0 the scaling factor S_B(x) is exp(-(2/3) x^(3/2)), and\n\ is 1 for x<0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_SCALED_E undefined error ("GSL function gsl_sf_airy_Bi_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_SCALED_E } // PKG_ADD: autoload ("gsl_sf_airy_Ai_deriv", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Ai_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Ai_deriv (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Ai_deriv (@dots{})\n\ \n\ Computes the Airy function derivative Ai'(x) with an\n\ accuracy specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_DERIV_E undefined error ("GSL function gsl_sf_airy_Ai_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_DERIV_E } // PKG_ADD: autoload ("airy_Ai_deriv", which ("gsl_sf")); DEFUN_DLD(airy_Ai_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Ai_deriv (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Ai_deriv (@dots{})\n\ \n\ Computes the Airy function derivative Ai'(x) with an\n\ accuracy specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_DERIV_E undefined error ("GSL function gsl_sf_airy_Ai_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_DERIV_E } // PKG_ADD: autoload ("gsl_sf_airy_Bi_deriv", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Bi_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Bi_deriv (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Bi_deriv (@dots{})\n\ \n\ Computes the Airy function derivative Bi'(x) with an\n\ accuracy specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_DERIV_E undefined error ("GSL function gsl_sf_airy_Bi_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_DERIV_E } // PKG_ADD: autoload ("airy_Bi_deriv", which ("gsl_sf")); DEFUN_DLD(airy_Bi_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Bi_deriv (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Bi_deriv (@dots{})\n\ \n\ Computes the Airy function derivative Bi'(x) with an\n\ accuracy specified by mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_DERIV_E undefined error ("GSL function gsl_sf_airy_Bi_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_DERIV_E } // PKG_ADD: autoload ("gsl_sf_airy_Ai_deriv_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Ai_deriv_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Ai_deriv_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Ai_deriv_scaled (@dots{})\n\ \n\ Computes the derivative of the scaled Airy function\n\ S_A(x) Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E undefined error ("GSL function gsl_sf_airy_Ai_deriv_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E } // PKG_ADD: autoload ("airy_Ai_deriv_scaled", which ("gsl_sf")); DEFUN_DLD(airy_Ai_deriv_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Ai_deriv_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Ai_deriv_scaled (@dots{})\n\ \n\ Computes the derivative of the scaled Airy function\n\ S_A(x) Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Ai_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E undefined error ("GSL function gsl_sf_airy_Ai_deriv_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E } // PKG_ADD: autoload ("gsl_sf_airy_Bi_deriv_scaled", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_Bi_deriv_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_Bi_deriv_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_Bi_deriv_scaled (@dots{})\n\ \n\ Computes the derivative of the scaled Airy function\n\ S_B(x) Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E undefined error ("GSL function gsl_sf_airy_Bi_deriv_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E } // PKG_ADD: autoload ("airy_Bi_deriv_scaled", which ("gsl_sf")); DEFUN_DLD(airy_Bi_deriv_scaled, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_Bi_deriv_scaled (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_Bi_deriv_scaled (@dots{})\n\ \n\ Computes the derivative of the scaled Airy function\n\ S_B(x) Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_airy_Bi_deriv_scaled_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E undefined error ("GSL function gsl_sf_airy_Bi_deriv_scaled_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E } // PKG_ADD: autoload ("gsl_sf_ellint_Kcomp", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_Kcomp, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_Kcomp (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_Kcomp (@dots{})\n\ \n\ Computes the complete elliptic integral K(k)\n\ @tex\n\ \\beforedisplay\n\ $$\n\ \\eqalign{\n\ K(k) &= \\int_0^{\\pi/2} {dt \\over \\sqrt{(1 - k^2 \\sin^2(t))}} \\cr\n\ }\n\ $$\n\ \\afterdisplay\n\ See also:\n\ @end tex\n\ @ifinfo\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 1\n\ ellint_Kcomp(k) = | ------------------- dt\n\ | 2 2\n\ / sqrt(1 - k sin (t))\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifinfo\n\ @ifhtml\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 1\n\ ellint_Kcomp(k) = | ------------------- dt\n\ | 2 2\n\ / sqrt(1 - k sin (t))\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifhtml\n\ \n\ @seealso{ellipj, ellipke}\n\ \n\ The notation used here is based on Carlson, @cite{Numerische\n\ Mathematik} 33 (1979) and differs slightly from that used by\n\ Abramowitz & Stegun, where the functions are given in terms of the\n\ parameter @math{m = k^2}.\n\ \n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_KCOMP_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Kcomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Kcomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_KCOMP_E undefined error ("GSL function gsl_sf_ellint_Kcomp_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_KCOMP_E } // PKG_ADD: autoload ("ellint_Kcomp", which ("gsl_sf")); DEFUN_DLD(ellint_Kcomp, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} ellint_Kcomp (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} ellint_Kcomp (@dots{})\n\ \n\ Computes the complete elliptic integral K(k)\n\ @tex\n\ \\beforedisplay\n\ $$\n\ \\eqalign{\n\ K(k) &= \\int_0^{\\pi/2} {dt \\over \\sqrt{(1 - k^2 \\sin^2(t))}} \\cr\n\ }\n\ $$\n\ \\afterdisplay\n\ See also:\n\ @end tex\n\ @ifinfo\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 1\n\ ellint_Kcomp(k) = | ------------------- dt\n\ | 2 2\n\ / sqrt(1 - k sin (t))\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifinfo\n\ @ifhtml\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 1\n\ ellint_Kcomp(k) = | ------------------- dt\n\ | 2 2\n\ / sqrt(1 - k sin (t))\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifhtml\n\ \n\ @seealso{ellipj, ellipke}\n\ \n\ The notation used here is based on Carlson, @cite{Numerische\n\ Mathematik} 33 (1979) and differs slightly from that used by\n\ Abramowitz & Stegun, where the functions are given in terms of the\n\ parameter @math{m = k^2}.\n\ \n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_KCOMP_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Kcomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Kcomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_KCOMP_E undefined error ("GSL function gsl_sf_ellint_Kcomp_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_KCOMP_E } // PKG_ADD: autoload ("gsl_sf_ellint_Ecomp", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_Ecomp, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_Ecomp (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_Ecomp (@dots{})\n\ \n\ Computes the complete elliptic integral E(k) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @tex\n\ \\beforedisplay\n\ $$\n\ \\eqalign{\n\ E(k) &= \\int_0^{\\pi/2} \\sqrt{(1 - k^2 \\sin^2(t))} dt \\cr\n\ }\n\ $$\n\ \\afterdisplay\n\ See also:\n\ \n\ @end tex\n\ @ifinfo\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 2 2\n\ ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt\n\ |\n\ /\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifinfo\n\ @ifhtml\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 2 2\n\ ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt\n\ |\n\ /\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifhtml\n\ \n\ @seealso{ellipj, ellipke}\n\ \n\ The notation used here is based on Carlson, @cite{Numerische\n\ Mathematik} 33 (1979) and differs slightly from that used by\n\ Abramowitz & Stegun, where the functions are given in terms of the\n\ parameter @math{m = k^2}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_ECOMP_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Ecomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Ecomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_ECOMP_E undefined error ("GSL function gsl_sf_ellint_Ecomp_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_ECOMP_E } // PKG_ADD: autoload ("ellint_Ecomp", which ("gsl_sf")); DEFUN_DLD(ellint_Ecomp, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} ellint_Ecomp (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} ellint_Ecomp (@dots{})\n\ \n\ Computes the complete elliptic integral E(k) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @tex\n\ \\beforedisplay\n\ $$\n\ \\eqalign{\n\ E(k) &= \\int_0^{\\pi/2} \\sqrt{(1 - k^2 \\sin^2(t))} dt \\cr\n\ }\n\ $$\n\ \\afterdisplay\n\ See also:\n\ \n\ @end tex\n\ @ifinfo\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 2 2\n\ ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt\n\ |\n\ /\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifinfo\n\ @ifhtml\n\ @group\n\ @example\n\ pi\n\ ---\n\ 2\n\ /\n\ | 2 2\n\ ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt\n\ |\n\ /\n\ 0\n\ \n\ @end example\n\ @end group\n\ @end ifhtml\n\ \n\ @seealso{ellipj, ellipke}\n\ \n\ The notation used here is based on Carlson, @cite{Numerische\n\ Mathematik} 33 (1979) and differs slightly from that used by\n\ Abramowitz & Stegun, where the functions are given in terms of the\n\ parameter @math{m = k^2}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_ECOMP_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Ecomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_ellint_Ecomp_e (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_ECOMP_E undefined error ("GSL function gsl_sf_ellint_Ecomp_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_ECOMP_E } // PKG_ADD: autoload ("gsl_sf_ellint_E", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_E, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_E (@var{arg1}, @var{arg2}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_E (@dots{})\n\ \n\ This routine computes the elliptic integral E(\\phi,k) to the accuracy\n\ specified by the mode variable mode. Note that Abramowitz & Stegun\n\ define this function in terms of the parameter m = k^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_E_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(2).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(2).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_E_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_E_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_E_E undefined error ("GSL function gsl_sf_ellint_E_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_E_E } // PKG_ADD: autoload ("gsl_sf_ellint_F", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_F, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_F (@var{arg1}, @var{arg2}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_F (@dots{})\n\ \n\ This routine computes the elliptic integral F(\\phi,k) to the accuracy\n\ specified by the mode variable mode. Note that Abramowitz & Stegun\n\ define this function in terms of the parameter m = k^2.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_F_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(2).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(2).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_F_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_F_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_F_E undefined error ("GSL function gsl_sf_ellint_F_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_F_E } // PKG_ADD: autoload ("gsl_sf_ellint_Pcomp", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_Pcomp, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_Pcomp (@var{arg1}, @var{arg2}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_Pcomp (@dots{})\n\ \n\ Computes the complete elliptic integral \\Pi(k,n) to the\n\ accuracy specified by the mode variable mode. Note that Abramowitz &\n\ Stegun define this function in terms of the parameters m = k^2 and\n\ \\sin^2(\\alpha) = k^2, with the change of sign n \\to -n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_PCOMP_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(2).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(2).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_Pcomp_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_Pcomp_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_PCOMP_E undefined error ("GSL function gsl_sf_ellint_Pcomp_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_PCOMP_E } // PKG_ADD: autoload ("gsl_sf_ellint_RC", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_RC, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_RC (@var{arg1}, @var{arg2}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_RC (@dots{})\n\ \n\ This routine computes the incomplete elliptic integral RC(x,y) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_RC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(2).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(2).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_RC_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_RC_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_RC_E undefined error ("GSL function gsl_sf_ellint_RC_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_RC_E } #if GSL_MAJOR_VERSION < 2 // PKG_ADD: autoload ("gsl_sf_ellint_D", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_D, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_D (@var{arg1}, @var{arg2}, @var{arg3}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_D (@dots{})\n\ \n\ This function computes the incomplete elliptic integral\n\ D(\\phi,k) which is defined through the Carlson form\n\ RD(x,y,z) by the following relation,\n\ \n\ D(\\phi,k) = (1/3)(\\sin(\\phi))^3\n\ x RD (1-\\sin^2(\\phi), 1-k^2 \\sin^2(\\phi), 1).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_D_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(3).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(3).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_D_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_D_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_D_E undefined error ("GSL function gsl_sf_ellint_D_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_D_E } #else // PKG_ADD: autoload ("gsl_sf_ellint_D", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_D, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_D (@var{arg1}, @var{arg2}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_D (@dots{})\n\ \n\ This function computes the incomplete elliptic integral\n\ D(\\phi,k) which is defined through the Carlson form\n\ RD(x,y,z) by the following relation,\n\ \n\ D(\\phi,k) = (1/3)(\\sin(\\phi))^3\n\ x RD (1-\\sin^2(\\phi), 1-k^2 \\sin^2(\\phi), 1).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_D_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(2).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(2).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_D_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_ellint_D_e (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_D_E undefined error ("GSL function gsl_sf_ellint_D_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_D_E } #endif // PKG_ADD: autoload ("gsl_sf_ellint_P", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_P, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_P (@var{arg1}, @var{arg2}, @var{arg3}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_P (@dots{})\n\ \n\ This routine computes the incomplete elliptic integral \\Pi(\\phi,k,n)\n\ to the accuracy specified by the mode variable mode. Note that\n\ Abramowitz & Stegun define this function in terms of the parameters\n\ m = k^2 and \\sin^2(\\alpha) = k^2, with the change of sign n \\to -n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_P_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(3).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(3).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_P_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_P_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_P_E undefined error ("GSL function gsl_sf_ellint_P_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_P_E } // PKG_ADD: autoload ("gsl_sf_ellint_RD", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_RD, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_RD (@var{arg1}, @var{arg2}, @var{arg3}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_RD (@dots{})\n\ \n\ This routine computes the incomplete elliptic integral RD(x,y,z) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_RD_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(3).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(3).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_RD_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_RD_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_RD_E undefined error ("GSL function gsl_sf_ellint_RD_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_RD_E } // PKG_ADD: autoload ("gsl_sf_ellint_RF", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_RF, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_RF (@var{arg1}, @var{arg2}, @var{arg3}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_RF (@dots{})\n\ \n\ This routine computes the incomplete elliptic integral RF(x,y,z) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_RF_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(3).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(3).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_RF_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_ellint_RF_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_RF_E undefined error ("GSL function gsl_sf_ellint_RF_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_RF_E } // PKG_ADD: autoload ("gsl_sf_ellint_RJ", which ("gsl_sf")); DEFUN_DLD(gsl_sf_ellint_RJ, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_ellint_RJ (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_ellint_RJ (@dots{})\n\ \n\ This routine computes the incomplete elliptic integral RJ(x,y,z,p) to the\n\ accuracy specified by the mode variable mode.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ELLINT_RJ_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 5; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(4).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(4).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { gsl_sf_ellint_RJ_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { gsl_sf_ellint_RJ_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ELLINT_RJ_E undefined error ("GSL function gsl_sf_ellint_RJ_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ELLINT_RJ_E } // PKG_ADD: autoload ("gsl_sf_airy_zero_Ai", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_zero_Ai, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_zero_Ai (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_zero_Ai (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_AI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_AI_E undefined error ("GSL function gsl_sf_airy_zero_Ai_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_AI_E } // PKG_ADD: autoload ("airy_zero_Ai", which ("gsl_sf")); DEFUN_DLD(airy_zero_Ai, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_zero_Ai (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_zero_Ai (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_AI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_AI_E undefined error ("GSL function gsl_sf_airy_zero_Ai_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_AI_E } // PKG_ADD: autoload ("gsl_sf_airy_zero_Bi", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_zero_Bi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_zero_Bi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_zero_Bi (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_BI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_BI_E undefined error ("GSL function gsl_sf_airy_zero_Bi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_BI_E } // PKG_ADD: autoload ("airy_zero_Bi", which ("gsl_sf")); DEFUN_DLD(airy_zero_Bi, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_zero_Bi (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_zero_Bi (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_BI_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_BI_E undefined error ("GSL function gsl_sf_airy_zero_Bi_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_BI_E } // PKG_ADD: autoload ("gsl_sf_airy_zero_Ai_deriv", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_zero_Ai_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_zero_Ai_deriv (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_zero_Ai_deriv (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function derivative Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_deriv_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_deriv_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E undefined error ("GSL function gsl_sf_airy_zero_Ai_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E } // PKG_ADD: autoload ("airy_zero_Ai_deriv", which ("gsl_sf")); DEFUN_DLD(airy_zero_Ai_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_zero_Ai_deriv (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_zero_Ai_deriv (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function derivative Ai(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_deriv_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Ai_deriv_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E undefined error ("GSL function gsl_sf_airy_zero_Ai_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E } // PKG_ADD: autoload ("gsl_sf_airy_zero_Bi_deriv", which ("gsl_sf")); DEFUN_DLD(gsl_sf_airy_zero_Bi_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_airy_zero_Bi_deriv (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_airy_zero_Bi_deriv (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function derivative Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_deriv_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_deriv_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E undefined error ("GSL function gsl_sf_airy_zero_Bi_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E } // PKG_ADD: autoload ("airy_zero_Bi_deriv", which ("gsl_sf")); DEFUN_DLD(airy_zero_Bi_deriv, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} airy_zero_Bi_deriv (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} airy_zero_Bi_deriv (@dots{})\n\ \n\ Computes the location of the s-th zero of the Airy\n\ function derivative Bi(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_deriv_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_airy_zero_Bi_deriv_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E undefined error ("GSL function gsl_sf_airy_zero_Bi_deriv_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E } // PKG_ADD: autoload ("gsl_sf_bessel_zero_J0", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_zero_J0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_zero_J0 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_zero_J0 (@dots{})\n\ \n\ Computes the location of the s-th positive zero of the\n\ Bessel function J_0(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_ZERO_J0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J0_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J0_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_ZERO_J0_E undefined error ("GSL function gsl_sf_bessel_zero_J0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_ZERO_J0_E } // PKG_ADD: autoload ("bessel_zero_J0", which ("gsl_sf")); DEFUN_DLD(bessel_zero_J0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_zero_J0 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_zero_J0 (@dots{})\n\ \n\ Computes the location of the s-th positive zero of the\n\ Bessel function J_0(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_ZERO_J0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J0_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J0_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_ZERO_J0_E undefined error ("GSL function gsl_sf_bessel_zero_J0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_ZERO_J0_E } // PKG_ADD: autoload ("gsl_sf_bessel_zero_J1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_zero_J1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_zero_J1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_zero_J1 (@dots{})\n\ \n\ Computes the location of the s-th positive zero of the\n\ Bessel function J_1(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_ZERO_J1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J1_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J1_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_ZERO_J1_E undefined error ("GSL function gsl_sf_bessel_zero_J1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_ZERO_J1_E } // PKG_ADD: autoload ("bessel_zero_J1", which ("gsl_sf")); DEFUN_DLD(bessel_zero_J1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} bessel_zero_J1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} bessel_zero_J1 (@dots{})\n\ \n\ Computes the location of the s-th positive zero of the\n\ Bessel function J_1(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_ZERO_J1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J1_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_J1_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_ZERO_J1_E undefined error ("GSL function gsl_sf_bessel_zero_J1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_ZERO_J1_E } // PKG_ADD: autoload ("gsl_sf_psi_1_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_psi_1_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_psi_1_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_psi_1_int (@dots{})\n\ \n\ Computes the Trigamma function \\psi(n) for positive\n\ integer n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_1_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_1_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_1_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_1_INT_E undefined error ("GSL function gsl_sf_psi_1_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_1_INT_E } // PKG_ADD: autoload ("psi_1_int", which ("gsl_sf")); DEFUN_DLD(psi_1_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} psi_1_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} psi_1_int (@dots{})\n\ \n\ Computes the Trigamma function \\psi(n) for positive\n\ integer n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_PSI_1_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_1_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_psi_1_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_PSI_1_INT_E undefined error ("GSL function gsl_sf_psi_1_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_PSI_1_INT_E } // PKG_ADD: autoload ("gsl_sf_conicalP_cyl_reg", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_cyl_reg, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_cyl_reg (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_cyl_reg (@dots{})\n\ \n\ Computes the Regular Cylindrical Conical Function\n\ @math{P^{-m}_{-1/2 + i \\lambda}(x)}, for @math{x > -1}, @math{m} @geq{} @math{-1}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_CYL_REG_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_conicalP_cyl_reg_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_conicalP_cyl_reg_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_CYL_REG_E undefined error ("GSL function gsl_sf_conicalP_cyl_reg_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_CYL_REG_E } // PKG_ADD: autoload ("gsl_sf_conicalP_sph_reg", which ("gsl_sf")); DEFUN_DLD(gsl_sf_conicalP_sph_reg, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_conicalP_sph_reg (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_conicalP_sph_reg (@dots{})\n\ \n\ Computes the Regular Spherical Conical Function\n\ @math{P^{-1/2-l}_{-1/2 + i \\lambda}(x)}, for @math{x > -1}, @math{l} @geq{} @math{-1}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CONICALP_SPH_REG_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_conicalP_sph_reg_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_conicalP_sph_reg_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CONICALP_SPH_REG_E undefined error ("GSL function gsl_sf_conicalP_sph_reg_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CONICALP_SPH_REG_E } // PKG_ADD: autoload ("gsl_sf_gegenpoly_n", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gegenpoly_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gegenpoly_n (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_gegenpoly_n (@dots{})\n\ \n\ These functions evaluate the Gegenbauer polynomial @math{C^{(\\lambda)}_n(x)}\n\ for n, lambda, x subject to @math{\\lambda > -1/2}, @math{n} @geq{} @math{0}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_GEGENPOLY_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_gegenpoly_n_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_gegenpoly_n_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_GEGENPOLY_N_E undefined error ("GSL function gsl_sf_gegenpoly_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GEGENPOLY_N_E } // PKG_ADD: autoload ("gsl_sf_laguerre_n", which ("gsl_sf")); DEFUN_DLD(gsl_sf_laguerre_n, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_laguerre_n (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_laguerre_n (@dots{})\n\ \n\ Computes the generalized Laguerre polynomial @math{L^a_n(x)} for\n\ @math{a > -1} and @math{n} @geq{} @math{0}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LAGUERRE_N_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_laguerre_n_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_laguerre_n_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LAGUERRE_N_E undefined error ("GSL function gsl_sf_laguerre_n_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LAGUERRE_N_E } // PKG_ADD: autoload ("gsl_sf_mathieu_ce", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_ce, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_ce (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_ce (@dots{})\n\ \n\ This routine computes the angular Mathieu function ce_n(q,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_CE_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_ce_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_ce_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_CE_E undefined error ("GSL function gsl_sf_mathieu_ce_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_CE_E } // PKG_ADD: autoload ("gsl_sf_mathieu_se", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_se, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_se (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_se (@dots{})\n\ \n\ This routine computes the angular Mathieu function se_n(q,x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_SE_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_se_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_se_e (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_SE_E undefined error ("GSL function gsl_sf_mathieu_se_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_SE_E } // PKG_ADD: autoload ("gsl_sf_hyperg_U_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_U_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_U_int (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_U_int (@dots{})\n\ \n\ Secondary Confluent Hypergoemetric U function A&E 13.1.3\n\ m and n are integers.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_U_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hyperg_U_int_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hyperg_U_int_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_U_INT_E undefined error ("GSL function gsl_sf_hyperg_U_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_U_INT_E } // PKG_ADD: autoload ("gsl_sf_hyperg_1F1_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_1F1_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_1F1_int (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_1F1_int (@dots{})\n\ \n\ Primary Confluent Hypergoemetric U function A&E 13.1.3\n\ m and n are integers.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_1F1_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hyperg_1F1_int_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hyperg_1F1_int_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_1F1_INT_E undefined error ("GSL function gsl_sf_hyperg_1F1_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_1F1_INT_E } // PKG_ADD: autoload ("gsl_sf_legendre_Plm", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Plm, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_Plm (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_legendre_Plm (@dots{})\n\ \n\ Computes the associated Legendre polynomial P_l^m(x)\n\ for m >= 0, l >= m, |x| <= 1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_PLM_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Plm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Plm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_PLM_E undefined error ("GSL function gsl_sf_legendre_Plm_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PLM_E } // PKG_ADD: autoload ("legendre_Plm", which ("gsl_sf")); DEFUN_DLD(legendre_Plm, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} legendre_Plm (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} legendre_Plm (@dots{})\n\ \n\ Computes the associated Legendre polynomial P_l^m(x)\n\ for m >= 0, l >= m, |x| <= 1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_PLM_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Plm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_Plm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_PLM_E undefined error ("GSL function gsl_sf_legendre_Plm_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PLM_E } // PKG_ADD: autoload ("gsl_sf_legendre_sphPlm", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_sphPlm, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_sphPlm (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_legendre_sphPlm (@dots{})\n\ \n\ Computes the normalized associated Legendre polynomial\n\ $\\sqrt@{(2l+1)/(4\\pi)@} \\sqrt@{(l-m)!/(l+m)!@} P_l^m(x)$ suitable for use\n\ in spherical harmonics. The parameters must satisfy m >= 0, l >= m,\n\ |x| <= 1. Theses routines avoid the overflows that occur for the\n\ standard normalization of P_l^m(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_SPHPLM_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_sphPlm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_sphPlm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_SPHPLM_E undefined error ("GSL function gsl_sf_legendre_sphPlm_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_SPHPLM_E } // PKG_ADD: autoload ("legendre_sphPlm", which ("gsl_sf")); DEFUN_DLD(legendre_sphPlm, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} legendre_sphPlm (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} legendre_sphPlm (@dots{})\n\ \n\ Computes the normalized associated Legendre polynomial\n\ $\\sqrt@{(2l+1)/(4\\pi)@} \\sqrt@{(l-m)!/(l+m)!@} P_l^m(x)$ suitable for use\n\ in spherical harmonics. The parameters must satisfy m >= 0, l >= m,\n\ |x| <= 1. Theses routines avoid the overflows that occur for the\n\ standard normalization of P_l^m(x).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LEGENDRE_SPHPLM_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_sphPlm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_legendre_sphPlm_e (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LEGENDRE_SPHPLM_E undefined error ("GSL function gsl_sf_legendre_sphPlm_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_SPHPLM_E } // PKG_ADD: autoload ("gsl_sf_hydrogenicR", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hydrogenicR, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hydrogenicR (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hydrogenicR (@dots{})\n\ \n\ This routine computes the n-th normalized hydrogenic bound state\n\ radial wavefunction,\n\ @tex\n\ R_n := 2 (Z^{3/2}/n^2) \\sqrt{(n-l-1)!/(n+l)!} \\exp(-Z r/n)\n\ (2Zr/n)^l L^{2l+1}_{n-l-1}(2Zr/n).\n\ @end tex\n\ @ifnottex\n\ \n\ @example\n\ @group\n\ Z^(3/2) ---------------- -Z r/n l 2l+1\n\ R_n := 2 -------- \\ / (n-l-1)!/(n+l)! . e . (2Zr/n) . L (2Zr/n).\n\ n^2 v n-l-1\n\ @end group\n\ @end example\n\ \n\ @end ifnottex\n\ where @math{L^a_b(x)} is the generalized Laguerre polynomial.\n\ The normalization is chosen such that the wavefunction \\psi\n\ is given by @math{\\psi(n,l,r) = R_n Y_{lm}}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYDROGENICR_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hydrogenicR_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_hydrogenicR_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYDROGENICR_E undefined error ("GSL function gsl_sf_hydrogenicR_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYDROGENICR_E } // PKG_ADD: autoload ("gsl_sf_mathieu_Mc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_Mc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_Mc (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_Mc (@dots{})\n\ \n\ This routine computes the radial j-th kind Mathieu function\n\ @math{Mc_n^{(j)}(q,x)} of order n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_MC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_Mc_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_Mc_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_MC_E undefined error ("GSL function gsl_sf_mathieu_Mc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_MC_E } // PKG_ADD: autoload ("gsl_sf_mathieu_Ms", which ("gsl_sf")); DEFUN_DLD(gsl_sf_mathieu_Ms, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_mathieu_Ms (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_mathieu_Ms (@dots{})\n\ \n\ This routine computes the radial j-th kind Mathieu function\n\ @math{Ms_n^{(j)}(q,x)} of order n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_MATHIEU_MS_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_Ms_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_mathieu_Ms_e (x1, x2, arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_MATHIEU_MS_E undefined error ("GSL function gsl_sf_mathieu_Ms_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_MATHIEU_MS_E } // PKG_ADD: autoload ("gsl_sf_bessel_zero_Jnu", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_zero_Jnu, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_zero_Jnu (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_bessel_zero_Jnu (@dots{})\n\ \n\ Computes the location of the n-th positive zero of the\n\ Bessel function J_x().\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BESSEL_ZERO_JNU_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_Jnu_e (arg1_data[i1], x2, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_bessel_zero_Jnu_e (arg1_data[i1], x2, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BESSEL_ZERO_JNU_E undefined error ("GSL function gsl_sf_bessel_zero_Jnu_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_ZERO_JNU_E } // PKG_ADD: autoload ("gsl_sf_hyperg_U", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_U, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_U (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_U (@dots{})\n\ \n\ Secondary Confluent Hypergoemetric U function A&E 13.1.3\n\ All inputs are double as is the output.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_U_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_U_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_U_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_U_E undefined error ("GSL function gsl_sf_hyperg_U_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_U_E } // PKG_ADD: autoload ("hyperg_U", which ("gsl_sf")); DEFUN_DLD(hyperg_U, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hyperg_U (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hyperg_U (@dots{})\n\ \n\ Secondary Confluent Hypergoemetric U function A&E 13.1.3\n\ All inputs are double as is the output.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_U_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_U_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_U_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_U_E undefined error ("GSL function gsl_sf_hyperg_U_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_U_E } // PKG_ADD: autoload ("gsl_sf_hyperg_1F1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_1F1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_1F1 (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_1F1 (@dots{})\n\ \n\ Primary Confluent Hypergoemetric U function A&E 13.1.3\n\ All inputs are double as is the output.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_1F1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_1F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_1F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_1F1_E undefined error ("GSL function gsl_sf_hyperg_1F1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_1F1_E } // PKG_ADD: autoload ("hyperg_1F1", which ("gsl_sf")); DEFUN_DLD(hyperg_1F1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hyperg_1F1 (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hyperg_1F1 (@dots{})\n\ \n\ Primary Confluent Hypergoemetric U function A&E 13.1.3\n\ All inputs are double as is the output.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_1F1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_1F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_1F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_1F1_E undefined error ("GSL function gsl_sf_hyperg_1F1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_1F1_E } // PKG_ADD: autoload ("gsl_sf_hyperg_2F0", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_2F0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_2F0 (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_2F0 (@dots{})\n\ \n\ Computes the hypergeometric function 2F0(a,b,x).\n\ The series representation is a divergent hypergeometric series.\n\ However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_2F0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_2F0_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_2F0_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_2F0_E undefined error ("GSL function gsl_sf_hyperg_2F0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_2F0_E } // PKG_ADD: autoload ("hyperg_2F0", which ("gsl_sf")); DEFUN_DLD(hyperg_2F0, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hyperg_2F0 (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hyperg_2F0 (@dots{})\n\ \n\ Computes the hypergeometric function 2F0(a,b,x).\n\ The series representation is a divergent hypergeometric series.\n\ However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x)\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_2F0_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_2F0_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_hyperg_2F0_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_2F0_E undefined error ("GSL function gsl_sf_hyperg_2F0_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_2F0_E } // PKG_ADD: autoload ("gsl_sf_beta_inc", which ("gsl_sf")); DEFUN_DLD(gsl_sf_beta_inc, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_beta_inc (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_beta_inc (@dots{})\n\ \n\ Computes the normalized incomplete Beta function\n\ \n\ I_x(a,b)=B_x(a,b)/B(a,b)\n\ \n\ where @math{B_x(a,b) = \\int_0^x t^(a-1) (1-t)^(b-1) dt}\n\ for @math{0 \\le x \\le 1}.\n\ \n\ For a > 0, b > 0 the value is computed using a continued fraction\n\ expansion. For all other values it is computed using the relation\n\ I_x(a,b,x) = (1/a) x^a 2F1(a,1-b,a+1,x)/B(a,b).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_BETA_INC_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_beta_inc_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { gsl_sf_beta_inc_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_BETA_INC_E undefined error ("GSL function gsl_sf_beta_inc_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BETA_INC_E } // PKG_ADD: autoload ("gsl_sf_hyperg_2F1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hyperg_2F1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hyperg_2F1 (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hyperg_2F1 (@dots{})\n\ \n\ Computes the Gauss hypergeometric function\n\ 2F1(a,b,c,x) = F(a,b,c,x) for |x| < 1.\n\ If the arguments (a,b,c,x) are too close to a singularity then\n\ the function can return the error code GSL_EMAXITER when the\n\ series approximation converges too slowly.\n\ This occurs in the region of x=1, c - a - b = m for integer m.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HYPERG_2F1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { gsl_sf_hyperg_2F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { gsl_sf_hyperg_2F1_e (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HYPERG_2F1_E undefined error ("GSL function gsl_sf_hyperg_2F1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HYPERG_2F1_E } // PKG_ADD: autoload ("gsl_sf_fact", which ("gsl_sf")); DEFUN_DLD(gsl_sf_fact, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_fact (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_fact (@dots{})\n\ \n\ Computes the factorial n!. The factorial is related to the Gamma\n\ function by n! = \\Gamma(n+1). The maximum value of n such that n! is\n\ not considered an overflow is 170.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_FACT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fact_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_fact_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_FACT_E undefined error ("GSL function gsl_sf_fact_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_FACT_E } // PKG_ADD: autoload ("gsl_sf_doublefact", which ("gsl_sf")); DEFUN_DLD(gsl_sf_doublefact, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_doublefact (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_doublefact (@dots{})\n\ \n\ Compute the double factorial n!! = n(n-2)(n-4)\\dots. The maximum value\n\ of n such that n!! is not considered an overflow is 297.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_DOUBLEFACT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_doublefact_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_doublefact_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_DOUBLEFACT_E undefined error ("GSL function gsl_sf_doublefact_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_DOUBLEFACT_E } // PKG_ADD: autoload ("gsl_sf_lnfact", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lnfact, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lnfact (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lnfact (@dots{})\n\ \n\ Computes the logarithm of the factorial of n,\n\ \\log(n!). The algorithm is faster than computing \\ln(\\Gamma(n+1)) via\n\ gsl_sf_lngamma for n < 170, but defers for larger n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNFACT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lnfact_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lnfact_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNFACT_E undefined error ("GSL function gsl_sf_lnfact_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNFACT_E } // PKG_ADD: autoload ("gsl_sf_lndoublefact", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lndoublefact, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lndoublefact (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lndoublefact (@dots{})\n\ \n\ Computes the logarithm of the double factorial of n, \\log(n!!).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNDOUBLEFACT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lndoublefact_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lndoublefact_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNDOUBLEFACT_E undefined error ("GSL function gsl_sf_lndoublefact_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNDOUBLEFACT_E } // PKG_ADD: autoload ("gsl_sf_choose", which ("gsl_sf")); DEFUN_DLD(gsl_sf_choose, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_choose (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_choose (@dots{})\n\ \n\ Computes the combinatorial factor n choose m = n!/(m!(n-m)!).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_CHOOSE_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_choose_e (x1, x2, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_choose_e (x1, x2, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_CHOOSE_E undefined error ("GSL function gsl_sf_choose_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_CHOOSE_E } // PKG_ADD: autoload ("gsl_sf_lnchoose", which ("gsl_sf")); DEFUN_DLD(gsl_sf_lnchoose, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_lnchoose (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_lnchoose (@dots{})\n\ \n\ Computes the logarithm of n choose m. This is equivalent to\n\ \\log(n!) - \\log(m!) - \\log((n-m)!).\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_LNCHOOSE_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lnchoose_e (x1, x2, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_lnchoose_e (x1, x2, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_LNCHOOSE_E undefined error ("GSL function gsl_sf_lnchoose_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LNCHOOSE_E } // PKG_ADD: autoload ("gsl_sf_coupling_3j", which ("gsl_sf")); DEFUN_DLD(gsl_sf_coupling_3j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_coupling_3j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_coupling_3j (@dots{})\n\ \n\ computes the Wigner 3-j coefficient,\n\ \n\ @example\n\ @group\n\ (ja jb jc\n\ ma mb mc)\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{ma = two_ma/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_3J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 6; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_3j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_3j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_3J_E undefined error ("GSL function gsl_sf_coupling_3j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_3J_E } // PKG_ADD: autoload ("coupling_3j", which ("gsl_sf")); DEFUN_DLD(coupling_3j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} coupling_3j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} coupling_3j (@dots{})\n\ \n\ computes the Wigner 3-j coefficient,\n\ \n\ @example\n\ @group\n\ (ja jb jc\n\ ma mb mc)\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{ma = two_ma/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_3J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 6; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_3j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_3j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_3J_E undefined error ("GSL function gsl_sf_coupling_3j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_3J_E } // PKG_ADD: autoload ("gsl_sf_coupling_6j", which ("gsl_sf")); DEFUN_DLD(gsl_sf_coupling_6j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_coupling_6j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_coupling_6j (@dots{})\n\ \n\ computes the Wigner 6-j coefficient,\n\ \n\ @example\n\ @group\n\ @{ja jb jc\n\ jd je jf@}\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_6J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 6; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_6j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_6j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_6J_E undefined error ("GSL function gsl_sf_coupling_6j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_6J_E } // PKG_ADD: autoload ("coupling_6j", which ("gsl_sf")); DEFUN_DLD(coupling_6j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} coupling_6j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} coupling_6j (@dots{})\n\ \n\ computes the Wigner 6-j coefficient,\n\ \n\ @example\n\ @group\n\ @{ja jb jc\n\ jd je jf@}\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_6J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 6; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_6j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_6j_e (x1, x2, x3, x4, x5, x6, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_6J_E undefined error ("GSL function gsl_sf_coupling_6j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_6J_E } // PKG_ADD: autoload ("gsl_sf_coupling_9j", which ("gsl_sf")); DEFUN_DLD(gsl_sf_coupling_9j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_coupling_9j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6}, @var{arg7}, @var{arg8}, @var{arg9})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_coupling_9j (@dots{})\n\ \n\ computes the Wigner 9-j coefficient,\n\ \n\ @example\n\ @group\n\ @{ja jb jc\n\ jd je jf\n\ jg jh ji@}\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_9J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 9; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); NDArray arg7 = args(6).array_value(); NDArray arg8 = args(7).array_value(); NDArray arg9 = args(8).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); bool arg7_scalar = check_arg_dim (arg7, dim, numel, conformant); bool arg8_scalar = check_arg_dim (arg8, dim, numel, conformant); bool arg9_scalar = check_arg_dim (arg9, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; octave_idx_type i7 = 0; octave_idx_type i8 = 0; octave_idx_type i9 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); octave_idx_type inc7 = (arg7_scalar ? 0 : 1); octave_idx_type inc8 = (arg8_scalar ? 0 : 1); octave_idx_type inc9 = (arg9_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); const double *arg7_data = arg7.data (); const double *arg8_data = arg8.data (); const double *arg9_data = arg9.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_9j_e (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_9j_e (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_9J_E undefined error ("GSL function gsl_sf_coupling_9j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_9J_E } // PKG_ADD: autoload ("coupling_9j", which ("gsl_sf")); DEFUN_DLD(coupling_9j, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} coupling_9j (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{arg5}, @var{arg6}, @var{arg7}, @var{arg8}, @var{arg9})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} coupling_9j (@dots{})\n\ \n\ computes the Wigner 9-j coefficient,\n\ \n\ @example\n\ @group\n\ @{ja jb jc\n\ jd je jf\n\ jg jh ji@}\n\ @end group\n\ @end example\n\ \n\ where the arguments are given in half-integer units,\n\ @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_COUPLING_9J_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 9; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); NDArray arg5 = args(4).array_value(); NDArray arg6 = args(5).array_value(); NDArray arg7 = args(6).array_value(); NDArray arg8 = args(7).array_value(); NDArray arg9 = args(8).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); bool arg5_scalar = check_arg_dim (arg5, dim, numel, conformant); bool arg6_scalar = check_arg_dim (arg6, dim, numel, conformant); bool arg7_scalar = check_arg_dim (arg7, dim, numel, conformant); bool arg8_scalar = check_arg_dim (arg8, dim, numel, conformant); bool arg9_scalar = check_arg_dim (arg9, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; octave_idx_type i5 = 0; octave_idx_type i6 = 0; octave_idx_type i7 = 0; octave_idx_type i8 = 0; octave_idx_type i9 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); octave_idx_type inc5 = (arg5_scalar ? 0 : 1); octave_idx_type inc6 = (arg6_scalar ? 0 : 1); octave_idx_type inc7 = (arg7_scalar ? 0 : 1); octave_idx_type inc8 = (arg8_scalar ? 0 : 1); octave_idx_type inc9 = (arg9_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); const double *arg5_data = arg5.data (); const double *arg6_data = arg6.data (); const double *arg7_data = arg7.data (); const double *arg8_data = arg8.data (); const double *arg9_data = arg9.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_9j_e (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4, i5 += inc5, i6 += inc6, i7 += inc7, i8 += inc8, i9 += inc9) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #3 to int double t3 = arg3_data[i3]; int x3 = static_cast (t3); if ((static_cast (x3)) != t3) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #4 to int double t4 = arg4_data[i4]; int x4 = static_cast (t4); if ((static_cast (x4)) != t4) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #5 to int double t5 = arg5_data[i5]; int x5 = static_cast (t5); if ((static_cast (x5)) != t5) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #6 to int double t6 = arg6_data[i6]; int x6 = static_cast (t6); if ((static_cast (x6)) != t6) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #7 to int double t7 = arg7_data[i7]; int x7 = static_cast (t7); if ((static_cast (x7)) != t7) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #8 to int double t8 = arg8_data[i8]; int x8 = static_cast (t8); if ((static_cast (x8)) != t8) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #9 to int double t9 = arg9_data[i9]; int x9 = static_cast (t9); if ((static_cast (x9)) != t9) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_coupling_9j_e (x1, x2, x3, x4, x5, x6, x7, x8, x9, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_COUPLING_9J_E undefined error ("GSL function gsl_sf_coupling_9j_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_COUPLING_9J_E } // PKG_ADD: autoload ("gsl_sf_bessel_jl_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_jl_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_jl_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_jl_array (@dots{})\n\ \n\ Computes the values of the regular spherical Bessel functions j_l(x)\n\ for l from 0 to lmax inclusive for lmax >= 0 and x >= 0. The values\n\ are computed using recurrence relations for efficiency, and therefore\n\ may differ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_JL_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_bessel_jl_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_JL_ARRAY undefined error ("GSL function gsl_sf_bessel_jl_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JL_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_jl_steed_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_jl_steed_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_jl_steed_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_jl_steed_array (@dots{})\n\ \n\ This routine uses Steed’s method to compute the values of the regular\n\ spherical Bessel functions j_l(x) for l from 0 to lmax inclusive for\n\ lmax >= 0 and x >= 0. The Steed/Barnett algorithm is described in\n\ Comp. Phys. Comm. 21, 297 (1981). Steed’s method is more stable than\n\ the recurrence used in the other functions but is also slower.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_JL_STEED_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_bessel_jl_steed_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_JL_STEED_ARRAY undefined error ("GSL function gsl_sf_bessel_jl_steed_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JL_STEED_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_il_scaled_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_il_scaled_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_il_scaled_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_il_scaled_array (@dots{})\n\ \n\ This routine computes the values of the scaled regular modified\n\ spherical Bessel functions \\exp(-|x|) i_l(x) for l from 0 to lmax\n\ inclusive for lmax >= 0. The values are computed using recurrence\n\ relations for efficiency, and therefore may differ slightly from the\n\ exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_IL_SCALED_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_bessel_il_scaled_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_IL_SCALED_ARRAY undefined error ("GSL function gsl_sf_bessel_il_scaled_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IL_SCALED_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_kl_scaled_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_kl_scaled_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_kl_scaled_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_kl_scaled_array (@dots{})\n\ \n\ This routine computes the values of the scaled irregular modified\n\ spherical Bessel functions \\exp(x) k_l(x) for l from 0 to lmax\n\ inclusive for lmax >= 0 and x>0. The values are computed using\n\ recurrence relations for efficiency, and therefore may differ slightly\n\ from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_KL_SCALED_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_bessel_kl_scaled_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_KL_SCALED_ARRAY undefined error ("GSL function gsl_sf_bessel_kl_scaled_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KL_SCALED_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_yl_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_yl_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_yl_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_yl_array (@dots{})\n\ \n\ This routine computes the values of the irregular spherical Bessel\n\ functions y_l(x) for l from 0 to lmax inclusive for lmax >= 0. The\n\ values are computed using recurrence relations for efficiency, and\n\ therefore may differ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_YL_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_bessel_yl_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_YL_ARRAY undefined error ("GSL function gsl_sf_bessel_yl_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YL_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_Pl_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Pl_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_Pl_array (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_legendre_Pl_array (@dots{})\n\ \n\ These functions compute arrays of Legendre polynomials P_l(x) and\n\ derivatives dP_l(x)/dx, for l = 0, \\dots, lmax, |x| <= 1.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_PL_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_legendre_Pl_array (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_LEGENDRE_PL_ARRAY undefined error ("GSL function gsl_sf_legendre_Pl_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PL_ARRAY } // PKG_ADD: autoload ("gsl_sf_gegenpoly_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_gegenpoly_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_gegenpoly_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_gegenpoly_array (@dots{})\n\ \n\ This function computes an array of Gegenbauer polynomials\n\ @math{C^{(\\lambda)}_n(x)} for n = 0, 1, 2, \\dots, nmax, subject to\n\ @math{\\lambda > -1/2}, @math{nmax} @geq{} @math{0}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_GEGENPOLY_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_gegenpoly_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_GEGENPOLY_ARRAY undefined error ("GSL function gsl_sf_gegenpoly_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_GEGENPOLY_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_In_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_In_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_In_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_In_array (@dots{})\n\ \n\ his routine computes the values of the regular modified cylindrical\n\ Bessel functions I_n(x) for n from nmin to nmax inclusive. The start\n\ of the range nmin must be positive or zero. The values are computed\n\ using recurrence relations for efficiency, and therefore may differ\n\ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_IN_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_In_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_IN_ARRAY undefined error ("GSL function gsl_sf_bessel_In_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_In_scaled_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_In_scaled_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_In_scaled_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_In_scaled_array (@dots{})\n\ \n\ This routine computes the values of the scaled regular cylindrical\n\ Bessel functions \\exp(-|x|) I_n(x) for n from nmin to nmax\n\ inclusive. The start of the range nmin must be positive or zero. The\n\ values are computed using recurrence relations for efficiency, and\n\ therefore may differ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_IN_SCALED_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_In_scaled_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_IN_SCALED_ARRAY undefined error ("GSL function gsl_sf_bessel_In_scaled_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_IN_SCALED_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_Jn_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Jn_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Jn_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_Jn_array (@dots{})\n\ \n\ This routine computes the values of the regular cylindrical Bessel\n\ functions J_n(x) for n from nmin to nmax inclusive. The values are\n\ computed using recurrence relations for efficiency, and therefore may\n\ differ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_JN_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_Jn_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_JN_ARRAY undefined error ("GSL function gsl_sf_bessel_Jn_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_JN_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_Kn_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Kn_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn_array (@dots{})\n\ \n\ This routine computes the values of the irregular modified cylindrical\n\ Bessel functions K_n(x) for n from nmin to nmax inclusive. The start\n\ of the range nmin must be positive or zero. The domain of the function\n\ is x>0. The values are computed using recurrence relations for\n\ efficiency, and therefore may differ slightly from the exact values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_KN_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_Kn_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_KN_ARRAY undefined error ("GSL function gsl_sf_bessel_Kn_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_Kn_scaled_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Kn_scaled_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn_scaled_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_Kn_scaled_array (@dots{})\n\ \n\ This routine computes the values of the scaled irregular cylindrical\n\ Bessel functions \\exp(x) K_n(x) for n from nmin to nmax inclusive. The\n\ start of the range nmin must be positive or zero. The domain of the\n\ function is x>0. The values are computed using recurrence relations\n\ for efficiency, and therefore may differ slightly from the exact\n\ values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_KN_SCALED_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_Kn_scaled_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_KN_SCALED_ARRAY undefined error ("GSL function gsl_sf_bessel_Kn_scaled_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_KN_SCALED_ARRAY } // PKG_ADD: autoload ("gsl_sf_bessel_Yn_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_bessel_Yn_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_bessel_Yn_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_bessel_Yn_array (@dots{})\n\ \n\ This routine computes the values of the irregular cylindrical Bessel\n\ functions Y_n(x) for n from nmin to nmax inclusive. The domain of the\n\ function is x>0. The values are computed using recurrence relations\n\ for efficiency, and therefore may differ slightly from the exact\n\ values.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_BESSEL_YN_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation gsl_sf_bessel_Yn_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_BESSEL_YN_ARRAY undefined error ("GSL function gsl_sf_bessel_Yn_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_BESSEL_YN_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_Plm_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Plm_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_Plm_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_legendre_Plm_array (@dots{})\n\ \n\ Compute arrays of Legendre polynomials P_l^m(x) for m >= 0, l = |m|,\n\ ..., lmax, |x| <= 1.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ \n\ @strong{DEPRECATION WARNING}: gsl_sf_legendre_Plm_array has been deprecated in GSL 2.0\n\ \n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_PLM_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_legendre_Plm_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_LEGENDRE_PLM_ARRAY undefined error ("GSL function gsl_sf_legendre_Plm_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PLM_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_Plm_deriv_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_Plm_deriv_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_Plm_deriv_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_Plm_deriv_array (@dots{})\n\ \n\ Compute arrays of Legendre polynomials P_l^m(x) and derivatives\n\ dP_l^m(x)/dx for m >= 0, l = |m|, ..., lmax, |x| <= 1.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ \n\ @strong{DEPRECATION WARNING}: gsl_sf_legendre_Plm_deriv_array has been deprecated in GSL 2.0\n\ \n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_PLM_DERIV_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); RowVector y2 (arg1+1); // Run the calculation gsl_sf_legendre_Plm_deriv_array (arg1, arg2, arg3, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_SF_LEGENDRE_PLM_DERIV_ARRAY undefined error ("GSL function gsl_sf_legendre_Plm_deriv_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_PLM_DERIV_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_sphPlm_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_sphPlm_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_sphPlm_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_legendre_sphPlm_array (@dots{})\n\ \n\ Computes an array of normalized associated Legendre functions\n\ @iftex\n\ @tex\n\ $\\\\sqrt{(2l+1)/(4\\\\pi)} \\\\sqrt{(l-m)!/(l+m)!} P_l^m(x)$\n\ for $m >= 0, l = |m|, ..., lmax, |x| <= 1.0$\n\ @end tex\n\ @end iftex\n\ @ifinfo\n\ sqrt((2l+1)/(4*pi)) * sqrt((l-m)!/(l+m)!) Plm (x)\n\ for m >= 0, l = |m|, ..., lmax, |x| <= 1.0\n\ @end ifinfo\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ \n\ @strong{DEPRECATION WARNING}: gsl_sf_legendre_sphPlm_array has been deprecated in GSL 2.0\n\ \n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_legendre_sphPlm_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY undefined error ("GSL function gsl_sf_legendre_sphPlm_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY } // PKG_ADD: autoload ("legendre_sphPlm_array", which ("gsl_sf")); DEFUN_DLD(legendre_sphPlm_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} legendre_sphPlm_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} legendre_sphPlm_array (@dots{})\n\ \n\ Computes an array of normalized associated Legendre functions\n\ @iftex\n\ @tex\n\ $\\\\sqrt{(2l+1)/(4\\\\pi)} \\\\sqrt{(l-m)!/(l+m)!} P_l^m(x)$\n\ for $m >= 0, l = |m|, ..., lmax, |x| <= 1.0$\n\ @end tex\n\ @end iftex\n\ @ifinfo\n\ sqrt((2l+1)/(4*pi)) * sqrt((l-m)!/(l+m)!) Plm (x)\n\ for m >= 0, l = |m|, ..., lmax, |x| <= 1.0\n\ @end ifinfo\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ \n\ @strong{DEPRECATION WARNING}: gsl_sf_legendre_sphPlm_array has been deprecated in GSL 2.0\n\ \n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation gsl_sf_legendre_sphPlm_array (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY undefined error ("GSL function gsl_sf_legendre_sphPlm_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_sphPlm_deriv_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_sphPlm_deriv_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_sphPlm_deriv_array (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_sphPlm_deriv_array (@dots{})\n\ \n\ Computes an array of normalized associated Legendre functions\n\ @iftex\n\ @tex\n\ $\\\\sqrt{(2l+1)/(4\\\\pi)} \\\\sqrt{(l-m)!/(l+m)!} P_l^m(x)$\n\ for $m \\geq 0, l = |m|, ..., lmax, |x| <= 1.0$\n\ @end tex\n\ @end iftex\n\ @ifinfo\n\ sqrt((2l+1)/(4*pi)) * sqrt((l-m)!/(l+m)!) Plm (x)\n\ for m >= 0, l = |m|, ..., lmax, |x| <= 1.0\n\ @end ifinfo\n\ and their derivatives.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ \n\ @strong{DEPRECATION WARNING}: gsl_sf_legendre_sphPlm_deriv_array has been deprecated in GSL 2.0\n\ \n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_SPHPLM_DERIV_ARRAY gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); RowVector y2 (arg1+1); // Run the calculation gsl_sf_legendre_sphPlm_deriv_array (arg1, arg2, arg3, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_SF_LEGENDRE_SPHPLM_DERIV_ARRAY undefined error ("GSL function gsl_sf_legendre_sphPlm_deriv_array was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_SPHPLM_DERIV_ARRAY } // PKG_ADD: autoload ("gsl_sf_legendre_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_legendre_array (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {@var{z} =} gsl_sf_legendre_array (@dots{})\n\ \n\ Calculate all normalized associated Legendre polynomials for 0 <= l <=\n\ lmax and 0 <= m <= l for |x| <= 1. The norm parameter specifies which\n\ normalization is used. The array index of P_l^m is given by\n\ l(l+1)/2+m. To include or exclude the Condon-Shortley phase factor of\n\ (-1)^m, set the fourth parameter to either -1 or 1, respectively.\n\ \n\ \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_ARRAY_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); // Run the calculation gsl_sf_legendre_array_e (legnorm, arg2, arg3, arg4, y1.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); return octave_value (y1); #else // HAVE_GSL_SF_LEGENDRE_ARRAY_E undefined error ("GSL function gsl_sf_legendre_array_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_ARRAY_E } // PKG_ADD: autoload ("gsl_sf_legendre_deriv_array", which ("gsl_sf")); DEFUN_DLD(gsl_sf_legendre_deriv_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_deriv_array (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} gsl_sf_legendre_deriv_array (@dots{})\n\ \n\ Calculate all normalized associated Legendre polynomials and their\n\ first derivatives for 0 <= l <= lmax and 0 <= m <= l for |x| <= 1. The\n\ norm parameter specifies which normalization is used. The array index\n\ of P_l^m is given by l(l+1)/2+m. To include or exclude the\n\ Condon-Shortley phase factor of (-1)^m, set the fourth parameter to\n\ either -1 or 1, respectively.\n\ \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_DERIV_ARRAY_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); RowVector y2 (gsl_sf_legendre_array_n (arg2)); // Run the calculation gsl_sf_legendre_deriv_array_e (legnorm, arg2, arg3, arg4, y1.fortran_vec (), y2.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y2.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_SF_LEGENDRE_DERIV_ARRAY_E undefined error ("GSL function gsl_sf_legendre_deriv_array_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_DERIV_ARRAY_E } // PKG_ADD: autoload ("legendre_deriv2_array", which ("gsl_sf")); DEFUN_DLD(legendre_deriv2_array, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2, z3 ) =} legendre_deriv2_array (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {( z1, z2, z3 ) =} legendre_deriv2_array (@dots{})\n\ \n\ Calculate all normalized associated Legendre polynomials and their\n\ first and second derivatives for 0 <= l <= lmax and 0 <= m <= l for |x| <= 1. The\n\ norm parameter specifies which normalization is used. The array index\n\ of P_l^m is given by l(l+1)/2+m. To include or exclude the\n\ Condon-Shortley phase factor of (-1)^m, set the fourth parameter to\n\ either -1 or 1, respectively.\n\ \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n\ ") { #ifdef HAVE_GSL_SF_LEGENDRE_DERIV2_ARRAY_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); RowVector y2 (gsl_sf_legendre_array_n (arg2)); RowVector y3 (gsl_sf_legendre_array_n (arg2)); // Run the calculation gsl_sf_legendre_deriv2_array_e (legnorm, arg2, arg3, arg4, y1.fortran_vec (), y2.fortran_vec (), y3.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y2.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y3.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); retval(2) = octave_value (y3); return retval; #else // HAVE_GSL_SF_LEGENDRE_DERIV2_ARRAY_E undefined error ("GSL function gsl_sf_legendre_deriv2_array_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_LEGENDRE_DERIV2_ARRAY_E } // PKG_ADD: autoload ("gsl_sf_zeta", which ("gsl_sf")); DEFUN_DLD(gsl_sf_zeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_zeta (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_zeta (@dots{})\n\ \n\ Computes the Riemann zeta function \\zeta(s) for\n\ arbitrary s, s \\ne 1.\n\ \n\ The Riemann zeta function is defined by the infinite sum\n\ \\zeta(s) = \\sum_@{k=1@}^\\infty k^@{-s@}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETA_E undefined error ("GSL function gsl_sf_zeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETA_E } // PKG_ADD: autoload ("gsl_zt_zeta", which ("gsl_sf")); DEFUN_DLD(gsl_zt_zeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_zt_zeta (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_zt_zeta (@dots{})\n\ \n\ Computes the Riemann zeta function \\zeta(s) for\n\ arbitrary s, s \\ne 1.\n\ \n\ The Riemann zeta function is defined by the infinite sum\n\ \\zeta(s) = \\sum_@{k=1@}^\\infty k^@{-s@}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETA_E undefined error ("GSL function gsl_sf_zeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETA_E } // PKG_ADD: autoload ("zeta", which ("gsl_sf")); DEFUN_DLD(zeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} zeta (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} zeta (@dots{})\n\ \n\ Computes the Riemann zeta function \\zeta(s) for\n\ arbitrary s, s \\ne 1.\n\ \n\ The Riemann zeta function is defined by the infinite sum\n\ \\zeta(s) = \\sum_@{k=1@}^\\infty k^@{-s@}.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zeta_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETA_E undefined error ("GSL function gsl_sf_zeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETA_E } // PKG_ADD: autoload ("gsl_sf_zeta_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_zeta_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_zeta_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_zeta_int (@dots{})\n\ \n\ Computes the Riemann zeta function \\zeta(n) for\n\ integer n, n \\ne 1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETA_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zeta_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zeta_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETA_INT_E undefined error ("GSL function gsl_sf_zeta_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETA_INT_E } // PKG_ADD: autoload ("zeta_int", which ("gsl_sf")); DEFUN_DLD(zeta_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} zeta_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} zeta_int (@dots{})\n\ \n\ Computes the Riemann zeta function \\zeta(n) for\n\ integer n, n \\ne 1.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETA_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zeta_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zeta_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETA_INT_E undefined error ("GSL function gsl_sf_zeta_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETA_INT_E } // PKG_ADD: autoload ("gsl_sf_zetam1", which ("gsl_sf")); DEFUN_DLD(gsl_sf_zetam1, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_zetam1 (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_zetam1 (@dots{})\n\ \n\ Computes \\zeta(s) - 1 for arbitrary s, s \\ne 1, where \\zeta\n\ denotes the Riemann zeta function.\n\ \n\ @seealso{gsl_sf_zeta}\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETAM1_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zetam1_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_zetam1_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETAM1_E undefined error ("GSL function gsl_sf_zetam1_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETAM1_E } // PKG_ADD: autoload ("gsl_sf_zetam1_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_zetam1_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_zetam1_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_zetam1_int (@dots{})\n\ \n\ Computes \\zeta(s) - 1 for integer n, n \\ne 1, where \\zeta\n\ denotes the Riemann zeta function.\n\ \n\ @seealso{gsl_sf_zetam1, gsl_sf_zeta, gsl_sf_zeta_int}\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ZETAM1_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zetam1_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_zetam1_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ZETAM1_INT_E undefined error ("GSL function gsl_sf_zetam1_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ZETAM1_INT_E } // PKG_ADD: autoload ("gsl_sf_eta", which ("gsl_sf")); DEFUN_DLD(gsl_sf_eta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_eta (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_eta (@dots{})\n\ \n\ Computes the eta function \\eta(s) for arbitrary s.\n\ \n\ The eta function is defined by \\eta(s) = (1-2^@{1-s@}) \\zeta\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_eta_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_eta_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ETA_E undefined error ("GSL function gsl_sf_eta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ETA_E } // PKG_ADD: autoload ("eta", which ("gsl_sf")); DEFUN_DLD(eta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} eta (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} eta (@dots{})\n\ \n\ Computes the eta function \\eta(s) for arbitrary s.\n\ \n\ The eta function is defined by \\eta(s) = (1-2^@{1-s@}) \\zeta\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_eta_e (arg1_data[i], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { gsl_sf_eta_e (arg1_data[i], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ETA_E undefined error ("GSL function gsl_sf_eta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ETA_E } // PKG_ADD: autoload ("gsl_sf_eta_int", which ("gsl_sf")); DEFUN_DLD(gsl_sf_eta_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_eta_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_eta_int (@dots{})\n\ \n\ Computes the eta function \\eta(n) for integer n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ETA_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_eta_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_eta_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ETA_INT_E undefined error ("GSL function gsl_sf_eta_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ETA_INT_E } // PKG_ADD: autoload ("eta_int", which ("gsl_sf")); DEFUN_DLD(eta_int, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} eta_int (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} eta_int (@dots{})\n\ \n\ Computes the eta function \\eta(n) for integer n.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_ETA_INT_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_eta_int_e (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } gsl_sf_eta_int_e (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_ETA_INT_E undefined error ("GSL function gsl_sf_eta_int_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_ETA_INT_E } // PKG_ADD: autoload ("gsl_sf_hzeta", which ("gsl_sf")); DEFUN_DLD(gsl_sf_hzeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} gsl_sf_hzeta (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} gsl_sf_hzeta (@dots{})\n\ \n\ Computes the Hurwitz zeta function \\zeta(s,q)\n\ for s > 1, q > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HZETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hzeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hzeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HZETA_E undefined error ("GSL function gsl_sf_hzeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HZETA_E } // PKG_ADD: autoload ("hzeta", which ("gsl_sf")); DEFUN_DLD(hzeta, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} hzeta (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} hzeta (@dots{})\n\ \n\ Computes the Hurwitz zeta function \\zeta(s,q)\n\ for s > 1, q > 0.\n\ \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ @end deftypefn\n") { #ifdef HAVE_GSL_SF_HZETA_E gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hzeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { gsl_sf_hzeta_e (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_SF_HZETA_E undefined error ("GSL function gsl_sf_hzeta_e was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_SF_HZETA_E } gsl-2.1.1/src/PaxHeaders.7911/IID_D.template.cc0000644000000000000000000000013213311744162015540 xustar0030 mtime=1529333874.175776751 30 atime=1529333875.791775446 30 ctime=1529333876.223775085 gsl-2.1.1/src/IID_D.template.cc0000644000175000017500000001103013311744162015771 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to int double t2 = arg2_data[i2]; int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/LID_DD_array.template.cc0000644000000000000000000000013213311744162017045 xustar0030 mtime=1529333874.287776663 30 atime=1529333876.091775197 30 ctime=1529333876.223775085 gsl-2.1.1/src/LID_DD_array.template.cc0000644000175000017500000000674113311744162017313 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); RowVector y2 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/LID_D_array.template.cc0000644000000000000000000000013013311744162016737 xustar0030 mtime=1529333874.279776669 28 atime=1529333876.0877752 30 ctime=1529333876.223775085 gsl-2.1.1/src/LID_D_array.template.cc0000644000175000017500000000653413311744162017207 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/UU_D.template.cc0000644000000000000000000000013213311744162015464 xustar0030 mtime=1529333874.211776722 30 atime=1529333875.939775324 30 ctime=1529333876.223775085 gsl-2.1.1/src/UU_D.template.cc0000644000175000017500000001053213311744162015723 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to unsigned int double t1 = arg1_data[i1]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } // Convert argument #2 to unsigned int double t2 = arg2_data[i2]; unsigned int x2 = static_cast (t2); if ((static_cast (x2)) != t2) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, x2, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/LDD_D_array.template.cc0000644000000000000000000000013213311744162016734 xustar0030 mtime=1529333874.255776687 30 atime=1529333876.035775244 30 ctime=1529333876.223775085 gsl-2.1.1/src/LDD_D_array.template.cc0000644000175000017500000000524013311744162017173 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/LDD_DD_array.template.cc0000644000000000000000000000013213311744162017040 xustar0030 mtime=1529333874.263776682 30 atime=1529333874.255776687 30 ctime=1529333876.223775085 gsl-2.1.1/src/LDD_DD_array.template.cc0000644000175000017500000000544513311744162017306 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); RowVector y2 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/NSDD_DD_array.template.cc0000644000000000000000000000013213311744162017165 xustar0030 mtime=1529333874.303776649 30 atime=1529333876.127775166 30 ctime=1529333876.223775085 gsl-2.1.1/src/NSDD_DD_array.template.cc0000644000175000017500000001020413311744162017420 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); RowVector y2 (gsl_sf_legendre_array_n (arg2)); // Run the calculation GSL_FUNC_NAME (legnorm, arg2, arg3, arg4, y1.fortran_vec (), y2.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); y2.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/DD_D.template.cc0000644000000000000000000000013213311744162015422 xustar0030 mtime=1529333874.075776831 30 atime=1529333875.163775962 30 ctime=1529333876.223775085 gsl-2.1.1/src/DD_D.template.cc0000644000175000017500000000620013311744162015656 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/config.h.in0000644000000000000000000000006213311744161014573 xustar0020 atime=1529333873 30 ctime=1529333876.223775085 gsl-2.1.1/src/config.h.in0000755000175000017500000004455613311744161015050 0ustar00bectbect00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if you have the `gsl_sf_airy_Ai_deriv_e' function. */ #undef HAVE_GSL_SF_AIRY_AI_DERIV_E /* Define to 1 if you have the `gsl_sf_airy_Ai_deriv_scaled_e' function. */ #undef HAVE_GSL_SF_AIRY_AI_DERIV_SCALED_E /* Define to 1 if you have the `gsl_sf_airy_Ai_e' function. */ #undef HAVE_GSL_SF_AIRY_AI_E /* Define to 1 if you have the `gsl_sf_airy_Ai_scaled_e' function. */ #undef HAVE_GSL_SF_AIRY_AI_SCALED_E /* Define to 1 if you have the `gsl_sf_airy_Bi_deriv_e' function. */ #undef HAVE_GSL_SF_AIRY_BI_DERIV_E /* Define to 1 if you have the `gsl_sf_airy_Bi_deriv_scaled_e' function. */ #undef HAVE_GSL_SF_AIRY_BI_DERIV_SCALED_E /* Define to 1 if you have the `gsl_sf_airy_Bi_e' function. */ #undef HAVE_GSL_SF_AIRY_BI_E /* Define to 1 if you have the `gsl_sf_airy_Bi_scaled_e' function. */ #undef HAVE_GSL_SF_AIRY_BI_SCALED_E /* Define to 1 if you have the `gsl_sf_airy_zero_Ai_deriv_e' function. */ #undef HAVE_GSL_SF_AIRY_ZERO_AI_DERIV_E /* Define to 1 if you have the `gsl_sf_airy_zero_Ai_e' function. */ #undef HAVE_GSL_SF_AIRY_ZERO_AI_E /* Define to 1 if you have the `gsl_sf_airy_zero_Bi_deriv_e' function. */ #undef HAVE_GSL_SF_AIRY_ZERO_BI_DERIV_E /* Define to 1 if you have the `gsl_sf_airy_zero_Bi_e' function. */ #undef HAVE_GSL_SF_AIRY_ZERO_BI_E /* Define to 1 if you have the `gsl_sf_atanint_e' function. */ #undef HAVE_GSL_SF_ATANINT_E /* Define to 1 if you have the `gsl_sf_bessel_il_scaled_array' function. */ #undef HAVE_GSL_SF_BESSEL_IL_SCALED_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_il_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_IL_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_Inu_e' function. */ #undef HAVE_GSL_SF_BESSEL_INU_E /* Define to 1 if you have the `gsl_sf_bessel_Inu_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_INU_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_In_array' function. */ #undef HAVE_GSL_SF_BESSEL_IN_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_In_e' function. */ #undef HAVE_GSL_SF_BESSEL_IN_E /* Define to 1 if you have the `gsl_sf_bessel_In_scaled_array' function. */ #undef HAVE_GSL_SF_BESSEL_IN_SCALED_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_In_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_IN_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_jl_array' function. */ #undef HAVE_GSL_SF_BESSEL_JL_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_jl_e' function. */ #undef HAVE_GSL_SF_BESSEL_JL_E /* Define to 1 if you have the `gsl_sf_bessel_jl_steed_array' function. */ #undef HAVE_GSL_SF_BESSEL_JL_STEED_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_Jnu_e' function. */ #undef HAVE_GSL_SF_BESSEL_JNU_E /* Define to 1 if you have the `gsl_sf_bessel_Jn_array' function. */ #undef HAVE_GSL_SF_BESSEL_JN_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_Jn_e' function. */ #undef HAVE_GSL_SF_BESSEL_JN_E /* Define to 1 if you have the `gsl_sf_bessel_kl_scaled_array' function. */ #undef HAVE_GSL_SF_BESSEL_KL_SCALED_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_kl_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_KL_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_Knu_e' function. */ #undef HAVE_GSL_SF_BESSEL_KNU_E /* Define to 1 if you have the `gsl_sf_bessel_Knu_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_KNU_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_Kn_array' function. */ #undef HAVE_GSL_SF_BESSEL_KN_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_Kn_e' function. */ #undef HAVE_GSL_SF_BESSEL_KN_E /* Define to 1 if you have the `gsl_sf_bessel_Kn_scaled_array' function. */ #undef HAVE_GSL_SF_BESSEL_KN_SCALED_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_Kn_scaled_e' function. */ #undef HAVE_GSL_SF_BESSEL_KN_SCALED_E /* Define to 1 if you have the `gsl_sf_bessel_lnKnu_e' function. */ #undef HAVE_GSL_SF_BESSEL_LNKNU_E /* Define to 1 if you have the `gsl_sf_bessel_yl_array' function. */ #undef HAVE_GSL_SF_BESSEL_YL_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_yl_e' function. */ #undef HAVE_GSL_SF_BESSEL_YL_E /* Define to 1 if you have the `gsl_sf_bessel_Ynu_e' function. */ #undef HAVE_GSL_SF_BESSEL_YNU_E /* Define to 1 if you have the `gsl_sf_bessel_Yn_array' function. */ #undef HAVE_GSL_SF_BESSEL_YN_ARRAY /* Define to 1 if you have the `gsl_sf_bessel_Yn_e' function. */ #undef HAVE_GSL_SF_BESSEL_YN_E /* Define to 1 if you have the `gsl_sf_bessel_zero_J0_e' function. */ #undef HAVE_GSL_SF_BESSEL_ZERO_J0_E /* Define to 1 if you have the `gsl_sf_bessel_zero_J1_e' function. */ #undef HAVE_GSL_SF_BESSEL_ZERO_J1_E /* Define to 1 if you have the `gsl_sf_bessel_zero_Jnu_e' function. */ #undef HAVE_GSL_SF_BESSEL_ZERO_JNU_E /* Define to 1 if you have the `gsl_sf_beta_e' function. */ #undef HAVE_GSL_SF_BETA_E /* Define to 1 if you have the `gsl_sf_beta_inc_e' function. */ #undef HAVE_GSL_SF_BETA_INC_E /* Define to 1 if you have the `gsl_sf_Chi_e' function. */ #undef HAVE_GSL_SF_CHI_E /* Define to 1 if you have the `gsl_sf_choose_e' function. */ #undef HAVE_GSL_SF_CHOOSE_E /* Define to 1 if you have the `gsl_sf_Ci_e' function. */ #undef HAVE_GSL_SF_CI_E /* Define to 1 if you have the `gsl_sf_clausen_e' function. */ #undef HAVE_GSL_SF_CLAUSEN_E /* Define to 1 if you have the `gsl_sf_conicalP_0_e' function. */ #undef HAVE_GSL_SF_CONICALP_0_E /* Define to 1 if you have the `gsl_sf_conicalP_1_e' function. */ #undef HAVE_GSL_SF_CONICALP_1_E /* Define to 1 if you have the `gsl_sf_conicalP_cyl_reg_e' function. */ #undef HAVE_GSL_SF_CONICALP_CYL_REG_E /* Define to 1 if you have the `gsl_sf_conicalP_half_e' function. */ #undef HAVE_GSL_SF_CONICALP_HALF_E /* Define to 1 if you have the `gsl_sf_conicalP_mhalf_e' function. */ #undef HAVE_GSL_SF_CONICALP_MHALF_E /* Define to 1 if you have the `gsl_sf_conicalP_sph_reg_e' function. */ #undef HAVE_GSL_SF_CONICALP_SPH_REG_E /* Define to 1 if you have the `gsl_sf_coupling_3j_e' function. */ #undef HAVE_GSL_SF_COUPLING_3J_E /* Define to 1 if you have the `gsl_sf_coupling_6j_e' function. */ #undef HAVE_GSL_SF_COUPLING_6J_E /* Define to 1 if you have the `gsl_sf_coupling_9j_e' function. */ #undef HAVE_GSL_SF_COUPLING_9J_E /* Define to 1 if you have the `gsl_sf_dawson_e' function. */ #undef HAVE_GSL_SF_DAWSON_E /* Define to 1 if you have the `gsl_sf_debye_1_e' function. */ #undef HAVE_GSL_SF_DEBYE_1_E /* Define to 1 if you have the `gsl_sf_debye_2_e' function. */ #undef HAVE_GSL_SF_DEBYE_2_E /* Define to 1 if you have the `gsl_sf_debye_3_e' function. */ #undef HAVE_GSL_SF_DEBYE_3_E /* Define to 1 if you have the `gsl_sf_debye_4_e' function. */ #undef HAVE_GSL_SF_DEBYE_4_E /* Define to 1 if you have the `gsl_sf_debye_5_e' function. */ #undef HAVE_GSL_SF_DEBYE_5_E /* Define to 1 if you have the `gsl_sf_debye_6_e' function. */ #undef HAVE_GSL_SF_DEBYE_6_E /* Define to 1 if you have the `gsl_sf_dilog_e' function. */ #undef HAVE_GSL_SF_DILOG_E /* Define to 1 if you have the `gsl_sf_doublefact_e' function. */ #undef HAVE_GSL_SF_DOUBLEFACT_E /* Define to 1 if you have the `gsl_sf_ellint_D_e' function. */ #undef HAVE_GSL_SF_ELLINT_D_E /* Define to 1 if you have the `gsl_sf_ellint_Ecomp_e' function. */ #undef HAVE_GSL_SF_ELLINT_ECOMP_E /* Define to 1 if you have the `gsl_sf_ellint_E_e' function. */ #undef HAVE_GSL_SF_ELLINT_E_E /* Define to 1 if you have the `gsl_sf_ellint_F_e' function. */ #undef HAVE_GSL_SF_ELLINT_F_E /* Define to 1 if you have the `gsl_sf_ellint_Kcomp_e' function. */ #undef HAVE_GSL_SF_ELLINT_KCOMP_E /* Define to 1 if you have the `gsl_sf_ellint_Pcomp_e' function. */ #undef HAVE_GSL_SF_ELLINT_PCOMP_E /* Define to 1 if you have the `gsl_sf_ellint_P_e' function. */ #undef HAVE_GSL_SF_ELLINT_P_E /* Define to 1 if you have the `gsl_sf_ellint_RC_e' function. */ #undef HAVE_GSL_SF_ELLINT_RC_E /* Define to 1 if you have the `gsl_sf_ellint_RD_e' function. */ #undef HAVE_GSL_SF_ELLINT_RD_E /* Define to 1 if you have the `gsl_sf_ellint_RF_e' function. */ #undef HAVE_GSL_SF_ELLINT_RF_E /* Define to 1 if you have the `gsl_sf_ellint_RJ_e' function. */ #undef HAVE_GSL_SF_ELLINT_RJ_E /* Define to 1 if you have the `gsl_sf_erfc_e' function. */ #undef HAVE_GSL_SF_ERFC_E /* Define to 1 if you have the `gsl_sf_erf_e' function. */ #undef HAVE_GSL_SF_ERF_E /* Define to 1 if you have the `gsl_sf_erf_Q_e' function. */ #undef HAVE_GSL_SF_ERF_Q_E /* Define to 1 if you have the `gsl_sf_erf_Z_e' function. */ #undef HAVE_GSL_SF_ERF_Z_E /* Define to 1 if you have the `gsl_sf_eta_e' function. */ #undef HAVE_GSL_SF_ETA_E /* Define to 1 if you have the `gsl_sf_eta_int_e' function. */ #undef HAVE_GSL_SF_ETA_INT_E /* Define to 1 if you have the `gsl_sf_expint_3_e' function. */ #undef HAVE_GSL_SF_EXPINT_3_E /* Define to 1 if you have the `gsl_sf_expint_E1_e' function. */ #undef HAVE_GSL_SF_EXPINT_E1_E /* Define to 1 if you have the `gsl_sf_expint_E2_e' function. */ #undef HAVE_GSL_SF_EXPINT_E2_E /* Define to 1 if you have the `gsl_sf_expint_Ei_e' function. */ #undef HAVE_GSL_SF_EXPINT_EI_E /* Define to 1 if you have the `gsl_sf_expm1_e' function. */ #undef HAVE_GSL_SF_EXPM1_E /* Define to 1 if you have the `gsl_sf_exprel_2_e' function. */ #undef HAVE_GSL_SF_EXPREL_2_E /* Define to 1 if you have the `gsl_sf_exprel_e' function. */ #undef HAVE_GSL_SF_EXPREL_E /* Define to 1 if you have the `gsl_sf_exprel_n_e' function. */ #undef HAVE_GSL_SF_EXPREL_N_E /* Define to 1 if you have the `gsl_sf_exp_mult_e' function. */ #undef HAVE_GSL_SF_EXP_MULT_E /* Define to 1 if you have the `gsl_sf_fact_e' function. */ #undef HAVE_GSL_SF_FACT_E /* Define to 1 if you have the `gsl_sf_fermi_dirac_3half_e' function. */ #undef HAVE_GSL_SF_FERMI_DIRAC_3HALF_E /* Define to 1 if you have the `gsl_sf_fermi_dirac_half_e' function. */ #undef HAVE_GSL_SF_FERMI_DIRAC_HALF_E /* Define to 1 if you have the `gsl_sf_fermi_dirac_inc_0_e' function. */ #undef HAVE_GSL_SF_FERMI_DIRAC_INC_0_E /* Define to 1 if you have the `gsl_sf_fermi_dirac_int_e' function. */ #undef HAVE_GSL_SF_FERMI_DIRAC_INT_E /* Define to 1 if you have the `gsl_sf_fermi_dirac_mhalf_e' function. */ #undef HAVE_GSL_SF_FERMI_DIRAC_MHALF_E /* Define to 1 if you have the `gsl_sf_gammainv_e' function. */ #undef HAVE_GSL_SF_GAMMAINV_E /* Define to 1 if you have the `gsl_sf_gammastar_e' function. */ #undef HAVE_GSL_SF_GAMMASTAR_E /* Define to 1 if you have the `gsl_sf_gamma_e' function. */ #undef HAVE_GSL_SF_GAMMA_E /* Define to 1 if you have the `gsl_sf_gamma_inc_e' function. */ #undef HAVE_GSL_SF_GAMMA_INC_E /* Define to 1 if you have the `gsl_sf_gamma_inc_P_e' function. */ #undef HAVE_GSL_SF_GAMMA_INC_P_E /* Define to 1 if you have the `gsl_sf_gamma_inc_Q_e' function. */ #undef HAVE_GSL_SF_GAMMA_INC_Q_E /* Define to 1 if you have the `gsl_sf_gegenpoly_array' function. */ #undef HAVE_GSL_SF_GEGENPOLY_ARRAY /* Define to 1 if you have the `gsl_sf_gegenpoly_n_e' function. */ #undef HAVE_GSL_SF_GEGENPOLY_N_E /* Define to 1 if you have the `gsl_sf_hazard_e' function. */ #undef HAVE_GSL_SF_HAZARD_E /* Define to 1 if you have the `gsl_sf_hydrogenicR_e' function. */ #undef HAVE_GSL_SF_HYDROGENICR_E /* Define to 1 if you have the `gsl_sf_hyperg_0F1_e' function. */ #undef HAVE_GSL_SF_HYPERG_0F1_E /* Define to 1 if you have the `gsl_sf_hyperg_1F1_e' function. */ #undef HAVE_GSL_SF_HYPERG_1F1_E /* Define to 1 if you have the `gsl_sf_hyperg_1F1_int_e' function. */ #undef HAVE_GSL_SF_HYPERG_1F1_INT_E /* Define to 1 if you have the `gsl_sf_hyperg_2F0_e' function. */ #undef HAVE_GSL_SF_HYPERG_2F0_E /* Define to 1 if you have the `gsl_sf_hyperg_2F1_e' function. */ #undef HAVE_GSL_SF_HYPERG_2F1_E /* Define to 1 if you have the `gsl_sf_hyperg_U_e' function. */ #undef HAVE_GSL_SF_HYPERG_U_E /* Define to 1 if you have the `gsl_sf_hyperg_U_int_e' function. */ #undef HAVE_GSL_SF_HYPERG_U_INT_E /* Define to 1 if you have the `gsl_sf_hzeta_e' function. */ #undef HAVE_GSL_SF_HZETA_E /* Define to 1 if you have the `gsl_sf_laguerre_n_e' function. */ #undef HAVE_GSL_SF_LAGUERRE_N_E /* Define to 1 if you have the `gsl_sf_lambert_W0_e' function. */ #undef HAVE_GSL_SF_LAMBERT_W0_E /* Define to 1 if you have the `gsl_sf_lambert_Wm1_e' function. */ #undef HAVE_GSL_SF_LAMBERT_WM1_E /* Define to 1 if you have the `gsl_sf_legendre_array_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_ARRAY_E /* Define to 1 if you have the `gsl_sf_legendre_deriv2_array_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_DERIV2_ARRAY_E /* Define to 1 if you have the `gsl_sf_legendre_deriv_array_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_DERIV_ARRAY_E /* Define to 1 if you have the `gsl_sf_legendre_Plm_array' function. */ #undef HAVE_GSL_SF_LEGENDRE_PLM_ARRAY /* Define to 1 if you have the `gsl_sf_legendre_Plm_deriv_array' function. */ #undef HAVE_GSL_SF_LEGENDRE_PLM_DERIV_ARRAY /* Define to 1 if you have the `gsl_sf_legendre_Plm_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_PLM_E /* Define to 1 if you have the `gsl_sf_legendre_Pl_array' function. */ #undef HAVE_GSL_SF_LEGENDRE_PL_ARRAY /* Define to 1 if you have the `gsl_sf_legendre_Pl_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_PL_E /* Define to 1 if you have the `gsl_sf_legendre_Ql_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_QL_E /* Define to 1 if you have the `gsl_sf_legendre_sphPlm_array' function. */ #undef HAVE_GSL_SF_LEGENDRE_SPHPLM_ARRAY /* Define to 1 if you have the `gsl_sf_legendre_sphPlm_deriv_array' function. */ #undef HAVE_GSL_SF_LEGENDRE_SPHPLM_DERIV_ARRAY /* Define to 1 if you have the `gsl_sf_legendre_sphPlm_e' function. */ #undef HAVE_GSL_SF_LEGENDRE_SPHPLM_E /* Define to 1 if you have the `gsl_sf_lnbeta_e' function. */ #undef HAVE_GSL_SF_LNBETA_E /* Define to 1 if you have the `gsl_sf_lnchoose_e' function. */ #undef HAVE_GSL_SF_LNCHOOSE_E /* Define to 1 if you have the `gsl_sf_lncosh_e' function. */ #undef HAVE_GSL_SF_LNCOSH_E /* Define to 1 if you have the `gsl_sf_lndoublefact_e' function. */ #undef HAVE_GSL_SF_LNDOUBLEFACT_E /* Define to 1 if you have the `gsl_sf_lnfact_e' function. */ #undef HAVE_GSL_SF_LNFACT_E /* Define to 1 if you have the `gsl_sf_lngamma_e' function. */ #undef HAVE_GSL_SF_LNGAMMA_E /* Define to 1 if you have the `gsl_sf_lnpoch_e' function. */ #undef HAVE_GSL_SF_LNPOCH_E /* Define to 1 if you have the `gsl_sf_lnsinh_e' function. */ #undef HAVE_GSL_SF_LNSINH_E /* Define to 1 if you have the `gsl_sf_log_1plusx_e' function. */ #undef HAVE_GSL_SF_LOG_1PLUSX_E /* Define to 1 if you have the `gsl_sf_log_1plusx_mx_e' function. */ #undef HAVE_GSL_SF_LOG_1PLUSX_MX_E /* Define to 1 if you have the `gsl_sf_log_erfc_e' function. */ #undef HAVE_GSL_SF_LOG_ERFC_E /* Define to 1 if you have the `gsl_sf_mathieu_a_e' function. */ #undef HAVE_GSL_SF_MATHIEU_A_E /* Define to 1 if you have the `gsl_sf_mathieu_b_e' function. */ #undef HAVE_GSL_SF_MATHIEU_B_E /* Define to 1 if you have the `gsl_sf_mathieu_ce_e' function. */ #undef HAVE_GSL_SF_MATHIEU_CE_E /* Define to 1 if you have the `gsl_sf_mathieu_Mc_e' function. */ #undef HAVE_GSL_SF_MATHIEU_MC_E /* Define to 1 if you have the `gsl_sf_mathieu_Ms_e' function. */ #undef HAVE_GSL_SF_MATHIEU_MS_E /* Define to 1 if you have the `gsl_sf_mathieu_se_e' function. */ #undef HAVE_GSL_SF_MATHIEU_SE_E /* Define to 1 if you have the `gsl_sf_pochrel_e' function. */ #undef HAVE_GSL_SF_POCHREL_E /* Define to 1 if you have the `gsl_sf_poch_e' function. */ #undef HAVE_GSL_SF_POCH_E /* Define to 1 if you have the `gsl_sf_psi_1piy_e' function. */ #undef HAVE_GSL_SF_PSI_1PIY_E /* Define to 1 if you have the `gsl_sf_psi_1_int_e' function. */ #undef HAVE_GSL_SF_PSI_1_INT_E /* Define to 1 if you have the `gsl_sf_psi_e' function. */ #undef HAVE_GSL_SF_PSI_E /* Define to 1 if you have the `gsl_sf_psi_n_e' function. */ #undef HAVE_GSL_SF_PSI_N_E /* Define to 1 if you have the `gsl_sf_Shi_e' function. */ #undef HAVE_GSL_SF_SHI_E /* Define to 1 if you have the `gsl_sf_sinc_e' function. */ #undef HAVE_GSL_SF_SINC_E /* Define to 1 if you have the `gsl_sf_Si_e' function. */ #undef HAVE_GSL_SF_SI_E /* Define to 1 if you have the `gsl_sf_synchrotron_1_e' function. */ #undef HAVE_GSL_SF_SYNCHROTRON_1_E /* Define to 1 if you have the `gsl_sf_synchrotron_2_e' function. */ #undef HAVE_GSL_SF_SYNCHROTRON_2_E /* Define to 1 if you have the `gsl_sf_taylorcoeff_e' function. */ #undef HAVE_GSL_SF_TAYLORCOEFF_E /* Define to 1 if you have the `gsl_sf_transport_2_e' function. */ #undef HAVE_GSL_SF_TRANSPORT_2_E /* Define to 1 if you have the `gsl_sf_transport_3_e' function. */ #undef HAVE_GSL_SF_TRANSPORT_3_E /* Define to 1 if you have the `gsl_sf_transport_4_e' function. */ #undef HAVE_GSL_SF_TRANSPORT_4_E /* Define to 1 if you have the `gsl_sf_transport_5_e' function. */ #undef HAVE_GSL_SF_TRANSPORT_5_E /* Define to 1 if you have the `gsl_sf_zetam1_e' function. */ #undef HAVE_GSL_SF_ZETAM1_E /* Define to 1 if you have the `gsl_sf_zetam1_int_e' function. */ #undef HAVE_GSL_SF_ZETAM1_INT_E /* Define to 1 if you have the `gsl_sf_zeta_e' function. */ #undef HAVE_GSL_SF_ZETA_E /* Define to 1 if you have the `gsl_sf_zeta_int_e' function. */ #undef HAVE_GSL_SF_ZETA_INT_E /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `gsl' library (-lgsl). */ #undef HAVE_LIBGSL /* Define to 1 if you have the `gslcblas' library (-lgslcblas). */ #undef HAVE_LIBGSLCBLAS /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define is feval is the octave namespace. */ #undef OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE /* Define is the octave_value class has .isreal(). */ #undef OCTAVE_HAS_OV_ISREAL_METHOD /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS gsl-2.1.1/src/PaxHeaders.7911/LLD_D_array.template.cc0000644000000000000000000000013213311744162016744 xustar0030 mtime=1529333874.267776678 30 atime=1529333876.043775238 30 ctime=1529333876.223775085 gsl-2.1.1/src/LLD_D_array.template.cc0000644000175000017500000000654113311744162017210 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/DDDDM_D.template.cc0000644000000000000000000000013113311744162015746 xustar0030 mtime=1529333874.107776805 29 atime=1529333875.65177556 30 ctime=1529333876.223775085 gsl-2.1.1/src/DDDDM_D.template.cc0000644000175000017500000001136713311744162016215 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 5; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(4).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(4).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); NDArray arg4 = args(3).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/IDD_D.template.cc0000644000000000000000000000013213311744162015533 xustar0030 mtime=1529333874.183776745 30 atime=1529333875.751775479 30 ctime=1529333876.223775085 gsl-2.1.1/src/IDD_D.template.cc0000644000175000017500000000774113311744162016002 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/U_D.template.cc0000644000000000000000000000013213311744162015337 xustar0030 mtime=1529333874.203776729 30 atime=1529333875.911775347 30 ctime=1529333876.223775085 gsl-2.1.1/src/U_D.template.cc0000644000175000017500000000575113311744162015605 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to unsigned int double t1 = arg1_data[i]; unsigned int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/ID_D.template.cc0000644000000000000000000000013113311744162015426 xustar0030 mtime=1529333874.155776768 29 atime=1529333874.94377614 30 ctime=1529333876.223775085 gsl-2.1.1/src/ID_D.template.cc0000644000175000017500000000726713311744162015701 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, arg2_data[i2], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { // Convert argument #1 to int double t1 = arg1_data[i1]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, arg2_data[i2], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/README0000644000000000000000000000013213311744161013426 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/src/README0000644000175000017500000000412413311744161013665 0ustar00bectbect00000000000000Wrapper for the GNU Scientific Library special functions. GSL special functions are automatically generated. When a new version of GSL comes out with new functions, add the octave name, the GSL name and the documentation string to buildgsl_sf.sh. To protect against users having an older version of GSL installed, you will also need to test for these new functions in configure.add, listing as missing any that are not available. If several functions are added by one release of GSL you only need to test for one and list the rest. Trim gsl_sf_ from the name when listing it as missing. Each new definition will look like the following: if test -n "${missing##* FN *}"; then export octave_name=FN export funcname=gsl_sf_FN cat < docstring.txt FN_DESCRIPTION EOF ./replace_template.sh INPUTS_to_double.template >> gsl_sf.cc fi Replace FN, gsl_sf_FN, FN_DESCRIPTION and INPUTS as appropriate. There are several different templates to use depending on the inputs to the special function. For example, if the function takes two doubles and returns a double, use the double_double_to_double.cc template. To see the available templates, use: ls *template As of this writing there are: double fn(unsigned int) double fn(unsigned int, unsigned int) double fn(int) double fn(int,double) double fn(int,double,double) double fn(int,int,double) double fn(int,int,double,double) double fn(double) double fn(double,mode) double fn(double,double) double fn(double,double,mode) double fn(double,double,double) double fn(double,double,double,mode) double fn(double,double,double,double) double fn(double,double,double,double,mode) mode is a precision mode accepting a gsl_mode_t value. If there is not appropriate template, you will have to write your own, or write a specialized C++ function for the new form. Note that GSL special functions have an _e form which returns an estimate of the absolute error of the returned value. These are handled automatically by the templates. If there is no _e form available you will need to write a specialized template for the function. gsl-2.1.1/src/PaxHeaders.7911/NSDD_D_array.template.cc0000644000000000000000000000013213311744162017061 xustar0030 mtime=1529333874.295776656 30 atime=1529333876.119775174 30 ctime=1529333876.223775085 gsl-2.1.1/src/NSDD_D_array.template.cc0000644000175000017500000000765313311744162017332 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3}, @var{arg4})\n\ @deftypefnx {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ The argument @var{arg1} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_SF_LEGENDRE_SCHMIDT\n\ Computation of the Schmidt semi-normalized associated Legendre\n\ polynomials S_l^m(x).\n\ @item 1 = GSL_SF_LEGENDRE_SPHARM\n\ Computation of the spherical harmonic associated Legendre\n\ polynomials Y_l^m(x).\n\ @item 2 = GSL_SF_LEGENDRE_FULL\n\ Computation of the fully normalized associated Legendre\n\ polynomials N_l^m(x).\n\ @item 3 = GSL_SF_LEGENDRE_NONE\n\ Computation of the unnormalized associated Legendre polynomials\n\ P_l^m(x).\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 4; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Check that the Legendre normalization parameter is valid double legnorm_tmp = args(0).double_value (); gsl_sf_legendre_t legnorm; if (legnorm_tmp == 0.0) legnorm = GSL_SF_LEGENDRE_SCHMIDT; else if (legnorm_tmp == 1.0) legnorm = GSL_SF_LEGENDRE_SPHARM; else if (legnorm_tmp == 2.0) legnorm = GSL_SF_LEGENDRE_FULL; else if (legnorm_tmp == 3.0) legnorm = GSL_SF_LEGENDRE_NONE; else { error ("The 'legnorm' argument must be 0, 1, 2 or 3."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type size_t: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } size_t arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Get the value of input argument #4 double arg4 = args(3).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (gsl_sf_legendre_array_n (arg2)); // Run the calculation GSL_FUNC_NAME (legnorm, arg2, arg3, arg4, y1.fortran_vec ()); y1.resize (gsl_sf_legendre_array_index (arg2, arg2) + 1); return octave_value (y1); #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/LLD_DD_array.template.cc0000644000000000000000000000013213311744162017050 xustar0030 mtime=1529333874.275776671 30 atime=1529333874.267776678 30 ctime=1529333876.223775085 gsl-2.1.1/src/LLD_DD_array.template.cc0000644000175000017500000000675313311744162017321 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {( z1, z2 ) =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2_dbl = args(1).scalar_value (); if (arg2_dbl > std::numeric_limits::max ()) { error ("Input argument #2 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg2_dbl < 0) { error ("Input argument #2 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg2 = static_cast (arg2_dbl); if ((static_cast (arg2)) != arg2_dbl) { error ("Input argument #2 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #3 double arg3 = args(2).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg2-arg1+1); RowVector y2 (arg2-arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, arg3, y1.fortran_vec (), y2.fortran_vec ()); octave_value_list retval; retval(0) = octave_value (y1); retval(1) = octave_value (y2); return retval; #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/buildgsl_sf.sh0000644000000000000000000000013213311744161015377 xustar0030 mtime=1529333873.207777499 30 atime=1529333873.223777486 30 ctime=1529333876.223775085 gsl-2.1.1/src/buildgsl_sf.sh0000755000175000017500000022707113311744161015651 0ustar00bectbect00000000000000## Copyright (C) 2016, 2017 Julien Bect ## Copyright (C) 2016 Susi Lehtola ## Copyright (C) 2004 Teemu Ikonen ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . RT="./replace_template.sh" cp gsl_sf.header.cc gsl_sf.cc # double to double ################################################### export octave_name=gsl_sf_clausen export funcname=gsl_sf_clausen_e cat << \EOF > docstring.txt The Clausen function is defined by the following integral, Cl_2(x) = - \int_0^x dt \log(2 \sin(t/2)) It is related to the dilogarithm by Cl_2(\theta) = \Im Li_2(\exp(i \theta)). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=clausen export funcname=gsl_sf_clausen_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_dawson export funcname=gsl_sf_dawson_e cat << \EOF > docstring.txt The Dawson integral is defined by \exp(-x^2) \int_0^x dt \exp(t^2). A table of Dawson integral can be found in Abramowitz & Stegun, Table 7.5. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=dawson export funcname=gsl_sf_dawson_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_1 export funcname=gsl_sf_debye_1_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=debye_1 export funcname=gsl_sf_debye_1_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_2 export funcname=gsl_sf_debye_2_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=debye_2 export funcname=gsl_sf_debye_2_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_3 export funcname=gsl_sf_debye_3_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=debye_3 export funcname=gsl_sf_debye_3_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_4 export funcname=gsl_sf_debye_4_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=debye_4 export funcname=gsl_sf_debye_4_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_5 export funcname=gsl_sf_debye_5_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_debye_6 export funcname=gsl_sf_debye_6_e cat << \EOF > docstring.txt The Debye functions are defined by the integral D_n(x) = n/x^n \int_0^x dt (t^n/(e^t - 1)). For further information see Abramowitz & Stegun, Section 27.1. EOF ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_dilog export funcname=gsl_sf_dilog_e cat << \EOF > docstring.txt Computes the dilogarithm for a real argument. In Lewin’s notation this is Li_2(x), the real part of the dilogarithm of a real x. It is defined by the integral representation Li_2(x) = - \Re \int_0^x ds \log(1-s) / s. Note that \Im(Li_2(x)) = 0 for x <= 1, and -\pi\log(x) for x > 1. Note that Abramowitz & Stegun refer to the Spence integral S(x)=Li_2(1-x) as the dilogarithm rather than Li_2(x). EOF ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_erf export funcname=gsl_sf_erf_e cat << \EOF > docstring.txt Computes the error function erf(x) = (2/\sqrt(\pi)) \int_0^x dt \exp(-t^2). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=erf_gsl export funcname=gsl_sf_erf_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_erfc export funcname=gsl_sf_erfc_e cat << \EOF > docstring.txt Computes the complementary error function erfc(x) = 1 - erf(x) = (2/\sqrt(\pi)) \int_x^\infty \exp(-t^2). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=erfc_gsl export funcname=gsl_sf_erfc_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_log_erfc export funcname=gsl_sf_log_erfc_e cat << \EOF > docstring.txt Computes the logarithm of the complementary error function \log(\erfc(x)). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=log_erfc export funcname=gsl_sf_log_erfc_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_erf_Z export funcname=gsl_sf_erf_Z_e cat << \EOF > docstring.txt Computes the Gaussian probability function Z(x) = (1/(2\pi)) \exp(-x^2/2). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=erf_Z export funcname=gsl_sf_erf_Z_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_erf_Q export funcname=gsl_sf_erf_Q_e cat << \EOF > docstring.txt Computes the upper tail of the Gaussian probability function Q(x) = (1/(2\pi)) \int_x^\infty dt \exp(-t^2/2). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=erf_Q export funcname=gsl_sf_erf_Q_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_hazard export funcname=gsl_sf_hazard_e cat << \EOF > docstring.txt The hazard function for the normal distrbution, also known as the inverse Mill\'s ratio, is defined as h(x) = Z(x)/Q(x) = \sqrt@{2/\pi \exp(-x^2 / 2) / \erfc(x/\sqrt 2)@}. It decreases rapidly as x approaches -\infty and asymptotes to h(x) \sim x as x approaches +\infty. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hazard export funcname=gsl_sf_hazard_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_expm1 export funcname=gsl_sf_expm1_e cat << \EOF > docstring.txt Computes the quantity \exp(x)-1 using an algorithm that is accurate for small x. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=expm1 export funcname=gsl_sf_expm1_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_exprel export funcname=gsl_sf_exprel_e cat << \EOF > docstring.txt Computes the quantity (\exp(x)-1)/x using an algorithm that is accurate for small x. For small x the algorithm is based on the expansion (\exp(x)-1)/x = 1 + x/2 + x^2/(2*3) + x^3/(2*3*4) + \dots. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=exprel export funcname=gsl_sf_exprel_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_exprel_2 export funcname=gsl_sf_exprel_2_e cat << \EOF > docstring.txt Computes the quantity 2(\exp(x)-1-x)/x^2 using an algorithm that is accurate for small x. For small x the algorithm is based on the expansion 2(\exp(x)-1-x)/x^2 = 1 + x/3 + x^2/(3*4) + x^3/(3*4*5) + \dots. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=exprel_2 export funcname=gsl_sf_exprel_2_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_expint_E1 export funcname=gsl_sf_expint_E1_e cat << \EOF > docstring.txt Computes the exponential integral E_1(x), E_1(x) := Re \int_1^\infty dt \exp(-xt)/t. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=expint_E1 export funcname=gsl_sf_expint_E1_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_expint_E2 export funcname=gsl_sf_expint_E2_e cat << \EOF > docstring.txt Computes the second-order exponential integral E_2(x), E_2(x) := \Re \int_1^\infty dt \exp(-xt)/t^2. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=expint_E2 export funcname=gsl_sf_expint_E2_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_expint_Ei export funcname=gsl_sf_expint_Ei_e cat << \EOF > docstring.txt Computes the exponential integral E_i(x), Ei(x) := - PV(\int_@{-x@}^\infty dt \exp(-t)/t) where PV denotes the principal value of the integral. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=expint_Ei export funcname=gsl_sf_expint_Ei_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_Shi export funcname=gsl_sf_Shi_e cat << \EOF > docstring.txt Computes the integral Shi(x) = \int_0^x dt \sinh(t)/t. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=Shi export funcname=gsl_sf_Shi_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_Chi export funcname=gsl_sf_Chi_e cat << \EOF > docstring.txt Computes the integral Chi(x) := Re[ \gamma_E + \log(x) + \int_0^x dt (\cosh[t]-1)/t] , where \gamma_E is the Euler constant. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=Chi export funcname=gsl_sf_Chi_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_expint_3 export funcname=gsl_sf_expint_3_e cat << \EOF > docstring.txt Computes the exponential integral Ei_3(x) = \int_0^x dt \exp(-t^3) for x >= 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=expint_3 export funcname=gsl_sf_expint_3_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_Si export funcname=gsl_sf_Si_e cat << \EOF > docstring.txt Computes the Sine integral Si(x) = \int_0^x dt \sin(t)/t. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=Si export funcname=gsl_sf_Si_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_Ci export funcname=gsl_sf_Ci_e cat << \EOF > docstring.txt Computes the Cosine integral Ci(x) = -\int_x^\infty dt \cos(t)/t for x > 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=Ci export funcname=gsl_sf_Ci_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_atanint export funcname=gsl_sf_atanint_e cat << \EOF > docstring.txt Computes the Arctangent integral AtanInt(x) = \int_0^x dt \arctan(t)/t. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=atanint export funcname=gsl_sf_atanint_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_fermi_dirac_mhalf export funcname=gsl_sf_fermi_dirac_mhalf_e cat << \EOF > docstring.txt Computes the complete Fermi-Dirac integral F_@{-1/2@}(x). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=fermi_dirac_mhalf export funcname=gsl_sf_fermi_dirac_mhalf_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_fermi_dirac_half export funcname=gsl_sf_fermi_dirac_half_e cat << \EOF > docstring.txt Computes the complete Fermi-Dirac integral F_@{1/2@}(x). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=fermi_dirac_half export funcname=gsl_sf_fermi_dirac_half_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsm_sf_fermi_dirac_3half export funcname=gsl_sf_fermi_dirac_3half_e cat << \EOF > docstring.txt Computes the complete Fermi-Dirac integral F_@{3/2@}(x). EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=fermi_dirac_3half export funcname=gsl_sf_fermi_dirac_3half_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gamma export funcname=gsl_sf_gamma_e cat << \EOF > docstring.txt Computes the Gamma function \Gamma(x), subject to x not being a negative integer. The function is computed using the real Lanczos method. The maximum value of x such that \Gamma(x) is not considered an overflow is given by the macro GSL_SF_GAMMA_XMAX and is 171.0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gamma_gsl export funcname=gsl_sf_gamma_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lngamma export funcname=gsl_sf_lngamma_e cat << \EOF > docstring.txt Computes the logarithm of the Gamma function, \log(\Gamma(x)), subject to x not a being negative integer. For x<0 the real part of \log(\Gamma(x)) is returned, which is equivalent to \log(|\Gamma(x)|). The function is computed using the real Lanczos method. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lngamma_gsl export funcname=gsl_sf_lngamma_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gammastar export funcname=gsl_sf_gammastar_e cat << \EOF > docstring.txt Computes the regulated Gamma Function \Gamma^*(x) for x > 0. The regulated gamma function is given by, \Gamma^*(x) = \Gamma(x)/(\sqrt@{2\pi@} x^@{(x-1/2)@} \exp(-x)) = (1 + (1/12x) + ...) for x \to \infty and is a useful suggestion of Temme. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gammastar export funcname=gsl_sf_gammastar_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gammainv export funcname=gsl_sf_gammainv_e cat << \EOF > docstring.txt Computes the reciprocal of the gamma function, 1/\Gamma(x) using the real Lanczos method. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gammainv_gsl export funcname=gsl_sf_gammainv_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lambert_W0 export funcname=gsl_sf_lambert_W0_e cat << \EOF > docstring.txt These compute the principal branch of the Lambert W function, W_0(x). Lambert\'s W functions, W(x), are defined to be solutions of the export octave_name=gammastar export funcname=gsl_sf_gammastar_e equation W(x) \exp(W(x)) = x. This function has multiple branches for x < 0; however, it has only two real-valued branches. We define W_0(x) to be the principal branch, where W > -1 for x < 0, and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lambert_W0 export funcname=gsl_sf_lambert_W0_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lambert_Wm1 export funcname=gsl_sf_lambert_Wm1_e cat << \EOF > docstring.txt These compute the secondary real-valued branch of the Lambert W function, W_@{-1@}(x). Lambert\'s W functions, W(x), are defined to be solutions of the equation W(x) \exp(W(x)) = x. This function has multiple branches for x < 0; however, it has only two real-valued branches. We define W_0(x) to be the principal branch, where W > -1 for x < 0, and W_@{-1@}(x) to be the other real branch, where W < -1 for x < 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lambert_Wm1 export funcname=gsl_sf_lambert_Wm1_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_log_1plusx export funcname=gsl_sf_log_1plusx_e cat << \EOF > docstring.txt Computes \log(1 + x) for x > -1 using an algorithm that is accurate for small x. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=log_1plusx export funcname=gsl_sf_log_1plusx_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_log_1plusx_mx export funcname=gsl_sf_log_1plusx_mx_e cat << \EOF > docstring.txt Computes \log(1 + x) - x for x > -1 using an algorithm that is accurate for small x. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=log_1plusx_mx export funcname=gsl_sf_log_1plusx_mx_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_psi export funcname=gsl_sf_psi_e cat << \EOF > docstring.txt Computes the digamma function \psi(x) for general x, x \ne 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=psi export funcname=gsl_sf_psi_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_psi_1piy export funcname=gsl_sf_psi_1piy_e cat << \EOF > docstring.txt Computes the real part of the digamma function on the line 1+i y, Re[\psi(1 + i y)]. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=psi_1piy export funcname=gsl_sf_psi_1piy_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_synchrotron_1 export funcname=gsl_sf_synchrotron_1_e cat << \EOF > docstring.txt Computes the first synchrotron function x \int_x^\infty dt K_@{5/3@}(t) for x >= 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=synchrotron_1 export funcname=gsl_sf_synchrotron_1_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_synchrotron_2 export funcname=gsl_sf_synchrotron_2_e cat << \EOF > docstring.txt Computes the second synchrotron function x K_@{2/3@}(x) for x >= 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=synchrotron_2 export funcname=gsl_sf_synchrotron_2_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_transport_2 export funcname=gsl_sf_transport_2_e cat << \EOF > docstring.txt Computes the transport function J(2,x). The transport functions J(n,x) are defined by the integral representations J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=transport_2 export funcname=gsl_sf_transport_2_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_transport_3 export funcname=gsl_sf_transport_3_e cat << \EOF > docstring.txt Computes the transport function J(3,x). The transport functions J(n,x) are defined by the integral representations J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=transport_3 export funcname=gsl_sf_transport_3_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_transport_4 export funcname=gsl_sf_transport_4_e cat << \EOF > docstring.txt Computes the transport function J(4,x). The transport functions J(n,x) are defined by the integral representations J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=transport_4 export funcname=gsl_sf_transport_4_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_transport_5 export funcname=gsl_sf_transport_5_e cat << \EOF > docstring.txt Computes the transport function J(5,x). The transport functions J(n,x) are defined by the integral representations J(n,x) := \int_0^x dt t^n e^t /(e^t - 1)^2. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=transport_5 export funcname=gsl_sf_transport_5_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_sinc export funcname=gsl_sf_sinc_e cat << \EOF > docstring.txt Computes \sinc(x) = \sin(\pi x) / (\pi x) for any value of x. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=sinc_gsl export funcname=gsl_sf_sinc_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lnsinh export funcname=gsl_sf_lnsinh_e cat << \EOF > docstring.txt Computes \log(\sinh(x)) for x > 0. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lnsinh export funcname=gsl_sf_lnsinh_e ${RT} D_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lncosh export funcname=gsl_sf_lncosh_e cat << \EOF > docstring.txt Computes \log(\cosh(x)) for any x. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lncosh export funcname=gsl_sf_lncosh_e ${RT} D_D >> gsl_sf.cc # (int, double) to double ############################################ export octave_name=gsl_sf_bessel_Jn export funcname=gsl_sf_bessel_Jn_e cat << \EOF > docstring.txt Computes the regular cylindrical Bessel function of order n, J_n(x). EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Jn export funcname=gsl_sf_bessel_Jn_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Yn export funcname=gsl_sf_bessel_Yn_e cat << \EOF > docstring.txt Computes the irregular cylindrical Bessel function of order n, Y_n(x), for x>0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Yn export funcname=gsl_sf_bessel_Yn_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_In export funcname=gsl_sf_bessel_In_e cat << \EOF > docstring.txt Computes the regular modified cylindrical Bessel function of order n, I_n(x). EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_In export funcname=gsl_sf_bessel_In_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_In_scaled export funcname=gsl_sf_bessel_In_scaled_e cat << \EOF > docstring.txt Computes the scaled regular modified cylindrical Bessel function of order n, \exp(-|x|) I_n(x) EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_In_scaled export funcname=gsl_sf_bessel_In_scaled_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Kn export funcname=gsl_sf_bessel_Kn_e cat << \EOF > docstring.txt Computes the irregular modified cylindrical Bessel function of order n, K_n(x), for x > 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Kn export funcname=gsl_sf_bessel_Kn_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Kn_scaled export funcname=gsl_sf_bessel_Kn_scaled_e cat << \EOF > docstring.txt EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Kn_scaled export funcname=gsl_sf_bessel_Kn_scaled_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_jl export funcname=gsl_sf_bessel_jl_e cat << \EOF > docstring.txt Computes the regular spherical Bessel function of order l, j_l(x), for l >= 0 and x >= 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_jl export funcname=gsl_sf_bessel_jl_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_yl export funcname=gsl_sf_bessel_yl_e cat << \EOF > docstring.txt Computes the irregular spherical Bessel function of order l, y_l(x), for l >= 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_yl export funcname=gsl_sf_bessel_yl_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_il_scaled export funcname=gsl_sf_bessel_il_scaled_e cat << \EOF > docstring.txt Computes the scaled regular modified spherical Bessel function of order l, \exp(-|x|) i_l(x) EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_il_scaled export funcname=gsl_sf_bessel_il_scaled_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_kl_scaled export funcname=gsl_sf_bessel_kl_scaled_e cat << \EOF > docstring.txt Computes the scaled irregular modified spherical Bessel function of order l, \exp(x) k_l(x), for x>0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_kl_scaled export funcname=gsl_sf_bessel_kl_scaled_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_exprel_n export funcname=gsl_sf_exprel_n_e cat << \EOF > docstring.txt Computes the N-relative exponential, which is the n-th generalization of the functions gsl_sf_exprel and gsl_sf_exprel2. The N-relative exponential is given by, exprel_N(x) = N!/x^N (\exp(x) - \sum_@{k=0@}^@{N-1@} x^k/k!) = 1 + x/(N+1) + x^2/((N+1)(N+2)) + ... = 1F1 (1,1+N,x) EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=exprel_n export funcname=gsl_sf_exprel_n_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_fermi_dirac_int export funcname=gsl_sf_fermi_dirac_int_e cat << \EOF > docstring.txt Computes the complete Fermi-Dirac integral with an integer index of j, F_j(x) = (1/\Gamma(j+1)) \int_0^\infty dt (t^j /(\exp(t-x)+1)). EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=fermi_dirac_int export funcname=gsl_sf_fermi_dirac_int_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_taylorcoeff export funcname=gsl_sf_taylorcoeff_e cat << \EOF > docstring.txt Computes the Taylor coefficient x^n / n! for x >= 0, n >= 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=taylorcoeff export funcname=gsl_sf_taylorcoeff_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_Pl export funcname=gsl_sf_legendre_Pl_e cat << \EOF > docstring.txt These functions evaluate the Legendre polynomial P_l(x) for a specific value of l, x subject to l >= 0, |x| <= 1 EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=legendre_Pl export funcname=gsl_sf_legendre_Pl_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_Ql export funcname=gsl_sf_legendre_Ql_e cat << \EOF > docstring.txt Computes the Legendre function Q_l(x) for x > -1, x != 1 and l >= 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=legendre_Ql export funcname=gsl_sf_legendre_Ql_e ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_a export funcname=gsl_sf_mathieu_a_e cat << \EOF > docstring.txt Computes the characteristic values a_n(q) of the Mathieu function ce_n(q,x). EOF ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_b export funcname=gsl_sf_mathieu_b_e cat << \EOF > docstring.txt Computes the characteristic values b_n(q) of the Mathieu function se_n(q,x). EOF ${RT} ID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_psi_n export funcname=gsl_sf_psi_n_e cat << \EOF > docstring.txt Computes the polygamma function \psi^@{(m)@}(x) for m >= 0, x > 0. EOF ${RT} ID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=psi_n export funcname=gsl_sf_psi_n_e ${RT} ID_D >> gsl_sf.cc # (double, double) to double ######################################### export octave_name=gsl_sf_bessel_Jnu export funcname=gsl_sf_bessel_Jnu_e cat << \EOF > docstring.txt Computes the regular cylindrical Bessel function of fractional order nu, J_\nu(x). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Jnu export funcname=gsl_sf_bessel_Jnu_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Ynu export funcname=gsl_sf_bessel_Ynu_e cat << \EOF > docstring.txt Computes the irregular cylindrical Bessel function of fractional order nu, Y_\nu(x). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Ynu export funcname=gsl_sf_bessel_Ynu_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Inu export funcname=gsl_sf_bessel_Inu_e cat << \EOF > docstring.txt Computes the regular modified Bessel function of fractional order nu, I_\nu(x) for x>0, \nu>0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Inu export funcname=gsl_sf_bessel_Inu_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Inu_scaled export funcname=gsl_sf_bessel_Inu_scaled_e cat << \EOF > docstring.txt Computes the scaled regular modified Bessel function of fractional order nu, \exp(-|x|)I_\nu(x) for x>0, \nu>0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Inu_scaled export funcname=gsl_sf_bessel_Inu_scaled_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Knu export funcname=gsl_sf_bessel_Knu_e cat << \EOF > docstring.txt Computes the irregular modified Bessel function of fractional order nu, K_\nu(x) for x>0, \nu>0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Knu export funcname=gsl_sf_bessel_Knu_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_lnKnu export funcname=gsl_sf_bessel_lnKnu_e cat << \EOF > docstring.txt Computes the logarithm of the irregular modified Bessel function of fractional order nu, \ln(K_\nu(x)) for x>0, \nu>0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_lnKnu export funcname=gsl_sf_bessel_lnKnu_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Knu_scaled export funcname=gsl_sf_bessel_Knu_scaled_e cat << \EOF > docstring.txt Computes the scaled irregular modified Bessel function of fractional order nu, \exp(+|x|) K_\nu(x) for x>0, \nu>0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_Knu_scaled export funcname=gsl_sf_bessel_Knu_scaled_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_exp_mult export funcname=gsl_sf_exp_mult_e cat << \EOF > docstring.txt These routines exponentiate x and multiply by the factor y to return the product y \exp(x). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=exp_mult export funcname=gsl_sf_exp_mult_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_fermi_dirac_inc_0 export funcname=gsl_sf_fermi_dirac_inc_0_e cat << \EOF > docstring.txt Computes the incomplete Fermi-Dirac integral with an index of zero, F_0(x,b) = \ln(1 + e^@{b-x@}) - (b-x). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=fermi_dirac_inc_0 export funcname=gsl_sf_fermi_dirac_inc_0_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_poch export funcname=gsl_sf_poch_e cat << \EOF > docstring.txt Computes the Pochhammer symbol (a)_x := \Gamma(a + x)/\Gamma(a), subject to a and a+x not being negative integers. The Pochhammer symbol is also known as the Apell symbol. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=poch export funcname=gsl_sf_poch_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lnpoch export funcname=gsl_sf_lnpoch_e cat << \EOF > docstring.txt Computes the logarithm of the Pochhammer symbol, \log((a)_x) = \log(\Gamma(a + x)/\Gamma(a)) for a > 0, a+x > 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lnpoch export funcname=gsl_sf_lnpoch_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_pochrel export funcname=gsl_sf_pochrel_e cat << \EOF > docstring.txt Computes the relative Pochhammer symbol ((a,x) - 1)/x where (a,x) = (a)_x := \Gamma(a + x)/\Gamma(a). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=pochrel export funcname=gsl_sf_pochrel_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gamma_inc_Q export funcname=gsl_sf_gamma_inc_Q_e cat << \EOF > docstring.txt Computes the normalized incomplete Gamma Function Q(a,x) = 1/\Gamma(a) \int_x\infty dt t^@{a-1@} \exp(-t) for a > 0, x >= 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gamma_inc_Q export funcname=gsl_sf_gamma_inc_Q_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gamma_inc_P export funcname=gsl_sf_gamma_inc_P_e cat << \EOF > docstring.txt Computes the complementary normalized incomplete Gamma Function P(a,x) = 1/\Gamma(a) \int_0^x dt t^@{a-1@} \exp(-t) for a > 0, x >= 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gamma_inc_P export funcname=gsl_sf_gamma_inc_P_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gamma_inc export funcname=gsl_sf_gamma_inc_e cat << \EOF > docstring.txt These functions compute the incomplete Gamma Function the normalization factor included in the previously defined functions: \Gamma(a,x) = \int_x\infty dt t^@{a-1@} \exp(-t) for a real and x >= 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=gamma_inc export funcname=gsl_sf_gamma_inc_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_beta export funcname=gsl_sf_beta_e cat << \EOF > docstring.txt Computes the Beta Function, B(a,b) = \Gamma(a)\Gamma(b)/\Gamma(a+b) for a > 0, b > 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=beta_gsl export funcname=gsl_sf_beta_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lnbeta export funcname=gsl_sf_lnbeta_e cat << \EOF > docstring.txt Computes the logarithm of the Beta Function, \log(B(a,b)) for a > 0, b > 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=lnbeta export funcname=gsl_sf_lnbeta_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_hyperg_0F1 export funcname=gsl_sf_hyperg_0F1_e cat << \EOF > docstring.txt Computes the hypergeometric function 0F1(c,x). EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hyperg_0F1 export funcname=gsl_sf_hyperg_0F1_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_conicalP_half export funcname=gsl_sf_conicalP_half_e cat << \EOF > docstring.txt Computes the irregular Spherical Conical Function P^@{1/2@}_@{-1/2 + i \lambda@}(x) for x > -1. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=conicalP_half export funcname=gsl_sf_conicalP_half_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_conicalP_mhalf export funcname=gsl_sf_conicalP_mhalf_e cat << \EOF > docstring.txt Computes the regular Spherical Conical Function P^@{-1/2@}_@{-1/2 + i \lambda@}(x) for x > -1. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=conicalP_mhalf export funcname=gsl_sf_conicalP_mhalf_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_conicalP_0 export funcname=gsl_sf_conicalP_0_e cat << \EOF > docstring.txt Computes the conical function P^0_@{-1/2 + i \lambda@}(x) for x > -1. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=conicalP_0 export funcname=gsl_sf_conicalP_0_e ${RT} DD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_conicalP_1 export funcname=gsl_sf_conicalP_1_e cat << \EOF > docstring.txt Computes the conical function P^1_@{-1/2 + i \lambda@}(x) for x > -1. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=conicalP_1 export funcname=gsl_sf_conicalP_1_e ${RT} DD_D >> gsl_sf.cc # (double, mode) to double ########################################### export octave_name=gsl_sf_airy_Ai export funcname=gsl_sf_airy_Ai_e cat << \EOF > docstring.txt Computes the Airy function Ai(x) with an accuracy specified by mode. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Ai export funcname=gsl_sf_airy_Ai_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Bi export funcname=gsl_sf_airy_Bi_e cat << \EOF > docstring.txt Computes the Airy function Bi(x) with an accuracy specified by mode. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Bi export funcname=gsl_sf_airy_Bi_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Ai_scaled export funcname=gsl_sf_airy_Ai_scaled_e cat << \EOF > docstring.txt Computes a scaled version of the Airy function S_A(x) Ai(x). For x>0 the scaling factor S_A(x) is \exp(+(2/3) x^(3/2)), and is 1 for x<0. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Ai_scaled export funcname=gsl_sf_airy_Ai_scaled_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Bi_scaled export funcname=gsl_sf_airy_Bi_scaled_e cat << \EOF > docstring.txt Computes a scaled version of the Airy function S_B(x) Bi(x). For x>0 the scaling factor S_B(x) is exp(-(2/3) x^(3/2)), and is 1 for x<0. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Bi_scaled export funcname=gsl_sf_airy_Bi_scaled_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Ai_deriv export funcname=gsl_sf_airy_Ai_deriv_e cat << \EOF > docstring.txt Computes the Airy function derivative Ai'(x) with an accuracy specified by mode. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Ai_deriv export funcname=gsl_sf_airy_Ai_deriv_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Bi_deriv export funcname=gsl_sf_airy_Bi_deriv_e cat << \EOF > docstring.txt Computes the Airy function derivative Bi'(x) with an accuracy specified by mode. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Bi_deriv export funcname=gsl_sf_airy_Bi_deriv_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Ai_deriv_scaled export funcname=gsl_sf_airy_Ai_deriv_scaled_e cat << \EOF > docstring.txt Computes the derivative of the scaled Airy function S_A(x) Ai(x). EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Ai_deriv_scaled export funcname=gsl_sf_airy_Ai_deriv_scaled_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_Bi_deriv_scaled export funcname=gsl_sf_airy_Bi_deriv_scaled_e cat << \EOF > docstring.txt Computes the derivative of the scaled Airy function S_B(x) Bi(x). EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_Bi_deriv_scaled export funcname=gsl_sf_airy_Bi_deriv_scaled_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_Kcomp export funcname=gsl_sf_ellint_Kcomp_e cat << \EOF > docstring.txt Computes the complete elliptic integral K(k) @tex \beforedisplay $$ \eqalign{ K(k) &= \int_0^{\pi/2} {dt \over \sqrt{(1 - k^2 \sin^2(t))}} \cr } $$ \afterdisplay See also: @end tex @ifinfo @group @example pi --- 2 / | 1 ellint_Kcomp(k) = | ------------------- dt | 2 2 / sqrt(1 - k sin (t)) 0 @end example @end group @end ifinfo @ifhtml @group @example pi --- 2 / | 1 ellint_Kcomp(k) = | ------------------- dt | 2 2 / sqrt(1 - k sin (t)) 0 @end example @end group @end ifhtml @seealso{ellipj, ellipke} The notation used here is based on Carlson, @cite{Numerische Mathematik} 33 (1979) and differs slightly from that used by Abramowitz & Stegun, where the functions are given in terms of the parameter @math{m = k^2}. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=ellint_Kcomp export funcname=gsl_sf_ellint_Kcomp_e ${RT} DM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_Ecomp export funcname=gsl_sf_ellint_Ecomp_e cat << \EOF > docstring.txt Computes the complete elliptic integral E(k) to the accuracy specified by the mode variable mode. @tex \beforedisplay $$ \eqalign{ E(k) &= \int_0^{\pi/2} \sqrt{(1 - k^2 \sin^2(t))} dt \cr } $$ \afterdisplay See also: @end tex @ifinfo @group @example pi --- 2 / | 2 2 ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt | / 0 @end example @end group @end ifinfo @ifhtml @group @example pi --- 2 / | 2 2 ellint_Ecomp(k) = | sqrt(1 - k sin (t)) dt | / 0 @end example @end group @end ifhtml @seealso{ellipj, ellipke} The notation used here is based on Carlson, @cite{Numerische Mathematik} 33 (1979) and differs slightly from that used by Abramowitz & Stegun, where the functions are given in terms of the parameter @math{m = k^2}. EOF ${RT} DM_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=ellint_Ecomp export funcname=gsl_sf_ellint_Ecomp_e ${RT} DM_D >> gsl_sf.cc # (double, double, mode) to double ################################### export octave_name=gsl_sf_ellint_E export funcname=gsl_sf_ellint_E_e cat << \EOF > docstring.txt This routine computes the elliptic integral E(\phi,k) to the accuracy specified by the mode variable mode. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2. EOF ${RT} DDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_F export funcname=gsl_sf_ellint_F_e cat << \EOF > docstring.txt This routine computes the elliptic integral F(\phi,k) to the accuracy specified by the mode variable mode. Note that Abramowitz & Stegun define this function in terms of the parameter m = k^2. EOF ${RT} DDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_Pcomp export funcname=gsl_sf_ellint_Pcomp_e cat << \EOF > docstring.txt Computes the complete elliptic integral \Pi(k,n) to the accuracy specified by the mode variable mode. Note that Abramowitz & Stegun define this function in terms of the parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of sign n \to -n. EOF ${RT} DDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_RC export funcname=gsl_sf_ellint_RC_e cat << \EOF > docstring.txt This routine computes the incomplete elliptic integral RC(x,y) to the accuracy specified by the mode variable mode. EOF ${RT} DDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_D export funcname=gsl_sf_ellint_D_e cat << \EOF > docstring.txt This function computes the incomplete elliptic integral D(\phi,k) which is defined through the Carlson form RD(x,y,z) by the following relation, D(\phi,k) = (1/3)(\sin(\phi))^3 x RD (1-\sin^2(\phi), 1-k^2 \sin^2(\phi), 1). EOF echo "#if GSL_MAJOR_VERSION < 2" >> gsl_sf.cc ${RT} DDDM_D >> gsl_sf.cc echo "#else" >> gsl_sf.cc ${RT} DDM_D >> gsl_sf.cc echo "#endif" >> gsl_sf.cc # (double, double, double, mode) to double ########################### export octave_name=gsl_sf_ellint_P export funcname=gsl_sf_ellint_P_e cat << \EOF > docstring.txt This routine computes the incomplete elliptic integral \Pi(\phi,k,n) to the accuracy specified by the mode variable mode. Note that Abramowitz & Stegun define this function in terms of the parameters m = k^2 and \sin^2(\alpha) = k^2, with the change of sign n \to -n. EOF ${RT} DDDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_RD export funcname=gsl_sf_ellint_RD_e cat << \EOF > docstring.txt This routine computes the incomplete elliptic integral RD(x,y,z) to the accuracy specified by the mode variable mode. EOF ${RT} DDDM_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_ellint_RF export funcname=gsl_sf_ellint_RF_e cat << \EOF > docstring.txt This routine computes the incomplete elliptic integral RF(x,y,z) to the accuracy specified by the mode variable mode. EOF ${RT} DDDM_D >> gsl_sf.cc # (double, double, double, double, mode) to double ################### export octave_name=gsl_sf_ellint_RJ export funcname=gsl_sf_ellint_RJ_e cat << \EOF > docstring.txt This routine computes the incomplete elliptic integral RJ(x,y,z,p) to the accuracy specified by the mode variable mode. EOF ${RT} DDDDM_D >> gsl_sf.cc # int to double ###################################################### export octave_name=gsl_sf_airy_zero_Ai export funcname=gsl_sf_airy_zero_Ai_e cat << \EOF > docstring.txt Computes the location of the s-th zero of the Airy function Ai(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_zero_Ai export funcname=gsl_sf_airy_zero_Ai_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_zero_Bi export funcname=gsl_sf_airy_zero_Bi_e cat << \EOF > docstring.txt Computes the location of the s-th zero of the Airy function Bi(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_zero_Bi export funcname=gsl_sf_airy_zero_Bi_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_zero_Ai_deriv export funcname=gsl_sf_airy_zero_Ai_deriv_e cat << \EOF > docstring.txt Computes the location of the s-th zero of the Airy function derivative Ai(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_zero_Ai_deriv export funcname=gsl_sf_airy_zero_Ai_deriv_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_airy_zero_Bi_deriv export funcname=gsl_sf_airy_zero_Bi_deriv_e cat << \EOF > docstring.txt Computes the location of the s-th zero of the Airy function derivative Bi(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=airy_zero_Bi_deriv export funcname=gsl_sf_airy_zero_Bi_deriv_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_zero_J0 export funcname=gsl_sf_bessel_zero_J0_e cat << \EOF > docstring.txt Computes the location of the s-th positive zero of the Bessel function J_0(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_zero_J0 export funcname=gsl_sf_bessel_zero_J0_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_zero_J1 export funcname=gsl_sf_bessel_zero_J1_e cat << \EOF > docstring.txt Computes the location of the s-th positive zero of the Bessel function J_1(x). EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=bessel_zero_J1 export funcname=gsl_sf_bessel_zero_J1_e ${RT} I_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_psi_1_int export funcname=gsl_sf_psi_1_int_e cat << \EOF > docstring.txt Computes the Trigamma function \psi(n) for positive integer n. EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=psi_1_int export funcname=gsl_sf_psi_1_int_e ${RT} I_D >> gsl_sf.cc # (int, double, double) to double #################################### export octave_name=gsl_sf_conicalP_cyl_reg export funcname=gsl_sf_conicalP_cyl_reg_e cat << \EOF > docstring.txt Computes the Regular Cylindrical Conical Function @math{P^{-m}_{-1/2 + i \lambda}(x)}, for @math{x > -1}, @math{m} @geq{} @math{-1}. EOF ${RT} IDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_conicalP_sph_reg export funcname=gsl_sf_conicalP_sph_reg_e cat << \EOF > docstring.txt Computes the Regular Spherical Conical Function @math{P^{-1/2-l}_{-1/2 + i \lambda}(x)}, for @math{x > -1}, @math{l} @geq{} @math{-1}. EOF ${RT} IDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_gegenpoly_n export funcname=gsl_sf_gegenpoly_n_e cat << \EOF > docstring.txt These functions evaluate the Gegenbauer polynomial @math{C^{(\lambda)}_n(x)} for n, lambda, x subject to @math{\lambda > -1/2}, @math{n} @geq{} @math{0}. EOF ${RT} IDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_laguerre_n export funcname=gsl_sf_laguerre_n_e cat << \EOF > docstring.txt Computes the generalized Laguerre polynomial @math{L^a_n(x)} for @math{a > -1} and @math{n} @geq{} @math{0}. EOF ${RT} IDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_ce export funcname=gsl_sf_mathieu_ce_e cat << \EOF > docstring.txt This routine computes the angular Mathieu function ce_n(q,x). EOF ${RT} IDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_se export funcname=gsl_sf_mathieu_se_e cat << \EOF > docstring.txt This routine computes the angular Mathieu function se_n(q,x). EOF ${RT} IDD_D >> gsl_sf.cc # (int, int, double) to double ###################################################################### export octave_name=gsl_sf_hyperg_U_int export funcname=gsl_sf_hyperg_U_int_e cat << \EOF > docstring.txt Secondary Confluent Hypergoemetric U function A&E 13.1.3 m and n are integers. EOF ${RT} IID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_hyperg_1F1_int export funcname=gsl_sf_hyperg_1F1_int_e cat << \EOF > docstring.txt Primary Confluent Hypergoemetric U function A&E 13.1.3 m and n are integers. EOF ${RT} IID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_Plm export funcname=gsl_sf_legendre_Plm_e cat << \EOF > docstring.txt Computes the associated Legendre polynomial P_l^m(x) for m >= 0, l >= m, |x| <= 1. EOF ${RT} IID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=legendre_Plm export funcname=gsl_sf_legendre_Plm_e ${RT} IID_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_sphPlm export funcname=gsl_sf_legendre_sphPlm_e cat << \EOF > docstring.txt Computes the normalized associated Legendre polynomial $\sqrt@{(2l+1)/(4\pi)@} \sqrt@{(l-m)!/(l+m)!@} P_l^m(x)$ suitable for use in spherical harmonics. The parameters must satisfy m >= 0, l >= m, |x| <= 1. Theses routines avoid the overflows that occur for the standard normalization of P_l^m(x). EOF ${RT} IID_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=legendre_sphPlm export funcname=gsl_sf_legendre_sphPlm_e ${RT} IID_D >> gsl_sf.cc # (int, int, double, double) to double ############################### export octave_name=gsl_sf_hydrogenicR export funcname=gsl_sf_hydrogenicR_e cat << \EOF > docstring.txt This routine computes the n-th normalized hydrogenic bound state radial wavefunction, @tex R_n := 2 (Z^{3/2}/n^2) \sqrt{(n-l-1)!/(n+l)!} \exp(-Z r/n) (2Zr/n)^l L^{2l+1}_{n-l-1}(2Zr/n). @end tex @ifnottex @example @group Z^(3/2) ---------------- -Z r/n l 2l+1 R_n := 2 -------- \ / (n-l-1)!/(n+l)! . e . (2Zr/n) . L (2Zr/n). n^2 v n-l-1 @end group @end example @end ifnottex where @math{L^a_b(x)} is the generalized Laguerre polynomial. The normalization is chosen such that the wavefunction \psi is given by @math{\psi(n,l,r) = R_n Y_{lm}}. EOF ${RT} IIDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_Mc export funcname=gsl_sf_mathieu_Mc_e cat << \EOF > docstring.txt This routine computes the radial j-th kind Mathieu function @math{Mc_n^{(j)}(q,x)} of order n. EOF ${RT} IIDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_mathieu_Ms export funcname=gsl_sf_mathieu_Ms_e cat << \EOF > docstring.txt This routine computes the radial j-th kind Mathieu function @math{Ms_n^{(j)}(q,x)} of order n. EOF ${RT} IIDD_D >> gsl_sf.cc # (double, int) to double ############################################ export octave_name=gsl_sf_bessel_zero_Jnu export funcname=gsl_sf_bessel_zero_Jnu_e cat << \EOF > docstring.txt Computes the location of the n-th positive zero of the Bessel function J_x(). EOF ${RT} DI_D >> gsl_sf.cc # (double, double, double) to double ################################# export octave_name=gsl_sf_hyperg_U export funcname=gsl_sf_hyperg_U_e cat << \EOF > docstring.txt Secondary Confluent Hypergoemetric U function A&E 13.1.3 All inputs are double as is the output. EOF ${RT} DDD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hyperg_U export funcname=gsl_sf_hyperg_U_e ${RT} DDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_hyperg_1F1 export funcname=gsl_sf_hyperg_1F1_e cat << \EOF > docstring.txt Primary Confluent Hypergoemetric U function A&E 13.1.3 All inputs are double as is the output. EOF ${RT} DDD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hyperg_1F1 export funcname=gsl_sf_hyperg_1F1_e ${RT} DDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_hyperg_2F0 export funcname=gsl_sf_hyperg_2F0_e cat << \EOF > docstring.txt Computes the hypergeometric function 2F0(a,b,x). The series representation is a divergent hypergeometric series. However, for x < 0 we have 2F0(a,b,x) = (-1/x)^a U(a,1+a-b,-1/x) EOF ${RT} DDD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hyperg_2F0 export funcname=gsl_sf_hyperg_2F0_e ${RT} DDD_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_beta_inc export funcname=gsl_sf_beta_inc_e cat << \EOF > docstring.txt Computes the normalized incomplete Beta function I_x(a,b)=B_x(a,b)/B(a,b) where @math{B_x(a,b) = \int_0^x t^(a-1) (1-t)^(b-1) dt} for @math{0 \le x \le 1}. For a > 0, b > 0 the value is computed using a continued fraction expansion. For all other values it is computed using the relation I_x(a,b,x) = (1/a) x^a 2F1(a,1-b,a+1,x)/B(a,b). EOF ${RT} DDD_D >> gsl_sf.cc # (double, double, double, double) to double ######################### export octave_name=gsl_sf_hyperg_2F1 export funcname=gsl_sf_hyperg_2F1_e cat << \EOF > docstring.txt Computes the Gauss hypergeometric function 2F1(a,b,c,x) = F(a,b,c,x) for |x| < 1. If the arguments (a,b,c,x) are too close to a singularity then the function can return the error code GSL_EMAXITER when the series approximation converges too slowly. This occurs in the region of x=1, c - a - b = m for integer m. EOF ${RT} DDDD_D >> gsl_sf.cc # unsigned int to double ############################################# export octave_name=gsl_sf_fact export funcname=gsl_sf_fact_e cat << \EOF > docstring.txt Computes the factorial n!. The factorial is related to the Gamma function by n! = \Gamma(n+1). The maximum value of n such that n! is not considered an overflow is 170. EOF ${RT} U_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_doublefact export funcname=gsl_sf_doublefact_e cat << \EOF > docstring.txt Compute the double factorial n!! = n(n-2)(n-4)\dots. The maximum value of n such that n!! is not considered an overflow is 297. EOF ${RT} U_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lnfact export funcname=gsl_sf_lnfact_e cat << \EOF > docstring.txt Computes the logarithm of the factorial of n, \log(n!). The algorithm is faster than computing \ln(\Gamma(n+1)) via gsl_sf_lngamma for n < 170, but defers for larger n. EOF ${RT} U_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lndoublefact export funcname=gsl_sf_lndoublefact_e cat << \EOF > docstring.txt Computes the logarithm of the double factorial of n, \log(n!!). EOF ${RT} U_D >> gsl_sf.cc # (unsigned int, unsigned int) to double ############################# export octave_name=gsl_sf_choose export funcname=gsl_sf_choose_e cat << \EOF > docstring.txt Computes the combinatorial factor n choose m = n!/(m!(n-m)!). EOF ${RT} UU_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_lnchoose export funcname=gsl_sf_lnchoose_e cat << \EOF > docstring.txt Computes the logarithm of n choose m. This is equivalent to \log(n!) - \log(m!) - \log((n-m)!). EOF ${RT} UU_D >> gsl_sf.cc # (int, int, int, int, int, int) to double ########################### export octave_name=gsl_sf_coupling_3j export funcname=gsl_sf_coupling_3j_e cat << \EOF > docstring.txt computes the Wigner 3-j coefficient, @example @group (ja jb jc ma mb mc) @end group @end example where the arguments are given in half-integer units, @code{ja = two_ja/2}, @code{ma = two_ma/2}, etc. EOF ${RT} IIIIII_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=coupling_3j export funcname=gsl_sf_coupling_3j_e ${RT} IIIIII_D >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_coupling_6j export funcname=gsl_sf_coupling_6j_e cat << \EOF > docstring.txt computes the Wigner 6-j coefficient, @example @group @{ja jb jc jd je jf@} @end group @end example where the arguments are given in half-integer units, @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc. EOF ${RT} IIIIII_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=coupling_6j export funcname=gsl_sf_coupling_6j_e ${RT} IIIIII_D >> gsl_sf.cc # (int, int, int, int, int, int, int, int, int) to double ############ export octave_name=gsl_sf_coupling_9j export funcname=gsl_sf_coupling_9j_e cat << \EOF > docstring.txt computes the Wigner 9-j coefficient, @example @group @{ja jb jc jd je jf jg jh ji@} @end group @end example where the arguments are given in half-integer units, @code{ja = two_ja/2}, @code{jd = two_jd/2}, etc. EOF ${RT} IIIIIIIII_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=coupling_9j export funcname=gsl_sf_coupling_9j_e ${RT} IIIIIIIII_D >> gsl_sf.cc ############################# ## gsl_sf_*_array function ## ############################# # (length, double) ################################################### export octave_name=gsl_sf_bessel_jl_array export funcname=gsl_sf_bessel_jl_array cat << \EOF > docstring.txt Computes the values of the regular spherical Bessel functions j_l(x) for l from 0 to lmax inclusive for lmax >= 0 and x >= 0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_jl_steed_array export funcname=gsl_sf_bessel_jl_steed_array cat << \EOF > docstring.txt This routine uses Steed’s method to compute the values of the regular spherical Bessel functions j_l(x) for l from 0 to lmax inclusive for lmax >= 0 and x >= 0. The Steed/Barnett algorithm is described in Comp. Phys. Comm. 21, 297 (1981). Steed’s method is more stable than the recurrence used in the other functions but is also slower. EOF ${RT} LD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_il_scaled_array export funcname=gsl_sf_bessel_il_scaled_array cat << \EOF > docstring.txt This routine computes the values of the scaled regular modified spherical Bessel functions \exp(-|x|) i_l(x) for l from 0 to lmax inclusive for lmax >= 0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_kl_scaled_array export funcname=gsl_sf_bessel_kl_scaled_array cat << \EOF > docstring.txt This routine computes the values of the scaled irregular modified spherical Bessel functions \exp(x) k_l(x) for l from 0 to lmax inclusive for lmax >= 0 and x>0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_yl_array export funcname=gsl_sf_bessel_yl_array cat << \EOF > docstring.txt This routine computes the values of the irregular spherical Bessel functions y_l(x) for l from 0 to lmax inclusive for lmax >= 0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_Pl_array export funcname=gsl_sf_legendre_Pl_array cat << \EOF > docstring.txt These functions compute arrays of Legendre polynomials P_l(x) and derivatives dP_l(x)/dx, for l = 0, \dots, lmax, |x| <= 1. EOF ${RT} LD_D_array >> gsl_sf.cc # (length, double, double) ########################################### export octave_name=gsl_sf_gegenpoly_array export funcname=gsl_sf_gegenpoly_array cat << \EOF > docstring.txt This function computes an array of Gegenbauer polynomials @math{C^{(\lambda)}_n(x)} for n = 0, 1, 2, \dots, nmax, subject to @math{\lambda > -1/2}, @math{nmax} @geq{} @math{0}. EOF ${RT} LDD_D_array >> gsl_sf.cc # (min, max, double) ################################################# export octave_name=gsl_sf_bessel_In_array export funcname=gsl_sf_bessel_In_array cat << \EOF > docstring.txt his routine computes the values of the regular modified cylindrical Bessel functions I_n(x) for n from nmin to nmax inclusive. The start of the range nmin must be positive or zero. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_In_scaled_array export funcname=gsl_sf_bessel_In_scaled_array cat << \EOF > docstring.txt This routine computes the values of the scaled regular cylindrical Bessel functions \exp(-|x|) I_n(x) for n from nmin to nmax inclusive. The start of the range nmin must be positive or zero. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Jn_array export funcname=gsl_sf_bessel_Jn_array cat << \EOF > docstring.txt This routine computes the values of the regular cylindrical Bessel functions J_n(x) for n from nmin to nmax inclusive. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Kn_array export funcname=gsl_sf_bessel_Kn_array cat << \EOF > docstring.txt This routine computes the values of the irregular modified cylindrical Bessel functions K_n(x) for n from nmin to nmax inclusive. The start of the range nmin must be positive or zero. The domain of the function is x>0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Kn_scaled_array export funcname=gsl_sf_bessel_Kn_scaled_array cat << \EOF > docstring.txt This routine computes the values of the scaled irregular cylindrical Bessel functions \exp(x) K_n(x) for n from nmin to nmax inclusive. The start of the range nmin must be positive or zero. The domain of the function is x>0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_bessel_Yn_array export funcname=gsl_sf_bessel_Yn_array cat << \EOF > docstring.txt This routine computes the values of the irregular cylindrical Bessel functions Y_n(x) for n from nmin to nmax inclusive. The domain of the function is x>0. The values are computed using recurrence relations for efficiency, and therefore may differ slightly from the exact values. EOF ${RT} LLD_D_array >> gsl_sf.cc # (length, int, double) to double #################################### # DEPRECATED: gsl_sf_legendre_Plm_array 2.0 export octave_name=gsl_sf_legendre_Plm_array export funcname=gsl_sf_legendre_Plm_array cat << \EOF > docstring.txt Compute arrays of Legendre polynomials P_l^m(x) for m >= 0, l = |m|, ..., lmax, |x| <= 1. EOF ${RT} LID_D_array >> gsl_sf.cc ###################################################################### # DEPRECATED: gsl_sf_legendre_Plm_deriv_array 2.0 export octave_name=gsl_sf_legendre_Plm_deriv_array export funcname=gsl_sf_legendre_Plm_deriv_array cat << \EOF > docstring.txt Compute arrays of Legendre polynomials P_l^m(x) and derivatives dP_l^m(x)/dx for m >= 0, l = |m|, ..., lmax, |x| <= 1. EOF ${RT} LID_DD_array >> gsl_sf.cc ###################################################################### # DEPRECATED: gsl_sf_legendre_sphPlm_array 2.0 export octave_name=gsl_sf_legendre_sphPlm_array export funcname=gsl_sf_legendre_sphPlm_array cat << \EOF > docstring.txt Computes an array of normalized associated Legendre functions @iftex @tex $\\sqrt{(2l+1)/(4\\pi)} \\sqrt{(l-m)!/(l+m)!} P_l^m(x)$ for $m >= 0, l = |m|, ..., lmax, |x| <= 1.0$ @end tex @end iftex @ifinfo sqrt((2l+1)/(4*pi)) * sqrt((l-m)!/(l+m)!) Plm (x) for m >= 0, l = |m|, ..., lmax, |x| <= 1.0 @end ifinfo EOF ${RT} LID_D_array >> gsl_sf.cc ## Deprecated naming scheme export octave_name=legendre_sphPlm_array export funcname=gsl_sf_legendre_sphPlm_array ${RT} LID_D_array >> gsl_sf.cc ###################################################################### # DEPRECATED: gsl_sf_legendre_sphPlm_deriv_array 2.0 export octave_name=gsl_sf_legendre_sphPlm_deriv_array export funcname=gsl_sf_legendre_sphPlm_deriv_array cat << \EOF > docstring.txt Computes an array of normalized associated Legendre functions @iftex @tex $\\sqrt{(2l+1)/(4\\pi)} \\sqrt{(l-m)!/(l+m)!} P_l^m(x)$ for $m \geq 0, l = |m|, ..., lmax, |x| <= 1.0$ @end tex @end iftex @ifinfo sqrt((2l+1)/(4*pi)) * sqrt((l-m)!/(l+m)!) Plm (x) for m >= 0, l = |m|, ..., lmax, |x| <= 1.0 @end ifinfo and their derivatives. EOF ${RT} LID_DD_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_array export funcname=gsl_sf_legendre_array_e cat << \EOF > docstring.txt Calculate all normalized associated Legendre polynomials for 0 <= l <= lmax and 0 <= m <= l for |x| <= 1. The norm parameter specifies which normalization is used. The array index of P_l^m is given by l(l+1)/2+m. To include or exclude the Condon-Shortley phase factor of (-1)^m, set the fourth parameter to either -1 or 1, respectively. EOF ${RT} NSDD_D_array >> gsl_sf.cc ###################################################################### export octave_name=gsl_sf_legendre_deriv_array export funcname=gsl_sf_legendre_deriv_array_e cat << \EOF > docstring.txt Calculate all normalized associated Legendre polynomials and their first derivatives for 0 <= l <= lmax and 0 <= m <= l for |x| <= 1. The norm parameter specifies which normalization is used. The array index of P_l^m is given by l(l+1)/2+m. To include or exclude the Condon-Shortley phase factor of (-1)^m, set the fourth parameter to either -1 or 1, respectively. EOF ${RT} NSDD_DD_array >> gsl_sf.cc ###################################################################### export octave_name=legendre_deriv2_array export funcname=gsl_sf_legendre_deriv2_array_e cat << \EOF > docstring.txt Calculate all normalized associated Legendre polynomials and their first and second derivatives for 0 <= l <= lmax and 0 <= m <= l for |x| <= 1. The norm parameter specifies which normalization is used. The array index of P_l^m is given by l(l+1)/2+m. To include or exclude the Condon-Shortley phase factor of (-1)^m, set the fourth parameter to either -1 or 1, respectively. EOF ${RT} NSDD_DDD_array >> gsl_sf.cc ###################################################################### ## Zeta and related functions ## ###################################################################### ## Riemann zeta function export octave_name=gsl_sf_zeta export funcname=gsl_sf_zeta_e cat << \EOF > docstring.txt Computes the Riemann zeta function \zeta(s) for arbitrary s, s \ne 1. The Riemann zeta function is defined by the infinite sum \zeta(s) = \sum_@{k=1@}^\infty k^@{-s@}. EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme (package release 2.0.0) export octave_name=gsl_zt_zeta export funcname=gsl_sf_zeta_e ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme (package release < 2.0.0) export octave_name=zeta export funcname=gsl_sf_zeta_e ${RT} D_D >> gsl_sf.cc export octave_name=gsl_sf_zeta_int export funcname=gsl_sf_zeta_int_e cat << \EOF > docstring.txt Computes the Riemann zeta function \zeta(n) for integer n, n \ne 1. EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme (package release < 2.0.0) export octave_name=zeta_int export funcname=gsl_sf_zeta_int_e ${RT} I_D >> gsl_sf.cc ## Riemann zeta function minus one export octave_name=gsl_sf_zetam1 export funcname=gsl_sf_zetam1_e cat << \EOF > docstring.txt Computes \zeta(s) - 1 for arbitrary s, s \ne 1, where \zeta denotes the Riemann zeta function. @seealso{gsl_sf_zeta} EOF ${RT} D_D >> gsl_sf.cc export octave_name=gsl_sf_zetam1_int export funcname=gsl_sf_zetam1_int_e cat << \EOF > docstring.txt Computes \zeta(s) - 1 for integer n, n \ne 1, where \zeta denotes the Riemann zeta function. @seealso{gsl_sf_zetam1, gsl_sf_zeta, gsl_sf_zeta_int} EOF ${RT} I_D >> gsl_sf.cc ## Dirichlet eta function export octave_name=gsl_sf_eta export funcname=gsl_sf_eta_e cat << \EOF > docstring.txt Computes the eta function \eta(s) for arbitrary s. The eta function is defined by \eta(s) = (1-2^@{1-s@}) \zeta EOF ${RT} D_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=eta export funcname=gsl_sf_eta_e ${RT} D_D >> gsl_sf.cc export octave_name=gsl_sf_eta_int export funcname=gsl_sf_eta_int_e cat << \EOF > docstring.txt Computes the eta function \eta(n) for integer n. EOF ${RT} I_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=eta_int export funcname=gsl_sf_eta_int_e ${RT} I_D >> gsl_sf.cc ## Hurwitz zeta function export octave_name=gsl_sf_hzeta export funcname=gsl_sf_hzeta_e cat << \EOF > docstring.txt Computes the Hurwitz zeta function \zeta(s,q) for s > 1, q > 0. EOF ${RT} DD_D >> gsl_sf.cc ## Deprecated naming scheme export octave_name=hzeta export funcname=gsl_sf_hzeta_e ${RT} DD_D >> gsl_sf.cc gsl-2.1.1/src/PaxHeaders.7911/LD_D_array.template.cc0000644000000000000000000000013213311744162016630 xustar0030 mtime=1529333874.243776698 30 atime=1529333875.995775278 30 ctime=1529333876.223775085 gsl-2.1.1/src/LD_D_array.template.cc0000644000175000017500000000507413311744162017074 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2})\n\ @deftypefnx {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n\ ") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that all input arguments are scalar for (int i = 0; i < nb_args; i++) if (! args(i).is_scalar_type ()) { error ("Input argument #%d is not scalar. " "All input arguments are expected to be scalar.", i + 1); print_usage (); return octave_value (); } // Get the value of input argument #1 double arg1_dbl = args(0).scalar_value (); if (arg1_dbl > std::numeric_limits::max ()) { error ("Input argument #1 exceeds the upper limit " "for type int: %lu.", std::numeric_limits::max ()); print_usage (); return octave_value (); } if (arg1_dbl < 0) { error ("Input argument #1 has a negative value. " "A non-negative value was expected."); print_usage (); return octave_value (); } int arg1 = static_cast (arg1_dbl); if ((static_cast (arg1)) != arg1_dbl) { error ("Input argument #1 has a non-integer value. " "An integer value was expected."); print_usage (); return octave_value (); } // Get the value of input argument #2 double arg2 = args(1).scalar_value (); // Declare the array(s) where the results are stored RowVector y1 (arg1+1); // Run the calculation GSL_FUNC_NAME (arg1, arg2, y1.fortran_vec ()); return octave_value (y1); #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/replace_template.sh0000644000000000000000000000013213311744161016410 xustar0030 mtime=1529333873.207777499 30 atime=1529333874.311776643 30 ctime=1529333876.223775085 gsl-2.1.1/src/replace_template.sh0000755000175000017500000000137013311744161016652 0ustar00bectbect00000000000000#!/bin/bash SED=/bin/sed capfuncname=`echo ${funcname}|tr a-z A-Z` ${SED} -e 's/\\/\\\\/g;s/$/\\n\\/g' \ < docstring.txt > docstring2.txt DEPREC_INFO=`grep ${funcname} DEPRECATED` if [ -z "$DEPREC_INFO" ]; then DEPREC_CMD="/DEPRECATION_WARNING/d" else DEPREC_VER=${DEPREC_INFO##* } DEPREC_CMD="s/DEPRECATION_WARNING/\\\\n\\\\\\n@strong{DEPRECATION WARNING}: ${funcname} has been deprecated in GSL ${DEPREC_VER}\\\\n\\\\\\n\\\\n\\\\/" fi ${SED} -e "s/GSL_OCTAVE_NAME/$octave_name/g" \ -e "s/GSL_FUNC_NAME/$funcname/g" \ -e "s/HAVE_GSL_FUNC/HAVE_$capfuncname/g" \ -e "/GSL_FUNC_DOCSTRING/r docstring2.txt" \ -e "/GSL_FUNC_DOCSTRING/d" \ -e "${DEPREC_CMD}" \ $1.template.cc rm -f docstring2.txt gsl-2.1.1/src/PaxHeaders.7911/DEPRECATED0000644000000000000000000000013213311744161014071 xustar0030 mtime=1529333873.227777484 30 atime=1529333873.231777481 30 ctime=1529333876.223775085 gsl-2.1.1/src/DEPRECATED0000644000175000017500000000026013311744161014325 0ustar00bectbect00000000000000# This file is generated by bootstrap gsl_sf_legendre_Plm_array 2.0 gsl_sf_legendre_Plm_deriv_array 2.0 gsl_sf_legendre_sphPlm_array 2.0 gsl_sf_legendre_sphPlm_deriv_array 2.0 gsl-2.1.1/src/PaxHeaders.7911/DDD_D.template.cc0000644000000000000000000000013113311744162015525 xustar0030 mtime=1529333874.087776821 29 atime=1529333875.85977539 30 ctime=1529333876.223775085 gsl-2.1.1/src/DDD_D.template.cc0000644000175000017500000000665213311744162015775 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{arg2}, @var{arg3})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 3; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input arguments as NDArray objects NDArray arg1 = args(0).array_value(); NDArray arg2 = args(1).array_value(); NDArray arg3 = args(2).array_value(); // Get the dimensions of the arrays dim_vector dim (1, 1); octave_idx_type numel = 1; bool conformant = true; bool arg1_scalar = check_arg_dim (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/I_D.template.cc0000644000000000000000000000013213311744162015323 xustar0030 mtime=1529333874.147776774 30 atime=1529333875.659775554 30 ctime=1529333876.223775085 gsl-2.1.1/src/I_D.template.cc0000644000175000017500000000566313311744162015573 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 1; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { // Convert argument #1 to int double t1 = arg1_data[i]; int x1 = static_cast (t1); if ((static_cast (x1)) != t1) { y.xelem(i) = lo_ieee_nan_value (); err.xelem(i) = lo_ieee_nan_value (); continue; } GSL_FUNC_NAME (x1, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/gsl_sf.header.cc0000644000000000000000000000013213311744161015561 xustar0030 mtime=1529333873.207777499 30 atime=1529333874.311776643 30 ctime=1529333876.223775085 gsl-2.1.1/src/gsl_sf.header.cc0000644000175000017500000000427113311744161016023 0ustar00bectbect00000000000000/* Copyright (C) 2004 Teemu Ikonen Copyright (C) 2016 Susi Lehtola Copyright (C) 2016 Julien Bect This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . */ #include "config.h" #include #include #include #include #include #include #include #ifdef OCTAVE_HAS_OV_ISREAL_METHOD #define ISREAL(x) ((x).isreal ()) #else #define ISREAL(x) ((x).is_real_type ()) #endif void octave_gsl_errorhandler (const char * reason, const char * file, int line, int gsl_errno) { error("GSL error %d at %s, line %d: %s\n", gsl_errno, file, line, reason); } DEFUN_DLD (gsl_sf, args, nargout, "-*- texinfo -*-\n\ @deftypefn {Loadable Function} gsl_sf ()\n\ \n\ gsl_sf is an oct-file containing Octave bindings to the \ special functions of the GNU Scientific Library (GSL).\n\ \n\ @end deftypefn\n") { #ifdef OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE octave::feval ("help", octave_value ("gsl_sf")); #else feval ("help", octave_value ("gsl_sf")); #endif return octave_value(); } template bool check_arg_dim ( A arg, dim_vector &dim, octave_idx_type &numel, bool &conformant ) { dim_vector arg_dim = arg.dims (); octave_idx_type arg_numel = arg.numel (); // If this is a scalar argument, nothing more to do. // The return value indicates that this is a scalar argument. if (arg_numel == 1) return true; if (numel == 1) { dim = arg_dim; numel = arg_numel; } else if (arg_dim != dim) { conformant = false; } return false; } gsl-2.1.1/src/PaxHeaders.7911/generate_array_template.sh0000644000000000000000000000013013311744161017763 xustar0030 mtime=1529333873.207777499 28 atime=1529333874.2397767 30 ctime=1529333876.223775085 gsl-2.1.1/src/generate_array_template.sh0000755000175000017500000002213213311744161020226 0ustar00bectbect00000000000000#!/bin/bash ## Copyright (C) 2016 Susi Lehtola ## Copyright (C) 2016 Julien Bect ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . ## generate_array_template.sh generates wrapper templates for GSL ## special function of the 'array' type'. It is used by bootstrap. ## ## CALL: generate_array_template.sh T1 ... Tn ARRLEN NOUT OUTF ## ## where T1, T2, ... Tn are the input argument types, ARRLEN indicates ## how to compute the length of the array, NOUT is the number of ## output arguments and OUTF the template file name. ## Get the arguments args=($@) nargs=${#args[@]} ## Types are let npars=$nargs-3 pars=(${args[@]:0:$ntypes}) ## Array length is arrlen=${args[nargs-3]} ## Number of outputs is nout=${args[nargs-2]} ## Output file is outf=${args[nargs-1]} ## Using Legendre norm parameter? if [[ ${1} == "legnorm" ]]; then legnorm=1 else legnorm=0 fi cat > $outf < 1)); then outvars="$outvars," fi outvars="$outvars z${i}" done outvars="$outvars )"; fi echo -n "@deftypefn {Loadable Function} {$outvars =} GSL_OCTAVE_NAME (" >> $outf for ((i=1; i<=npars; i++)); do if ((i > 1)); then echo -n ", " >> $outf fi echo -n "@var{arg${i}}" >> $outf done cat >> $outf <> $outf <> $outf <> $outf < std::numeric_limits<$2>::max ())" >> $outf echo " {" >> $outf echo " error (\"Input argument #$1 exceeds the upper limit \"" >> $outf echo " \"for type $2: %lu.\", std::numeric_limits<$2>::max ());" >> $outf echo " print_usage ();" >> $outf echo " return octave_value ();" >> $outf echo " }" >> $outf } ## Check lower overflow check_overflow_low () { echo " if (arg$1_dbl < std::numeric_limits<$2>::min ())" >> $outf echo " {" >> $outf echo " error (\"Input argument #$1 exceeds the lower limit \"" >> $outf echo " \"for type $2: -%lu.\", -std::numeric_limits<$2>::min ());" >> $outf echo " print_usage ();" >> $outf echo " return octave_value ();" >> $outf echo " }" >> $outf } ## Check positivity check_positivity () { echo " if (arg$1_dbl < 0)" >> $outf echo " {" >> $outf echo " error (\"Input argument #$1 has a negative value. \"" >> $outf echo " \"A non-negative value was expected.\");" >> $outf echo " print_usage ();" >> $outf echo " return octave_value ();" >> $outf echo " }" >> $outf } ## Check integrity check_integer () { echo " if ((static_cast (arg$1)) != arg$1_dbl)" >> $outf echo " {" >> $outf echo " error (\"Input argument #$1 has a non-integer value. \"" >> $outf echo " \"An integer value was expected.\");" >> $outf echo " print_usage ();" >> $outf echo " return octave_value ();" >> $outf echo " }" >> $outf } ## Get the input for ((i=imin; i<=npars; i++)); do echo " // Get the value of input argument #$i" >> $outf let oi=i-1 if [[ ${!i} == "double" ]]; then echo " double arg${i} = args(${oi}).scalar_value ();" >> $outf else echo " double arg${i}_dbl = args(${oi}).scalar_value ();" >> $outf if [[ ${!i} == "int" ]]; then check_overflow_upp $i "int" check_overflow_low $i "int" echo " int arg${i} = static_cast (arg${i}_dbl);" >> $outf elif [[ ${!i} == "int+" ]]; then check_overflow_upp $i "int" check_positivity $i "int" echo " int arg${i} = static_cast (arg${i}_dbl);" >> $outf elif [[ ${!i} == "uint" ]]; then check_overflow_upp $i "unsigned int" check_positivity $i echo " unsigned int arg${i} = static_cast (arg${i}_dbl);" >> $outf elif [[ ${!i} == "size_t" ]]; then check_overflow_upp $i "size_t" check_positivity $i echo " size_t arg${i} = static_cast (arg${i}_dbl);" >> $outf else echo "Unknown type ${!i}!" exit fi check_integer $i fi echo "" >> $outf done ## Declare result array echo " // Declare the array(s) where the results are stored" >> $outf for ((i=1; i<=nout; i++)); do if ((legnorm)); then ## Legendre arrays need to be longer to account for work memory requirements echo " RowVector y${i} (gsl_sf_legendre_array_n ($arrlen));" >> $outf else echo " RowVector y${i} ($arrlen);" >> $outf fi done ## Run the calculation echo "" >> $outf echo " // Run the calculation" >> $outf echo -n " GSL_FUNC_NAME (" >> $outf if ((legnorm)); then echo -n "legnorm, " >> $outf fi for ((i=imin; i<=npars; i++)); do echo -n "arg${i}, " >> $outf done for ((i=1; i<=nout; i++)); do echo -n "y${i}.fortran_vec ()" >> $outf if ((i != nout)); then echo -n ", " >> $outf fi done echo -e ");\n" >> $outf ## Resize outputs to get rid of working memory if ((legnorm)); then for ((i=1; i<=nout; i++)); do echo " y${i}.resize (gsl_sf_legendre_array_index ($arrlen, $arrlen) + 1);" >> $outf done fi ## Return if ((nout == 1)); then echo " return octave_value (y1);" >> $outf else echo " octave_value_list retval;" >> $outf for ((i=1; i<=nout; i++)); do let io=i-1 echo " retval(${io}) = octave_value (y${i});" >> $outf done echo " return retval;" >> $outf fi cat >> $outf < (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/DM_D.template.cc0000644000000000000000000000013213311744162015433 xustar0030 mtime=1529333874.115776799 30 atime=1529333875.455775722 30 ctime=1529333876.223775085 gsl-2.1.1/src/DM_D.template.cc0000644000175000017500000000663713311744162015705 0ustar00bectbect00000000000000 // PKG_ADD: autoload ("GSL_OCTAVE_NAME", which ("gsl_sf")); DEFUN_DLD(GSL_OCTAVE_NAME, args, nargout, "\ -*- texinfo -*-\n\ @deftypefn {Loadable Function} {@var{z} =} GSL_OCTAVE_NAME (@var{arg1}, @var{mode})\n\ @deftypefnx {Loadable Function} {[@var{z}, @var{err}] =} GSL_OCTAVE_NAME (@dots{})\n\ \n\ GSL_FUNC_DOCSTRING \n\ @var{err} contains an estimate of the absolute error in the value @var{z}.\n\ \n\ The argument @var{mode} must be an integer corresponding to\n\ \n\ @table @asis\n\ @item 0 = GSL_PREC_DOUBLE\n\ Double-precision, a relative accuracy of approximately @code{2e-16}.\n\ @item 1 = GSL_PREC_SINGLE\n\ Single-precision, a relative accuracy of approximately @code{1e-7}.\n\ @item 2 = GSL_PREC_APPROX\n\ Approximate values, a relative accuracy of approximately @code{5e-4}.\n\ @end table\n\ \n\ This function is from the GNU Scientific Library,\n\ see @url{http://www.gnu.org/software/gsl/} for documentation.\n\ DEPRECATION_WARNING @end deftypefn\n") { #ifdef HAVE_GSL_FUNC gsl_set_error_handler (octave_gsl_errorhandler); // Expected number of input arguments const int nb_args = 2; // Check the actual number of input arguments if (args.length() != nb_args) { print_usage (); return octave_value (); } // Check that all input arguments are real for (int i = 0; i < nb_args; i++) if (! ISREAL(args(i))) { error ("Input argument #%d has a complex value. " "A real value was expected.", i + 1); print_usage (); return octave_value (); } // Check that the mode argument is scalar if (! args(1).is_scalar_type ()) { error ("The mode argument must be scalar."); print_usage (); return octave_value (); } // Check that the mode argument has a valid value double tmp_mode_dbl = args(1).double_value (); gsl_mode_t mode; if (tmp_mode_dbl == 0.0) mode = GSL_PREC_DOUBLE; else if (tmp_mode_dbl == 1.0) mode = GSL_PREC_SINGLE; else if (tmp_mode_dbl == 2.0) mode = GSL_PREC_APPROX; else { error ("The 'mode' argument must be 0, 1, or 2."); print_usage (); return octave_value (); } // Get input argument as NDArray object NDArray arg1 = args(0).array_value(); // Get the dimension of the array dim_vector dim (arg1.dims ()); octave_idx_type numel = dim.numel (); // Get a pointer to the data of the input array const double *arg1_data = arg1.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { GSL_FUNC_NAME (arg1_data[i], mode, &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++) { GSL_FUNC_NAME (arg1_data[i], mode, &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/src/PaxHeaders.7911/configure.ac0000644000000000000000000000013213311744161015034 xustar0030 mtime=1529333873.547777238 30 atime=1529333873.647777161 30 ctime=1529333876.223775085 gsl-2.1.1/src/configure.ac0000644000175000017500000006726013311744161015305 0ustar00bectbect00000000000000dnl --- DO NOT EDIT --- dnl configure.ac is generated by bootstrap from configure.ac.in. dnl Edit configure.ac.in and reprocess instead of modifying ./configure.ac. dnl Copyright (C) 2016, 2018 Julien Bect dnl dnl This program is free software; you can redistribute it and/or modify dnl it under the terms of the GNU General Public License as published by dnl the Free Software Foundation; either version 2 of the License, or dnl (at your option) any later version. dnl dnl This program is distributed in the hope that it will be useful, dnl but WITHOUT ANY WARRANTY; without even the implied warranty of dnl MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the dnl GNU General Public License for more details. dnl dnl You should have received a copy of the GNU General Public License dnl along with this program; if not, see . dnl autoconf 2.13 certainly doesn't work! What is the minimum requirement? AC_PREREQ(2.2) AC_INIT([Octave Forge gsl package], [2.1.1]) AC_CONFIG_HEADERS([config.h]) dnl Check for mkoctfile AC_PATH_PROG([MKOCTFILE],[mkoctfile]) test -z "$MKOCTFILE" && AC_MSG_ERROR([mkoctfile not found]) dnl Check for octave (used to get cannical_host_type) AC_PATH_PROG([OCTAVE],[octave]) test -z "$OCTAVE" && AC_MSG_ERROR([octave not found]) dnl ***************************** dnl *** System-specific stuff *** dnl ***************************** dnl Grab canonical host type so we can write system specific install stuff AC_MSG_CHECKING([for Octave's canonical_host_type]) canonical_host_type=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('canonical_host_type')) \ else \ disp (octave_config_info ('canonical_host_type')) \ end"` AC_MSG_RESULT([${canonical_host_type}]) dnl GSL specific preprocessor flags AC_SUBST([GSL_DEFINES]) dnl Set appropriate preprocessor flags for canonical_host_type ending with -msdosmsvc case ${canonical_host_type} in *-msdosmsvc) GSL_DEFINES="-DWIN32 -DGSL_DLL" ;; esac dnl ********************************* dnl *** Test some Octave features *** dnl ********************************* dnl Find Octave's include directory AC_MSG_CHECKING([for Octave's include directory]) octave_include_dir=`$OCTAVE -qf --eval " \ if exist ('__octave_config_info__') \ disp (__octave_config_info__ ('octincludedir')) \ else \ disp (octave_config_info ('octincludedir')) \ end"` AC_MSG_RESULT([${octave_include_dir}]) dnl Save initial state save_CPPFLAGS=${CPPFLAG} AC_LANG_PUSH([C++]) dnl Add octave include dir to CPPFLAGS CPPFLAGS="-I${octave_include_dir} ${CPPFLAGS}" dnl Detect ov-scalar.h AC_CHECK_HEADER([ov-scalar.h],,[AC_MSG_ERROR([ov-scalar.h header not found])]) AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[ #include "ov-scalar.h" main() { octave_scalar x (1.234); bool y = x.isreal (); return 0; } ]]) ], [AC_DEFINE( [OCTAVE_HAS_OV_ISREAL_METHOD], [1], [Define is the octave_value class has .isreal().]) ] ) AC_COMPILE_IFELSE( [AC_LANG_SOURCE( [[ #include "ov-scalar.h" #include "ovl.h" #include "parse.h" main() { octave_value_list ovl = octave::feval ("sin", octave_value (1.234)); return 0; } ]]) ], [AC_DEFINE( [OCTAVE_HAS_FEVAL_IN_OCTAVE_NAMESPACE], [1], [Define is feval is the octave namespace.]) ] ) dnl Restore initial state AC_LANG_PUSH([C++]) CPPFLAGS=${save_CPPFLAGS} dnl *************************************** dnl *** Check if the GSL library exists *** dnl *************************************** dnl See GSL manual, Appendix C: "Autoconf macros" AC_CHECK_LIB([m],[cos],,[AC_MSG_ERROR([math library not found])]) AC_CHECK_LIB([gslcblas],[cblas_dgemm],,[AC_MSG_ERROR([gslcblas library not found])]) AC_CHECK_LIB([gsl],[gsl_message],,[AC_MSG_ERROR([GSL library not found])]) # Auto-generated tests for GSL functions AC_CHECK_FUNCS([gsl_sf_clausen_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_clausen"]) AC_CHECK_FUNCS([gsl_sf_clausen_e],,[GSL_MISSING="${GSL_MISSING} clausen"]) AC_CHECK_FUNCS([gsl_sf_dawson_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_dawson"]) AC_CHECK_FUNCS([gsl_sf_dawson_e],,[GSL_MISSING="${GSL_MISSING} dawson"]) AC_CHECK_FUNCS([gsl_sf_debye_1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_1"]) AC_CHECK_FUNCS([gsl_sf_debye_1_e],,[GSL_MISSING="${GSL_MISSING} debye_1"]) AC_CHECK_FUNCS([gsl_sf_debye_2_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_2"]) AC_CHECK_FUNCS([gsl_sf_debye_2_e],,[GSL_MISSING="${GSL_MISSING} debye_2"]) AC_CHECK_FUNCS([gsl_sf_debye_3_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_3"]) AC_CHECK_FUNCS([gsl_sf_debye_3_e],,[GSL_MISSING="${GSL_MISSING} debye_3"]) AC_CHECK_FUNCS([gsl_sf_debye_4_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_4"]) AC_CHECK_FUNCS([gsl_sf_debye_4_e],,[GSL_MISSING="${GSL_MISSING} debye_4"]) AC_CHECK_FUNCS([gsl_sf_debye_5_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_5"]) AC_CHECK_FUNCS([gsl_sf_debye_6_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_debye_6"]) AC_CHECK_FUNCS([gsl_sf_dilog_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_dilog"]) AC_CHECK_FUNCS([gsl_sf_erf_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_erf"]) AC_CHECK_FUNCS([gsl_sf_erf_e],,[GSL_MISSING="${GSL_MISSING} erf_gsl"]) AC_CHECK_FUNCS([gsl_sf_erfc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_erfc"]) AC_CHECK_FUNCS([gsl_sf_erfc_e],,[GSL_MISSING="${GSL_MISSING} erfc_gsl"]) AC_CHECK_FUNCS([gsl_sf_log_erfc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_log_erfc"]) AC_CHECK_FUNCS([gsl_sf_log_erfc_e],,[GSL_MISSING="${GSL_MISSING} log_erfc"]) AC_CHECK_FUNCS([gsl_sf_erf_Z_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_erf_Z"]) AC_CHECK_FUNCS([gsl_sf_erf_Z_e],,[GSL_MISSING="${GSL_MISSING} erf_Z"]) AC_CHECK_FUNCS([gsl_sf_erf_Q_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_erf_Q"]) AC_CHECK_FUNCS([gsl_sf_erf_Q_e],,[GSL_MISSING="${GSL_MISSING} erf_Q"]) AC_CHECK_FUNCS([gsl_sf_hazard_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hazard"]) AC_CHECK_FUNCS([gsl_sf_hazard_e],,[GSL_MISSING="${GSL_MISSING} hazard"]) AC_CHECK_FUNCS([gsl_sf_expm1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_expm1"]) AC_CHECK_FUNCS([gsl_sf_expm1_e],,[GSL_MISSING="${GSL_MISSING} expm1"]) AC_CHECK_FUNCS([gsl_sf_exprel_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_exprel"]) AC_CHECK_FUNCS([gsl_sf_exprel_e],,[GSL_MISSING="${GSL_MISSING} exprel"]) AC_CHECK_FUNCS([gsl_sf_exprel_2_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_exprel_2"]) AC_CHECK_FUNCS([gsl_sf_exprel_2_e],,[GSL_MISSING="${GSL_MISSING} exprel_2"]) AC_CHECK_FUNCS([gsl_sf_expint_E1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_expint_E1"]) AC_CHECK_FUNCS([gsl_sf_expint_E1_e],,[GSL_MISSING="${GSL_MISSING} expint_E1"]) AC_CHECK_FUNCS([gsl_sf_expint_E2_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_expint_E2"]) AC_CHECK_FUNCS([gsl_sf_expint_E2_e],,[GSL_MISSING="${GSL_MISSING} expint_E2"]) AC_CHECK_FUNCS([gsl_sf_expint_Ei_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_expint_Ei"]) AC_CHECK_FUNCS([gsl_sf_expint_Ei_e],,[GSL_MISSING="${GSL_MISSING} expint_Ei"]) AC_CHECK_FUNCS([gsl_sf_Shi_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_Shi"]) AC_CHECK_FUNCS([gsl_sf_Shi_e],,[GSL_MISSING="${GSL_MISSING} Shi"]) AC_CHECK_FUNCS([gsl_sf_Chi_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_Chi"]) AC_CHECK_FUNCS([gsl_sf_Chi_e],,[GSL_MISSING="${GSL_MISSING} Chi"]) AC_CHECK_FUNCS([gsl_sf_expint_3_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_expint_3"]) AC_CHECK_FUNCS([gsl_sf_expint_3_e],,[GSL_MISSING="${GSL_MISSING} expint_3"]) AC_CHECK_FUNCS([gsl_sf_Si_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_Si"]) AC_CHECK_FUNCS([gsl_sf_Si_e],,[GSL_MISSING="${GSL_MISSING} Si"]) AC_CHECK_FUNCS([gsl_sf_Ci_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_Ci"]) AC_CHECK_FUNCS([gsl_sf_Ci_e],,[GSL_MISSING="${GSL_MISSING} Ci"]) AC_CHECK_FUNCS([gsl_sf_atanint_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_atanint"]) AC_CHECK_FUNCS([gsl_sf_atanint_e],,[GSL_MISSING="${GSL_MISSING} atanint"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_mhalf_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_mhalf"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_mhalf_e],,[GSL_MISSING="${GSL_MISSING} fermi_dirac_mhalf"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_half_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_half"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_half_e],,[GSL_MISSING="${GSL_MISSING} fermi_dirac_half"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_3half_e],,[GSL_MISSING="${GSL_MISSING} gsm_sf_fermi_dirac_3half"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_3half_e],,[GSL_MISSING="${GSL_MISSING} fermi_dirac_3half"]) AC_CHECK_FUNCS([gsl_sf_gamma_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gamma"]) AC_CHECK_FUNCS([gsl_sf_gamma_e],,[GSL_MISSING="${GSL_MISSING} gamma_gsl"]) AC_CHECK_FUNCS([gsl_sf_lngamma_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lngamma"]) AC_CHECK_FUNCS([gsl_sf_lngamma_e],,[GSL_MISSING="${GSL_MISSING} lngamma_gsl"]) AC_CHECK_FUNCS([gsl_sf_gammastar_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gammastar"]) AC_CHECK_FUNCS([gsl_sf_gammastar_e],,[GSL_MISSING="${GSL_MISSING} gammastar"]) AC_CHECK_FUNCS([gsl_sf_gammainv_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gammainv"]) AC_CHECK_FUNCS([gsl_sf_gammainv_e],,[GSL_MISSING="${GSL_MISSING} gammainv_gsl"]) AC_CHECK_FUNCS([gsl_sf_lambert_W0_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lambert_W0"]) AC_CHECK_FUNCS([gsl_sf_gammastar_e],,[GSL_MISSING="${GSL_MISSING} gammastar"]) AC_CHECK_FUNCS([gsl_sf_lambert_W0_e],,[GSL_MISSING="${GSL_MISSING} lambert_W0"]) AC_CHECK_FUNCS([gsl_sf_lambert_Wm1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lambert_Wm1"]) AC_CHECK_FUNCS([gsl_sf_lambert_Wm1_e],,[GSL_MISSING="${GSL_MISSING} lambert_Wm1"]) AC_CHECK_FUNCS([gsl_sf_log_1plusx_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_log_1plusx"]) AC_CHECK_FUNCS([gsl_sf_log_1plusx_e],,[GSL_MISSING="${GSL_MISSING} log_1plusx"]) AC_CHECK_FUNCS([gsl_sf_log_1plusx_mx_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_log_1plusx_mx"]) AC_CHECK_FUNCS([gsl_sf_log_1plusx_mx_e],,[GSL_MISSING="${GSL_MISSING} log_1plusx_mx"]) AC_CHECK_FUNCS([gsl_sf_psi_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_psi"]) AC_CHECK_FUNCS([gsl_sf_psi_e],,[GSL_MISSING="${GSL_MISSING} psi"]) AC_CHECK_FUNCS([gsl_sf_psi_1piy_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_psi_1piy"]) AC_CHECK_FUNCS([gsl_sf_psi_1piy_e],,[GSL_MISSING="${GSL_MISSING} psi_1piy"]) AC_CHECK_FUNCS([gsl_sf_synchrotron_1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_synchrotron_1"]) AC_CHECK_FUNCS([gsl_sf_synchrotron_1_e],,[GSL_MISSING="${GSL_MISSING} synchrotron_1"]) AC_CHECK_FUNCS([gsl_sf_synchrotron_2_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_synchrotron_2"]) AC_CHECK_FUNCS([gsl_sf_synchrotron_2_e],,[GSL_MISSING="${GSL_MISSING} synchrotron_2"]) AC_CHECK_FUNCS([gsl_sf_transport_2_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_transport_2"]) AC_CHECK_FUNCS([gsl_sf_transport_2_e],,[GSL_MISSING="${GSL_MISSING} transport_2"]) AC_CHECK_FUNCS([gsl_sf_transport_3_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_transport_3"]) AC_CHECK_FUNCS([gsl_sf_transport_3_e],,[GSL_MISSING="${GSL_MISSING} transport_3"]) AC_CHECK_FUNCS([gsl_sf_transport_4_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_transport_4"]) AC_CHECK_FUNCS([gsl_sf_transport_4_e],,[GSL_MISSING="${GSL_MISSING} transport_4"]) AC_CHECK_FUNCS([gsl_sf_transport_5_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_transport_5"]) AC_CHECK_FUNCS([gsl_sf_transport_5_e],,[GSL_MISSING="${GSL_MISSING} transport_5"]) AC_CHECK_FUNCS([gsl_sf_sinc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_sinc"]) AC_CHECK_FUNCS([gsl_sf_sinc_e],,[GSL_MISSING="${GSL_MISSING} sinc_gsl"]) AC_CHECK_FUNCS([gsl_sf_lnsinh_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lnsinh"]) AC_CHECK_FUNCS([gsl_sf_lnsinh_e],,[GSL_MISSING="${GSL_MISSING} lnsinh"]) AC_CHECK_FUNCS([gsl_sf_lncosh_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lncosh"]) AC_CHECK_FUNCS([gsl_sf_lncosh_e],,[GSL_MISSING="${GSL_MISSING} lncosh"]) AC_CHECK_FUNCS([gsl_sf_bessel_Jn_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jn"]) AC_CHECK_FUNCS([gsl_sf_bessel_Jn_e],,[GSL_MISSING="${GSL_MISSING} bessel_Jn"]) AC_CHECK_FUNCS([gsl_sf_bessel_Yn_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Yn"]) AC_CHECK_FUNCS([gsl_sf_bessel_Yn_e],,[GSL_MISSING="${GSL_MISSING} bessel_Yn"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_e],,[GSL_MISSING="${GSL_MISSING} bessel_In"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_In_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_e],,[GSL_MISSING="${GSL_MISSING} bessel_Kn"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_Kn_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_jl_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl"]) AC_CHECK_FUNCS([gsl_sf_bessel_jl_e],,[GSL_MISSING="${GSL_MISSING} bessel_jl"]) AC_CHECK_FUNCS([gsl_sf_bessel_yl_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_yl"]) AC_CHECK_FUNCS([gsl_sf_bessel_yl_e],,[GSL_MISSING="${GSL_MISSING} bessel_yl"]) AC_CHECK_FUNCS([gsl_sf_bessel_il_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_il_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_il_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_il_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_kl_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_kl_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_kl_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_kl_scaled"]) AC_CHECK_FUNCS([gsl_sf_exprel_n_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_exprel_n"]) AC_CHECK_FUNCS([gsl_sf_exprel_n_e],,[GSL_MISSING="${GSL_MISSING} exprel_n"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_int"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_int_e],,[GSL_MISSING="${GSL_MISSING} fermi_dirac_int"]) AC_CHECK_FUNCS([gsl_sf_taylorcoeff_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_taylorcoeff"]) AC_CHECK_FUNCS([gsl_sf_taylorcoeff_e],,[GSL_MISSING="${GSL_MISSING} taylorcoeff"]) AC_CHECK_FUNCS([gsl_sf_legendre_Pl_e],,) AC_CHECK_FUNCS([gsl_sf_legendre_Pl_e],,) AC_CHECK_FUNCS([gsl_sf_legendre_Ql_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_Ql"]) AC_CHECK_FUNCS([gsl_sf_legendre_Ql_e],,[GSL_MISSING="${GSL_MISSING} legendre_Ql"]) AC_CHECK_FUNCS([gsl_sf_mathieu_a_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_a"]) AC_CHECK_FUNCS([gsl_sf_mathieu_b_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_b"]) AC_CHECK_FUNCS([gsl_sf_psi_n_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_psi_n"]) AC_CHECK_FUNCS([gsl_sf_psi_n_e],,[GSL_MISSING="${GSL_MISSING} psi_n"]) AC_CHECK_FUNCS([gsl_sf_bessel_Jnu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jnu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Jnu_e],,[GSL_MISSING="${GSL_MISSING} bessel_Jnu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Ynu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Ynu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Ynu_e],,[GSL_MISSING="${GSL_MISSING} bessel_Ynu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Inu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Inu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Inu_e],,[GSL_MISSING="${GSL_MISSING} bessel_Inu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Inu_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Inu_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_Inu_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_Inu_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_Knu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Knu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Knu_e],,[GSL_MISSING="${GSL_MISSING} bessel_Knu"]) AC_CHECK_FUNCS([gsl_sf_bessel_lnKnu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_lnKnu"]) AC_CHECK_FUNCS([gsl_sf_bessel_lnKnu_e],,[GSL_MISSING="${GSL_MISSING} bessel_lnKnu"]) AC_CHECK_FUNCS([gsl_sf_bessel_Knu_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Knu_scaled"]) AC_CHECK_FUNCS([gsl_sf_bessel_Knu_scaled_e],,[GSL_MISSING="${GSL_MISSING} bessel_Knu_scaled"]) AC_CHECK_FUNCS([gsl_sf_exp_mult_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_exp_mult"]) AC_CHECK_FUNCS([gsl_sf_exp_mult_e],,[GSL_MISSING="${GSL_MISSING} exp_mult"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_inc_0_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_fermi_dirac_inc_0"]) AC_CHECK_FUNCS([gsl_sf_fermi_dirac_inc_0_e],,[GSL_MISSING="${GSL_MISSING} fermi_dirac_inc_0"]) AC_CHECK_FUNCS([gsl_sf_poch_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_poch"]) AC_CHECK_FUNCS([gsl_sf_poch_e],,[GSL_MISSING="${GSL_MISSING} poch"]) AC_CHECK_FUNCS([gsl_sf_lnpoch_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lnpoch"]) AC_CHECK_FUNCS([gsl_sf_lnpoch_e],,[GSL_MISSING="${GSL_MISSING} lnpoch"]) AC_CHECK_FUNCS([gsl_sf_pochrel_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_pochrel"]) AC_CHECK_FUNCS([gsl_sf_pochrel_e],,[GSL_MISSING="${GSL_MISSING} pochrel"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_Q_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc_Q"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_Q_e],,[GSL_MISSING="${GSL_MISSING} gamma_inc_Q"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_P_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc_P"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_P_e],,[GSL_MISSING="${GSL_MISSING} gamma_inc_P"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gamma_inc"]) AC_CHECK_FUNCS([gsl_sf_gamma_inc_e],,[GSL_MISSING="${GSL_MISSING} gamma_inc"]) AC_CHECK_FUNCS([gsl_sf_beta_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_beta"]) AC_CHECK_FUNCS([gsl_sf_beta_e],,[GSL_MISSING="${GSL_MISSING} beta_gsl"]) AC_CHECK_FUNCS([gsl_sf_lnbeta_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lnbeta"]) AC_CHECK_FUNCS([gsl_sf_lnbeta_e],,[GSL_MISSING="${GSL_MISSING} lnbeta"]) AC_CHECK_FUNCS([gsl_sf_hyperg_0F1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_0F1"]) AC_CHECK_FUNCS([gsl_sf_hyperg_0F1_e],,[GSL_MISSING="${GSL_MISSING} hyperg_0F1"]) AC_CHECK_FUNCS([gsl_sf_conicalP_half_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_half"]) AC_CHECK_FUNCS([gsl_sf_conicalP_half_e],,[GSL_MISSING="${GSL_MISSING} conicalP_half"]) AC_CHECK_FUNCS([gsl_sf_conicalP_mhalf_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_mhalf"]) AC_CHECK_FUNCS([gsl_sf_conicalP_mhalf_e],,[GSL_MISSING="${GSL_MISSING} conicalP_mhalf"]) AC_CHECK_FUNCS([gsl_sf_conicalP_0_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_0"]) AC_CHECK_FUNCS([gsl_sf_conicalP_0_e],,[GSL_MISSING="${GSL_MISSING} conicalP_0"]) AC_CHECK_FUNCS([gsl_sf_conicalP_1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_1"]) AC_CHECK_FUNCS([gsl_sf_conicalP_1_e],,[GSL_MISSING="${GSL_MISSING} conicalP_1"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_e],,[GSL_MISSING="${GSL_MISSING} airy_Ai"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_e],,[GSL_MISSING="${GSL_MISSING} airy_Bi"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_scaled_e],,[GSL_MISSING="${GSL_MISSING} airy_Ai_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_scaled_e],,[GSL_MISSING="${GSL_MISSING} airy_Bi_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_deriv_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_deriv_e],,[GSL_MISSING="${GSL_MISSING} airy_Ai_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_deriv_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_deriv_e],,[GSL_MISSING="${GSL_MISSING} airy_Bi_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_deriv_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Ai_deriv_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Ai_deriv_scaled_e],,[GSL_MISSING="${GSL_MISSING} airy_Ai_deriv_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_deriv_scaled_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_Bi_deriv_scaled"]) AC_CHECK_FUNCS([gsl_sf_airy_Bi_deriv_scaled_e],,[GSL_MISSING="${GSL_MISSING} airy_Bi_deriv_scaled"]) AC_CHECK_FUNCS([gsl_sf_ellint_Kcomp_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Kcomp"]) AC_CHECK_FUNCS([gsl_sf_ellint_Kcomp_e],,[GSL_MISSING="${GSL_MISSING} ellint_Kcomp"]) AC_CHECK_FUNCS([gsl_sf_ellint_Ecomp_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Ecomp"]) AC_CHECK_FUNCS([gsl_sf_ellint_Ecomp_e],,[GSL_MISSING="${GSL_MISSING} ellint_Ecomp"]) AC_CHECK_FUNCS([gsl_sf_ellint_E_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_E"]) AC_CHECK_FUNCS([gsl_sf_ellint_F_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_F"]) AC_CHECK_FUNCS([gsl_sf_ellint_Pcomp_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_Pcomp"]) AC_CHECK_FUNCS([gsl_sf_ellint_RC_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RC"]) AC_CHECK_FUNCS([gsl_sf_ellint_D_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_D"]) AC_CHECK_FUNCS([gsl_sf_ellint_P_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_P"]) AC_CHECK_FUNCS([gsl_sf_ellint_RD_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RD"]) AC_CHECK_FUNCS([gsl_sf_ellint_RF_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RF"]) AC_CHECK_FUNCS([gsl_sf_ellint_RJ_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_ellint_RJ"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Ai_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Ai"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Ai_e],,[GSL_MISSING="${GSL_MISSING} airy_zero_Ai"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Bi_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Bi"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Bi_e],,[GSL_MISSING="${GSL_MISSING} airy_zero_Bi"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Ai_deriv_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Ai_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Ai_deriv_e],,[GSL_MISSING="${GSL_MISSING} airy_zero_Ai_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Bi_deriv_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_airy_zero_Bi_deriv"]) AC_CHECK_FUNCS([gsl_sf_airy_zero_Bi_deriv_e],,[GSL_MISSING="${GSL_MISSING} airy_zero_Bi_deriv"]) AC_CHECK_FUNCS([gsl_sf_bessel_zero_J0_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_J0"]) AC_CHECK_FUNCS([gsl_sf_bessel_zero_J0_e],,[GSL_MISSING="${GSL_MISSING} bessel_zero_J0"]) AC_CHECK_FUNCS([gsl_sf_bessel_zero_J1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_J1"]) AC_CHECK_FUNCS([gsl_sf_bessel_zero_J1_e],,[GSL_MISSING="${GSL_MISSING} bessel_zero_J1"]) AC_CHECK_FUNCS([gsl_sf_psi_1_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_psi_1_int"]) AC_CHECK_FUNCS([gsl_sf_psi_1_int_e],,[GSL_MISSING="${GSL_MISSING} psi_1_int"]) AC_CHECK_FUNCS([gsl_sf_conicalP_cyl_reg_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_cyl_reg"]) AC_CHECK_FUNCS([gsl_sf_conicalP_sph_reg_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_conicalP_sph_reg"]) AC_CHECK_FUNCS([gsl_sf_gegenpoly_n_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gegenpoly_n"]) AC_CHECK_FUNCS([gsl_sf_laguerre_n_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_laguerre_n"]) AC_CHECK_FUNCS([gsl_sf_mathieu_ce_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_ce"]) AC_CHECK_FUNCS([gsl_sf_mathieu_se_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_se"]) AC_CHECK_FUNCS([gsl_sf_hyperg_U_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_U_int"]) AC_CHECK_FUNCS([gsl_sf_hyperg_1F1_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_1F1_int"]) AC_CHECK_FUNCS([gsl_sf_legendre_Plm_e],,) AC_CHECK_FUNCS([gsl_sf_legendre_Plm_e],,) AC_CHECK_FUNCS([gsl_sf_legendre_sphPlm_e],,) AC_CHECK_FUNCS([gsl_sf_legendre_sphPlm_e],,) AC_CHECK_FUNCS([gsl_sf_hydrogenicR_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hydrogenicR"]) AC_CHECK_FUNCS([gsl_sf_mathieu_Mc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_Mc"]) AC_CHECK_FUNCS([gsl_sf_mathieu_Ms_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_mathieu_Ms"]) AC_CHECK_FUNCS([gsl_sf_bessel_zero_Jnu_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_zero_Jnu"]) AC_CHECK_FUNCS([gsl_sf_hyperg_U_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_U"]) AC_CHECK_FUNCS([gsl_sf_hyperg_U_e],,[GSL_MISSING="${GSL_MISSING} hyperg_U"]) AC_CHECK_FUNCS([gsl_sf_hyperg_1F1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_1F1"]) AC_CHECK_FUNCS([gsl_sf_hyperg_1F1_e],,[GSL_MISSING="${GSL_MISSING} hyperg_1F1"]) AC_CHECK_FUNCS([gsl_sf_hyperg_2F0_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_2F0"]) AC_CHECK_FUNCS([gsl_sf_hyperg_2F0_e],,[GSL_MISSING="${GSL_MISSING} hyperg_2F0"]) AC_CHECK_FUNCS([gsl_sf_beta_inc_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_beta_inc"]) AC_CHECK_FUNCS([gsl_sf_hyperg_2F1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hyperg_2F1"]) AC_CHECK_FUNCS([gsl_sf_fact_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_fact"]) AC_CHECK_FUNCS([gsl_sf_doublefact_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_doublefact"]) AC_CHECK_FUNCS([gsl_sf_lnfact_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lnfact"]) AC_CHECK_FUNCS([gsl_sf_lndoublefact_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lndoublefact"]) AC_CHECK_FUNCS([gsl_sf_choose_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_choose"]) AC_CHECK_FUNCS([gsl_sf_lnchoose_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_lnchoose"]) AC_CHECK_FUNCS([gsl_sf_coupling_3j_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_3j"]) AC_CHECK_FUNCS([gsl_sf_coupling_3j_e],,[GSL_MISSING="${GSL_MISSING} coupling_3j"]) AC_CHECK_FUNCS([gsl_sf_coupling_6j_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_6j"]) AC_CHECK_FUNCS([gsl_sf_coupling_6j_e],,[GSL_MISSING="${GSL_MISSING} coupling_6j"]) AC_CHECK_FUNCS([gsl_sf_coupling_9j_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_coupling_9j"]) AC_CHECK_FUNCS([gsl_sf_coupling_9j_e],,[GSL_MISSING="${GSL_MISSING} coupling_9j"]) AC_CHECK_FUNCS([gsl_sf_bessel_jl_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_jl_steed_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_jl_steed_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_il_scaled_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_il_scaled_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_kl_scaled_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_kl_scaled_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_yl_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_yl_array"]) AC_CHECK_FUNCS([gsl_sf_legendre_Pl_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_Pl_array"]) AC_CHECK_FUNCS([gsl_sf_gegenpoly_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_gegenpoly_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_In_scaled_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_In_scaled_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_Jn_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Jn_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_Kn_scaled_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Kn_scaled_array"]) AC_CHECK_FUNCS([gsl_sf_bessel_Yn_array],,[GSL_MISSING="${GSL_MISSING} gsl_sf_bessel_Yn_array"]) AC_CHECK_FUNCS([gsl_sf_legendre_Plm_array],,) AC_CHECK_FUNCS([gsl_sf_legendre_Plm_deriv_array],,) AC_CHECK_FUNCS([gsl_sf_legendre_sphPlm_array],,) AC_CHECK_FUNCS([gsl_sf_legendre_sphPlm_array],,) AC_CHECK_FUNCS([gsl_sf_legendre_sphPlm_deriv_array],,) AC_CHECK_FUNCS([gsl_sf_legendre_array_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_array"]) AC_CHECK_FUNCS([gsl_sf_legendre_deriv_array_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_legendre_deriv_array"]) AC_CHECK_FUNCS([gsl_sf_legendre_deriv2_array_e],,[GSL_MISSING="${GSL_MISSING} legendre_deriv2_array"]) AC_CHECK_FUNCS([gsl_sf_zeta_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_zeta"]) AC_CHECK_FUNCS([gsl_sf_zeta_e],,[GSL_MISSING="${GSL_MISSING} gsl_zt_zeta"]) AC_CHECK_FUNCS([gsl_sf_zeta_e],,[GSL_MISSING="${GSL_MISSING} zeta"]) AC_CHECK_FUNCS([gsl_sf_zeta_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_zeta_int"]) AC_CHECK_FUNCS([gsl_sf_zeta_int_e],,[GSL_MISSING="${GSL_MISSING} zeta_int"]) AC_CHECK_FUNCS([gsl_sf_zetam1_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_zetam1"]) AC_CHECK_FUNCS([gsl_sf_zetam1_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_zetam1_int"]) AC_CHECK_FUNCS([gsl_sf_eta_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_eta"]) AC_CHECK_FUNCS([gsl_sf_eta_e],,[GSL_MISSING="${GSL_MISSING} eta"]) AC_CHECK_FUNCS([gsl_sf_eta_int_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_eta_int"]) AC_CHECK_FUNCS([gsl_sf_eta_int_e],,[GSL_MISSING="${GSL_MISSING} eta_int"]) AC_CHECK_FUNCS([gsl_sf_hzeta_e],,[GSL_MISSING="${GSL_MISSING} gsl_sf_hzeta"]) AC_CHECK_FUNCS([gsl_sf_hzeta_e],,[GSL_MISSING="${GSL_MISSING} hzeta"]) if test -z "$GSL_MISSING"; then AC_MSG_RESULT([GSL special functions: all available]) else AC_MSG_WARN([Some GSL special functions are missing: $GSL_MISSING]) fi AC_OUTPUT([Makefile]) gsl-2.1.1/src/PaxHeaders.7911/bootstrap0000644000000000000000000000013213311744161014506 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.219777489 30 ctime=1529333876.223775085 gsl-2.1.1/src/bootstrap0000755000175000017500000001161213311744161014750 0ustar00bectbect00000000000000#!/bin/bash ## Copyright (C) 2016 Susi Lehtola ## Copyright (C) 2016 Julien Bect ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2 of the License, or ## (at your option) any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, see . ## boostrap generates 'configure.ac', 'config.h.in' and 'configure' as follows: ## ## configure.ac.in ## buildgsl_sf.sh ## ## | ## | bootstrap ## v ## ## configure.ac ## ## | ## | autoheader (called by bootstrap) ## | autoconf (called by bootstrap) ## v ## ## config.h.in ## configure ## echo "dnl --- DO NOT EDIT ---" > configure.ac echo "dnl configure.ac is generated by bootstrap from configure.ac.in." >> configure.ac echo "dnl Edit configure.ac.in and reprocess instead of modifying ./configure.ac." >> configure.ac echo "" >> configure.ac cat configure.ac.in >> configure.ac rm -f config.h.in rm -f INDEX.tmp # Get list of function names defined in the build script funcnames=($(grep "export octave_name=" buildgsl_sf.sh | awk -F= '{print $NF}')) gslfuncs=($(grep "export funcname=" buildgsl_sf.sh | awk -F= '{print $NF}')) if(( ${#funcnames[@]} != ${#gslfuncs[@]} )); then echo "Parse error in bootstrap." exit fi # Extract list of deprecated functions from the build script echo "# This file is generated by bootstrap" > DEPRECATED grep "DEPRECATED: " buildgsl_sf.sh | sed -e "s/#\s*DEPRECATED:\s*//" >> DEPRECATED for((i=0;i<${#funcnames[@]};i++)); do # Add AC_CHECK_FUNCS statement in configure.ac echo -n "AC_CHECK_FUNCS([${gslfuncs[i]}],," >> configure.ac DEPREC_INFO=`grep ${funcnames[i]} DEPRECATED` if [ -z "$DEPREC_INFO" ]; then # Non-deprecated functions are marked as missing when not found # (but deprecated functions are just silently ignored) echo -n "[GSL_MISSING=\"\${GSL_MISSING} ${funcnames[i]}\"]" >> configure.ac fi echo ")" >> configure.ac if [[ ${funcnames[i]} =~ ^gsl_.* ]]; then # Add an entry in INDEX.tmp (unsorted index file, at this point) echo " ${funcnames[i]}" >> INDEX.tmp fi done # Create INDEX file rm -f INDEX cat >> INDEX <> Mathematics Special functions EOF sort INDEX.tmp >> INDEX cat >> INDEX <> configure.ac < (arg1, dim, numel, conformant); bool arg2_scalar = check_arg_dim (arg2, dim, numel, conformant); bool arg3_scalar = check_arg_dim (arg3, dim, numel, conformant); bool arg4_scalar = check_arg_dim (arg4, dim, numel, conformant); // Error in case of non-conformant arguments if (! conformant) { error ("Non-scalar input arguments must all have the same size."); return octave_value (); } // Create one separate index for each argument octave_idx_type i1 = 0; octave_idx_type i2 = 0; octave_idx_type i3 = 0; octave_idx_type i4 = 0; // Create one separate increment for each argument octave_idx_type inc1 = (arg1_scalar ? 0 : 1); octave_idx_type inc2 = (arg2_scalar ? 0 : 1); octave_idx_type inc3 = (arg3_scalar ? 0 : 1); octave_idx_type inc4 = (arg4_scalar ? 0 : 1); // Get pointers to the data of the input arrays const double *arg1_data = arg1.data (); const double *arg2_data = arg2.data (); const double *arg3_data = arg3.data (); const double *arg4_data = arg4.data (); // Array of output values NDArray y (dim); // GSL structure that will hold each individual result gsl_sf_result result; if (nargout < 2) { // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; } return octave_value (y); } else { // Array of error estimates NDArray err (dim); // Run the calculation for (octave_idx_type i = 0; i < numel; i++, i1 += inc1, i2 += inc2, i3 += inc3, i4 += inc4) { GSL_FUNC_NAME (arg1_data[i1], arg2_data[i2], arg3_data[i3], arg4_data[i4], &result); y.xelem(i) = result.val; err.xelem(i) = result.err; } octave_value_list retval (2); retval(0) = octave_value (y); retval(1) = octave_value (err); return retval; } #else // HAVE_GSL_FUNC undefined error ("GSL function GSL_FUNC_NAME was found missing when " "the gsl package for octave was built."); return octave_value (); #endif // HAVE_GSL_FUNC } gsl-2.1.1/PaxHeaders.7911/AUTHORS0000644000000000000000000000013213311744161013027 xustar0030 mtime=1529333873.199777505 30 atime=1529333873.199777505 30 ctime=1529333876.223775085 gsl-2.1.1/AUTHORS0000644000175000017500000000223113311744161013263 0ustar00bectbect00000000000000Initial work on the gsl package for Octave was done in 2004-2005 by: * Teemu Ikonen () * David Bateman () * Paul Kienzle () The package became unmaintained for some time after its 1.0.8 release in 2009, and was re-animated in 2016 by: * Susi Lehtola () * Julien Bect () The following people also contributed some new functions and/or helped with the maintainance (alphabetical order): * Juan Pablo Carbajal * Carne Draug () * John W. Eaton * Michael Goffioul * Soren Hauberg () * Martin Helm () * Nir Krakauer () * Raphael Laboissiere () * Mike Miller () * Orion Poplawski () * Ray Rogers () * Thomas Weber () Please refer to the project repo for more details: * gsl-2.1.1/PaxHeaders.7911/INDEX0000644000000000000000000000013213311744161012551 xustar0030 mtime=1529333873.547777238 30 atime=1529333873.543777241 30 ctime=1529333876.223775085 gsl-2.1.1/INDEX0000644000175000017500000000645313311744161013017 0ustar00bectbect00000000000000math >> Mathematics Special functions gsl_sf_airy_Ai gsl_sf_airy_Ai_deriv gsl_sf_airy_Ai_deriv_scaled gsl_sf_airy_Ai_scaled gsl_sf_airy_Bi gsl_sf_airy_Bi_deriv gsl_sf_airy_Bi_deriv_scaled gsl_sf_airy_Bi_scaled gsl_sf_airy_zero_Ai gsl_sf_airy_zero_Ai_deriv gsl_sf_airy_zero_Bi gsl_sf_airy_zero_Bi_deriv gsl_sf_atanint gsl_sf_bessel_il_scaled gsl_sf_bessel_il_scaled_array gsl_sf_bessel_In gsl_sf_bessel_In_array gsl_sf_bessel_In_scaled gsl_sf_bessel_In_scaled_array gsl_sf_bessel_Inu gsl_sf_bessel_Inu_scaled gsl_sf_bessel_jl gsl_sf_bessel_jl_array gsl_sf_bessel_jl_steed_array gsl_sf_bessel_Jn gsl_sf_bessel_Jn_array gsl_sf_bessel_Jnu gsl_sf_bessel_kl_scaled gsl_sf_bessel_kl_scaled_array gsl_sf_bessel_Kn gsl_sf_bessel_Kn_array gsl_sf_bessel_Kn_scaled gsl_sf_bessel_Kn_scaled_array gsl_sf_bessel_Knu gsl_sf_bessel_Knu_scaled gsl_sf_bessel_lnKnu gsl_sf_bessel_yl gsl_sf_bessel_yl_array gsl_sf_bessel_Yn gsl_sf_bessel_Yn_array gsl_sf_bessel_Ynu gsl_sf_bessel_zero_J0 gsl_sf_bessel_zero_J1 gsl_sf_bessel_zero_Jnu gsl_sf_beta gsl_sf_beta_inc gsl_sf_Chi gsl_sf_choose gsl_sf_Ci gsl_sf_clausen gsl_sf_conicalP_0 gsl_sf_conicalP_1 gsl_sf_conicalP_cyl_reg gsl_sf_conicalP_half gsl_sf_conicalP_mhalf gsl_sf_conicalP_sph_reg gsl_sf_coupling_3j gsl_sf_coupling_6j gsl_sf_coupling_9j gsl_sf_dawson gsl_sf_debye_1 gsl_sf_debye_2 gsl_sf_debye_3 gsl_sf_debye_4 gsl_sf_debye_5 gsl_sf_debye_6 gsl_sf_dilog gsl_sf_doublefact gsl_sf_ellint_D gsl_sf_ellint_E gsl_sf_ellint_Ecomp gsl_sf_ellint_F gsl_sf_ellint_Kcomp gsl_sf_ellint_P gsl_sf_ellint_Pcomp gsl_sf_ellint_RC gsl_sf_ellint_RD gsl_sf_ellint_RF gsl_sf_ellint_RJ gsl_sf_erf gsl_sf_erfc gsl_sf_erf_Q gsl_sf_erf_Z gsl_sf_eta gsl_sf_eta_int gsl_sf_expint_3 gsl_sf_expint_E1 gsl_sf_expint_E2 gsl_sf_expint_Ei gsl_sf_expm1 gsl_sf_exp_mult gsl_sf_exprel gsl_sf_exprel_2 gsl_sf_exprel_n gsl_sf_fact gsl_sf_fermi_dirac_half gsl_sf_fermi_dirac_inc_0 gsl_sf_fermi_dirac_int gsl_sf_fermi_dirac_mhalf gsl_sf_gamma gsl_sf_gamma_inc gsl_sf_gamma_inc_P gsl_sf_gamma_inc_Q gsl_sf_gammainv gsl_sf_gammastar gsl_sf_gegenpoly_array gsl_sf_gegenpoly_n gsl_sf_hazard gsl_sf_hydrogenicR gsl_sf_hyperg_0F1 gsl_sf_hyperg_1F1 gsl_sf_hyperg_1F1_int gsl_sf_hyperg_2F0 gsl_sf_hyperg_2F1 gsl_sf_hyperg_U gsl_sf_hyperg_U_int gsl_sf_hzeta gsl_sf_laguerre_n gsl_sf_lambert_W0 gsl_sf_lambert_Wm1 gsl_sf_legendre_array gsl_sf_legendre_deriv_array gsl_sf_legendre_Pl gsl_sf_legendre_Pl_array gsl_sf_legendre_Plm gsl_sf_legendre_Plm_array gsl_sf_legendre_Plm_deriv_array gsl_sf_legendre_Ql gsl_sf_legendre_sphPlm gsl_sf_legendre_sphPlm_array gsl_sf_legendre_sphPlm_deriv_array gsl_sf_lnbeta gsl_sf_lnchoose gsl_sf_lncosh gsl_sf_lndoublefact gsl_sf_lnfact gsl_sf_lngamma gsl_sf_lnpoch gsl_sf_lnsinh gsl_sf_log_1plusx gsl_sf_log_1plusx_mx gsl_sf_log_erfc gsl_sf_mathieu_a gsl_sf_mathieu_b gsl_sf_mathieu_ce gsl_sf_mathieu_Mc gsl_sf_mathieu_Ms gsl_sf_mathieu_se gsl_sf_poch gsl_sf_pochrel gsl_sf_psi gsl_sf_psi_1_int gsl_sf_psi_1piy gsl_sf_psi_n gsl_sf_Shi gsl_sf_Si gsl_sf_sinc gsl_sf_synchrotron_1 gsl_sf_synchrotron_2 gsl_sf_taylorcoeff gsl_sf_transport_2 gsl_sf_transport_3 gsl_sf_transport_4 gsl_sf_transport_5 gsl_sf_zeta gsl_sf_zeta_int gsl_sf_zetam1 gsl_sf_zetam1_int gsl_zt_zeta Support gsl_sf gsl-2.1.1/PaxHeaders.7911/NEWS0000644000000000000000000000013213311744161012456 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/NEWS0000644000175000017500000000537713311744161012730 0ustar00bectbect00000000000000Summary of important user-visible changes for releases of the gsl package =============================================================================== gsl-2.1.1 =============================================================================== ** Octave 4.4 compatibility fixes (remove deprecation warnings) =============================================================================== gsl-2.1.0 =============================================================================== ** Changes in the family of zeta functions > Rename gsl_zt_zeta to gsl_sf_zeta (accidentally named with a wrong prefix in the 2.0.0 release; alias names zeta and gsl_zt_zeta still available but deprecated) > New functions to compute zeta minus one: gsl_sf_zetam1, gsl_sf_zetam1_int =============================================================================== gsl-2.0.0 =============================================================================== ** Change of naming scheme > full GSL function names are now systematically used > the old naming scheme is deprecated but still working as well ** new Bessel functions > gsl_sf_bessel_il_scaled_array > gsl_sf_bessel_In_array > gsl_sf_bessel_In_scaled_array > gsl_sf_bessel_jl_array > gsl_sf_bessel_jl_steed_array > gsl_sf_bessel_Jn_array > gsl_sf_bessel_kl_scaled_array > gsl_sf_bessel_Kn_array > gsl_sf_bessel_Kn_scaled_array > gsl_sf_bessel_yl_array > gsl_sf_bessel_Yn_array > gsl_sf_bessel_zero_Jnu ** new elliptic integrals > gsl_sf_ellint_D > gsl_sf_ellint_E > gsl_sf_ellint_F > gsl_sf_ellint_P > gsl_sf_ellint_Pcomp > gsl_sf_ellint_RC > gsl_sf_ellint_RD > gsl_sf_ellint_RF > gsl_sf_ellint_RJ ** new Legendre functions (Legendre polynomials and related functions) > gsl_sf_legendre_array > gsl_sf_legendre_deriv2_array > gsl_sf_legendre_deriv_array > gsl_sf_legendre_Pl_array > gsl_sf_legendre_Plm_array > gsl_sf_legendre_Plm_deriv_array > gsl_sf_legendre_sphPlm_deriv_array > gsl_sf_conicalP_cyl_reg > gsl_sf_conicalP_sph_reg ** new Mathieu functions > gsl_sf_mathieu_a > gsl_sf_mathieu_b > gsl_sf_mathieu_ce > gsl_sf_mathieu_Mc > gsl_sf_mathieu_Ms > gsl_sf_mathieu_se ** other new special functions > gsl_sf_beta_inc > gsl_sf_debye_5 > gsl_sf_debye_6 > gsl_sf_dilog > gsl_sf_gegenpoly_array > gsl_sf_gegenpoly_n > gsl_sf_hydrogenicR > gsl_sf_hyperg_1F1_int > gsl_sf_hyperg_2F0 > gsl_sf_hyperg_2F1 > gsl_sf_hyperg_U_int > gsl_sf_laguerre_n ** new factorial and related functions > gsl_sf_choose > gsl_sf_doublefact > gsl_sf_lnchoose > gsl_sf_lndoublefact > gsl_sf_lnfact > gsl_sf_fact ** gsl doesn't autoload anymore gsl-2.1.1/PaxHeaders.7911/COPYING0000644000000000000000000000013213311744161013012 xustar0030 mtime=1529333873.203777503 30 atime=1529333873.203777503 30 ctime=1529333876.223775085 gsl-2.1.1/COPYING0000644000175000017500000004307713311744161013263 0ustar00bectbect00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, see . Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License.