# HG changeset patch # User jwe # Date 780086298 0 # Node ID 632844972d35625623d8642c4f996b38e936453a # Parent 36ba0576bd1be95850bf8ea4025fd2784103ee02 [project @ 1994-09-20 18:37:13 by jwe] Initial revision diff --git a/scripts/elfun/Makefile.in b/scripts/elfun/Makefile.in new file mode 100644 --- /dev/null +++ b/scripts/elfun/Makefile.in @@ -0,0 +1,74 @@ +# +# Makefile for octave's scripts/elfun directory +# +# John W. Eaton +# jwe@che.utexas.edu +# Department of Chemical Engineering +# The University of Texas at Austin + +TOPDIR = ../.. + +script_sub_dir = elfun + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +include $(TOPDIR)/Makeconf + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +SOURCES = *.m + +DISTFILES = Makefile.in $(SOURCES) + +FCN_FILES = $(wildcard $(srcdir)/*.m) +FCN_FILES_NO_DIR = $(notdir $(FCN_FILES)) + +all: +.PHONY: all + +install: all + if test -d $(fcnfiledir)/$(script_sub_dir) ; then true ; \ + else $(TOPDIR)/mkpath $(fcnfiledir)/$(script_sub_dir) ; fi + for f in $(FCN_FILES_NO_DIR) ; do \ + rm -f $(fcnfiledir)/$(script_sub_dir)/$$f ; \ + $(INSTALL_DATA) $(srcdir)/$$f $(fcnfiledir)/$(script_sub_dir)/$$f ; \ + done +.PHONY: install + +uninstall: + for f in $(FCN_FILES_NO_DIR) ; \ + do rm -f $(fcnfiledir)/$(script_sub_dir)/$$f ; \ + done +.PHONY: uninstall + +clean: +.PHONY: clean + +tags: $(SOURCES) + ctags $(SOURCES) + +TAGS: $(SOURCES) + etags $(SOURCES) + +mostlyclean: clean +.PHONY: mostlyclean + +distclean: clean + rm -f Makefile +.PHONY: distclean + +realclean: distclean + rm -f tags TAGS +.PHONY: realclean + +local-dist: + ln $(DISTFILES) ../../`cat ../../.fname`/scripts/elfun +.PHONY: local-dist + +dist: + ln $(DISTFILES) ../../`cat ../../.fname`/scripts/elfun +.PHONY: dist diff --git a/scripts/elfun/acot.m b/scripts/elfun/acot.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/acot.m @@ -0,0 +1,11 @@ +function w = acot (z) + +# acot (z): compute the inverse cotangent for each element of z. + + if (nargin != 1) + error ("usage: acot (z)"); + endif + + w = atan (1 ./ z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/acoth.m b/scripts/elfun/acoth.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/acoth.m @@ -0,0 +1,11 @@ +function w = acoth (z) + +# acoth (z): compute the inverse hyperbolic cotangent for each element of z. + + if (nargin != 1) + error ("usage: acoth (z)"); + endif + + w = atanh (1 ./ z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/acsc.m b/scripts/elfun/acsc.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/acsc.m @@ -0,0 +1,11 @@ +function w = acsc (z) + +# acsc (z): compute the inverse cosecant for each element of z. + + if (nargin != 1) + error ("usage: acsc (z)"); + endif + + w = asin (1 ./ z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/acsch.m b/scripts/elfun/acsch.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/acsch.m @@ -0,0 +1,11 @@ +function w = acsch (z) + +# acsch (z): compute the inverse hyperbolic cosecant for each element of z. + + if (nargin != 1) + error ("usage: acsch (z)"); + endif + + w = asinh (1 ./ z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/asec.m b/scripts/elfun/asec.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/asec.m @@ -0,0 +1,11 @@ +function w = asec (z) + +# asec (z): compute the inverse secant for each element of z. + + if (nargin != 1) + error ("usage: asec (z)"); + endif + + w = acos (1 ./ z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/asech.m b/scripts/elfun/asech.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/asech.m @@ -0,0 +1,11 @@ +function w = asech (z) + +# asech (z): compute the inverse hyperbolic secant for each element of z. + + if (nargin != 1) + error ("usage: acosh (z)"); + endif + + w = acosh (1 ./ z); + +endfunction diff --git a/scripts/elfun/cot.m b/scripts/elfun/cot.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/cot.m @@ -0,0 +1,11 @@ +function w = cot (z) + +# cot (z): compute the cotangent for each element of z. + + if (nargin != 1) + error ("usage: cot (z)"); + endif + + w = 1 ./ tan(z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/coth.m b/scripts/elfun/coth.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/coth.m @@ -0,0 +1,11 @@ +function w = coth (z) + +# coth (z): compute the hyperbolic cotangent for each element of z. + + if (nargin != 1) + error ("usage: coth (z)"); + endif + + w = 1 ./ tanh(z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/csc.m b/scripts/elfun/csc.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/csc.m @@ -0,0 +1,11 @@ +function w = csc (z) + +# csc (z): compute the cosecant for each element of z. + + if (nargin != 1) + error ("usage: csc (z)"); + endif + + w = 1 ./ sin(z); + +endfunction diff --git a/scripts/elfun/csch.m b/scripts/elfun/csch.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/csch.m @@ -0,0 +1,11 @@ +function w = csch (z) + +# csch (z): compute the hyperbolic cosecant for each element of z. + + if (nargin != 1) + error ("usage: csch (z)"); + endif + + w = 1 ./ sinh(z); + +endfunction diff --git a/scripts/elfun/log2.m b/scripts/elfun/log2.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/log2.m @@ -0,0 +1,11 @@ +function w = log2 (z) + +# log2 (z): compute the logarithm base 2 for each element of z. + + if (nargin != 1) + error ("usage: log2 (z)"); + endif + + w = log(z) / log(2); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/sec.m b/scripts/elfun/sec.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/sec.m @@ -0,0 +1,11 @@ +function w = sec (z) + +# sec (z): compute the secant for each element of z. + + if (nargin != 1) + error ("usage: sec (z)"); + endif + + y = 1 ./ cos(z); + +endfunction \ No newline at end of file diff --git a/scripts/elfun/sech.m b/scripts/elfun/sech.m new file mode 100644 --- /dev/null +++ b/scripts/elfun/sech.m @@ -0,0 +1,11 @@ +function w = sech (z) + +# sech (z): compute the hyperbolic secant for each element of z. + + if (nargin != 1) + error ("usage: sech (z)"); + endif + + y = 1 ./ cosh(z); + +endfunction \ No newline at end of file