summaryrefslogtreecommitdiff
path: root/Master
diff options
context:
space:
mode:
authorKarl Berry <karl@freefriends.org>2014-02-24 22:58:28 +0000
committerKarl Berry <karl@freefriends.org>2014-02-24 22:58:28 +0000
commit2385109f9c04a438cbd803b18e9b8dd0637aa31c (patch)
tree9379bacf1e71117df8228cbaca99101cfd99dbab /Master
parent9448b9fce7c46eb0ac4b118cb78f44696dadf39d (diff)
calculator (23feb14)
git-svn-id: svn://tug.org/texlive/trunk@33041 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master')
-rw-r--r--Master/texmf-dist/doc/latex/calculator/README87
-rw-r--r--Master/texmf-dist/doc/latex/calculator/calculator.pdfbin593617 -> 565260 bytes
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator1.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator1.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator10.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator11.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator11.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator12.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator12.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator13.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator13.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator14.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator14.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator15.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator15.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator16.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator16.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator17.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator17.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator18.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator18.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator19.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator19.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator20.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator2.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator2.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator20.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator21.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator21.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator22.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator22.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator23.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator23.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator24.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator24.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator25.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator25.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator26.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator26.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator27.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator27.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator28.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator28.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator29.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator29.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator30.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator3.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator3.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator30.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator31.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator31.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator32.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator32.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator33.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator33.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator34.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator34.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator35.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator35.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator36.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator36.tex11
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator37.tex11
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator38.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator10.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator39.tex6
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator4.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator4.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator40.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator37.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator41.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator38.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator42.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator39.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator43.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator40.tex)2
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator44.tex8
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator45.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator41.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator46.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator42.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator47.tex9
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator48.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator43.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator49.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator44.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator5.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator5.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator50.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator45.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator51.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator46.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator52.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator47.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator53.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator48.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator54.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator49.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator55.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator50.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator56.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator51.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator57.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator52.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator58.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator53.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator59.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator54.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator6.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator6.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator60.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator55.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator61.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator56.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator62.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator57.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator7.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator7.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator8.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator8.tex)0
-rw-r--r--Master/texmf-dist/doc/latex/calculator/examples/calculator9.tex (renamed from Master/texmf-dist/doc/latex/calculator/calculator9.tex)0
-rw-r--r--Master/texmf-dist/source/latex/calculator/calculator.dtx881
-rw-r--r--Master/texmf-dist/source/latex/calculator/calculator.ins74
-rw-r--r--Master/texmf-dist/tex/latex/calculator/calculator.sty322
-rw-r--r--Master/texmf-dist/tex/latex/calculator/calculus.sty78
68 files changed, 1322 insertions, 167 deletions
diff --git a/Master/texmf-dist/doc/latex/calculator/README b/Master/texmf-dist/doc/latex/calculator/README
index a117269067e..5b079743486 100644
--- a/Master/texmf-dist/doc/latex/calculator/README
+++ b/Master/texmf-dist/doc/latex/calculator/README
@@ -1,7 +1,7 @@
The calculator and calculus packages: Use \LaTeX as a scientific calculator.
-Robert Fuster, 2012
+Robert Fuster, 2012, 2014
1. Licence
@@ -11,26 +11,37 @@ This material is subject to the LaTeX Project Public License.
See http://www.ctan.org/tex-archive/help/Catalogue/licenses.lppl.html
for the details of that license.
+2. Changes in version 2.0
+-------------------------
+- Inverse trigonometric and inverse hyperbolic functions are added
+ (this completes the typical elementary functions)
-2. About the packages
----------------------
+- Also vector (cross) product and angle between vectors can be evaluated
+
+- New length operations
+
+- ... and some other minor additions and changes
+3. About the packages
+---------------------
The calculator and calculus packages define several instructions which allow us
-to realize algebraic operations and to evaluate elementary functions and derivatives
-in our documents.
+to realize algebraic operations and to evaluate elementary functions
+and derivatives in our documents.
-My main goal is to define the arithmetic and functional claculations I need in my
-package "xpicture" (http://www.upv.es/~rfuster/xpicture), but the numeric abilities
-of "calculator" and "calculus" may be useful in other contexts.
+My main goal is to define the arithmetic and functional calculations I need in
+my package "xpicture"
+(http://ctan.org/pkg/xpicture, http://www.upv.es/~rfuster/xpicture),
+but the numeric abilities of "calculator" and "calculus" may be useful
+in other contexts.
-2.1 The calculator package
+3.1 The calculator package
--------------------------
-
The operations implemented by the calculator package include
- arithmetical calculations with real and integer numbers
- two and three dimensional vectors and matrices arithmetics
-- computation of powers, square roots, trigonometrical, exponential, logarithmic and
- hyperbolic functions.
+- computation of powers, square roots, trigonometric, exponential,
+ logarithmic, hyperbolic, inverse trigonometric
+ and inverse hyperbolic functions.
In addition, some important numbers, such as pi, sqrt(2) or e, are predefined.
@@ -56,7 +67,7 @@ c) More complex calculations:
\SQRT{7.25}{\tempa}
\DIVIDE{\numberPI}{7}{\tempb}
\COS{\tempb}{\tempc}
- \MULTIPLY{\tempa}{\tempa}{\sol}
+ \MULTIPLY{\tempa}{\tempc}{\sol}
Then, the value 2.42589 is stored in \sol.
@@ -68,13 +79,13 @@ d) Vectors and matrices:
---> \sola, \solb, \solc, \sold equals 1, 0, 2, 3.
-2.2. The calculus package
+3.2. The calculus package
-------------------------
-
-This package adds to the calculator package several utilities to use and define
+This package adds to the calculator package several utilities to use and define
real functions and their derivatives, including elementary functions,
operations with functions, vector-valuated functions polar coordinates.
-When you call a "function", this function ant its derivative are evaluated simultaneously.
+When you call a "function", this function ant its derivative are evaluated
+simultaneously.
Examples:
@@ -94,40 +105,36 @@ with the following code:
Then, \functionF{num}{\sol}{\Dsol} stores f(num) and f'(num) in \sol and \Dsol.
-3. Installation and documentation
+4. Installation and documentation
---------------------------------
+1. Compile the installation file "calculator.ins",
-By compiling the source file "calculator.dtx" in the following sequence
+ >> latex calculator.ins
->> pdflatex calculator.dtx
->> makeindex -s gind.ist -o calculator.ind calculator.idx
->> makeindex -s gglo.ist -o calculator.gls calculator.glo
->> pdflatex calculator.dtx
+ to generate the two essential files,
-several files will be generated:
+ "calculator.sty" and "calculus.sty".
+
+ Move these two files where LaTeX search for
+ (typically, in a local texmf tree, at tex/latex/calculator)
+ and refresh the file database.
- "calculator.sty" and "calculus.sty" (the packages).
- Move these two files where LaTeX search for (typically, in a local texmf tree,
- at tex/latex/calculator) and refresh the file database.
+2. To have the documentation and user's manual, "calculator.pdf",
+ compile the source file "calculator.dtx" in the following sequence:
- "calculator.pdf" (the user manual)
+ >> pdflatex calculator.dtx
+ >> makeindex -s gind.ist -o calculator.ind calculator.idx
+ >> makeindex -s gglo.ist -o calculator.gls calculator.glo
+ >> pdflatex calculator.dtx
+ >> pdflatex calculator.dtx
In addition, many small files, named "calculatorNN.tex" are generated.
These files contain the source code of all examples included in the manual.
You can store or discard this files.
----------------------------------------------------
+---------------------------------------------------------------
Robert Fuster
rfuster@mat.upv.es
-Universitat Polit\`ecnica de Val\`encia, 2012/05/19
----------------------------------------------------
-
-
-
-
-
-
-
-
-
+Universitat Polit\`ecnica de Val\`encia, 2012/05/19, 2014/02/23
+--------------------------------------------------------------- \ No newline at end of file
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator.pdf b/Master/texmf-dist/doc/latex/calculator/calculator.pdf
index 51d5fdc7f21..7da66cec999 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator.pdf
+++ b/Master/texmf-dist/doc/latex/calculator/calculator.pdf
Binary files differ
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator1.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator1.tex
index 384de7ddb83..384de7ddb83 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator1.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator1.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator11.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator10.tex
index 6864af9ad58..6864af9ad58 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator11.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator10.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator12.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator11.tex
index 2092630e261..2092630e261 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator12.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator11.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator13.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator12.tex
index b66337da47e..b66337da47e 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator13.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator12.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator14.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator13.tex
index cc98a935aec..cc98a935aec 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator14.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator13.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator15.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator14.tex
index 45ebda7c91f..45ebda7c91f 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator15.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator14.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator16.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator15.tex
index 56fad96daba..56fad96daba 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator16.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator15.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator17.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator16.tex
index 01050f4b105..01050f4b105 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator17.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator16.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator18.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator17.tex
index 5b003431148..5b003431148 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator18.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator17.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator19.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator18.tex
index d6d05c21da2..d6d05c21da2 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator19.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator18.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator20.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator19.tex
index c3edaec1594..c3edaec1594 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator20.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator19.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator2.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator2.tex
index 6136ee24cdf..6136ee24cdf 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator2.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator2.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator21.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator20.tex
index 015b06455a3..015b06455a3 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator21.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator20.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator22.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator21.tex
index cbbc842b31c..cbbc842b31c 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator22.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator21.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator23.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator22.tex
index b2175182b9d..b2175182b9d 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator23.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator22.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator24.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator23.tex
index 685027f4f98..685027f4f98 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator24.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator23.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator25.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator24.tex
index ed5a5bb26f1..ed5a5bb26f1 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator25.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator24.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator26.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator25.tex
index 6df41c19e8a..6df41c19e8a 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator26.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator25.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator27.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator26.tex
index 41fd8b4ed82..41fd8b4ed82 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator27.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator26.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator28.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator27.tex
index 0a8af280fa0..0a8af280fa0 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator28.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator27.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator29.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator28.tex
index 82bf398f848..82bf398f848 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator29.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator28.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator30.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator29.tex
index ed2bf1e00c5..ed2bf1e00c5 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator30.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator29.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator3.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator3.tex
index 11f7296ffe2..11f7296ffe2 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator3.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator3.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator31.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator30.tex
index e41832e74ce..e41832e74ce 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator31.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator30.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator32.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator31.tex
index cc5a388a759..cc5a388a759 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator32.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator31.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator33.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator32.tex
index 9956ce25951..9956ce25951 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator33.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator32.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator34.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator33.tex
index dc73dd1a40d..dc73dd1a40d 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator34.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator33.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator35.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator34.tex
index 3125997f51a..3125997f51a 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator35.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator34.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator36.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator35.tex
index cdd27aa2427..cdd27aa2427 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator36.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator35.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/examples/calculator36.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator36.tex
new file mode 100644
index 00000000000..0616dd824b3
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator36.tex
@@ -0,0 +1,11 @@
+\ARCSIN{0.5}{\sol}
+\sol
+
+\ARCCOS{0.5}{\sol}
+\sol
+
+\ARCTAN{\numberSQRTTHREE}{\sol}
+\sol
+
+\ARCCOT{-1}{\sol}
+\sol
diff --git a/Master/texmf-dist/doc/latex/calculator/examples/calculator37.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator37.tex
new file mode 100644
index 00000000000..8e969be57ef
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator37.tex
@@ -0,0 +1,11 @@
+\ARSINH{1}{\sol}
+\sol
+
+\ARCOSH{1}{\sol}
+\sol
+
+\ARTANH{0.5}{\sol}
+\sol
+
+\ARCOTH{2}{\sol}
+\sol
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator10.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator38.tex
index 9f94dd02ada..9f94dd02ada 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator10.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator38.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/examples/calculator39.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator39.tex
new file mode 100644
index 00000000000..5673f857f2e
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator39.tex
@@ -0,0 +1,6 @@
+\newlength{\mylength}
+\LENGTHADD{1in}{1cm}{\mylength}
+$1in+1cm=\the\mylength$.
+
+\LENGTHSUBTRACT{1in}{1cm}{\mylength}
+$1in-1cm=\the\mylength$.
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator4.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator4.tex
index 123ab06a45a..123ab06a45a 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator4.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator4.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator37.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator40.tex
index 848ea112443..848ea112443 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator37.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator40.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator38.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator41.tex
index e7d761a1306..e7d761a1306 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator38.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator41.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator39.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator42.tex
index 9af0c8329a1..9af0c8329a1 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator39.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator42.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator40.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator43.tex
index 4ab16f69418..dc09a660bf7 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator40.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator43.tex
@@ -1,7 +1,7 @@
\SCALARPRODUCT(1,-1)(3,5){\sol}
$(1,-1)\cdot(3,5)=\sol$
-\SCALARPRODUCT(1,-1,2)(3,5,-1){\sol}
+\DOTPRODUCT(1,-1,2)(3,5,-1){\sol}
$(1,-1,2)\cdot(3,5,-1)=\sol$
\VECTORNORM(3,4)\sol
diff --git a/Master/texmf-dist/doc/latex/calculator/examples/calculator44.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator44.tex
new file mode 100644
index 00000000000..e8414d41148
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator44.tex
@@ -0,0 +1,8 @@
+\CROSSPRODUCT(1,-1,2)(3,5,-1)%
+ (\sola,\solb,\solc)
+$(1,-1,2)\times(3,5,-1)=(\sola,\solb,\solc)$
+
+\VECTORPRODUCT(1,-1,2)(-3,3,-6)%
+ (\sola,\solb,\solc)
+$(1,-1,2)\times(-3,3,-6)=(\sola,\solb,\solc)$
+
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator41.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator45.tex
index 045880987a1..045880987a1 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator41.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator45.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator42.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator46.tex
index c4df209d4ad..c4df209d4ad 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator42.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator46.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/examples/calculator47.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator47.tex
new file mode 100644
index 00000000000..73498a1f1a1
--- /dev/null
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator47.tex
@@ -0,0 +1,9 @@
+\TWOVECTORSANGLE(1,1)(0,1){\sol}
+$\sol$ radians
+\RADtoDEG{\sol}{\degsol}
+(or $\degsol$ degrees)
+
+\TWOVECTORSANGLE(1,0,0)(0,1,0){\sol}
+$\sol$
+\RADtoDEG{\sol}{\degsol}
+(or $\degsol$ degrees)
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator43.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator48.tex
index a0dd9f85cc5..a0dd9f85cc5 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator43.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator48.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator44.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator49.tex
index 5ee6b5cfa5d..5ee6b5cfa5d 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator44.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator49.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator5.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator5.tex
index 0f410c70277..0f410c70277 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator5.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator5.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator45.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator50.tex
index c1ed8fc0ac3..c1ed8fc0ac3 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator45.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator50.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator46.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator51.tex
index c5cf74d4753..c5cf74d4753 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator46.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator51.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator47.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator52.tex
index 6abe4e7a0b6..6abe4e7a0b6 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator47.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator52.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator48.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator53.tex
index c8e2cbeaba1..c8e2cbeaba1 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator48.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator53.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator49.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator54.tex
index 16c0b0a8c8b..16c0b0a8c8b 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator49.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator54.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator50.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator55.tex
index 7ad03915b39..7ad03915b39 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator50.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator55.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator51.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator56.tex
index bd69eaf743b..bd69eaf743b 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator51.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator56.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator52.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator57.tex
index 1ad53821cf8..1ad53821cf8 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator52.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator57.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator53.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator58.tex
index 2696c2df99c..2696c2df99c 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator53.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator58.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator54.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator59.tex
index 4a99aefa2ad..4a99aefa2ad 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator54.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator59.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator6.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator6.tex
index 663c9a1bff9..663c9a1bff9 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator6.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator6.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator55.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator60.tex
index 4a0ab779c75..4a0ab779c75 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator55.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator60.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator56.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator61.tex
index f5c10e29574..f5c10e29574 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator56.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator61.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator57.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator62.tex
index 9caca3c8c7b..9caca3c8c7b 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator57.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator62.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator7.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator7.tex
index 6f0d9c2fea7..6f0d9c2fea7 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator7.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator7.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator8.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator8.tex
index de60a332745..de60a332745 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator8.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator8.tex
diff --git a/Master/texmf-dist/doc/latex/calculator/calculator9.tex b/Master/texmf-dist/doc/latex/calculator/examples/calculator9.tex
index f3c94758d93..f3c94758d93 100644
--- a/Master/texmf-dist/doc/latex/calculator/calculator9.tex
+++ b/Master/texmf-dist/doc/latex/calculator/examples/calculator9.tex
diff --git a/Master/texmf-dist/source/latex/calculator/calculator.dtx b/Master/texmf-dist/source/latex/calculator/calculator.dtx
index 543ed6d3564..41d95f24a0e 100644
--- a/Master/texmf-dist/source/latex/calculator/calculator.dtx
+++ b/Master/texmf-dist/source/latex/calculator/calculator.dtx
@@ -1,86 +1,48 @@
% \iffalse meta-comment
-%<*internal>
-\begingroup
-\input docstrip.tex
-\keepsilent
-\preamble
-------------------------------------------------------------------
-The calculator and calculus packages
-Copyright (C) 2012 by Robert Fuster <rfuster@mat.upv.es>
-All rights reserved
-
-This file may be distributed and/or modified under the
-conditions of the LaTeX Project Public License, either version 1.3
-of this license or (at your option) any later version.
-The latest version of this license is in:
-
- http://www.latex-project.org/lppl.txt
-
-and version 1.3 or later is part of all distributions of LaTeX
-version 1999/12/01 or later.
-------------------------------------------------------------------
-\endpreamble
-\postamble
-\endpostamble
-\askforoverwritefalse
-
-\generateFile{calculator.sty}{t}{\from{calculator.dtx}{calculator}}
-\generateFile{calculus.sty}{t}{\from{calculator.dtx}{calculus}}
-
-\def\tmpa{plain}
-\ifx\tmpa\fmtname\endgroup\expandafter\bye\fi
-\endgroup
-%</internal>
%
-% Copyright (C) 2012 by Robert Fuster <rfuster@mat.upv.es>
-%
-% This file may be distributed and/or modified under the
-% conditions of the LaTeX Project Public License, either version 1.2
-% of this license or (at your option) any later version.
-% The latest version of this license is in:
+% Copyright (C) 2012, 2014 by Robert Fuster <rfuster@mat.upv.es>
%
+% This work may be distributed and/or modified under the conditions of
+% the LaTeX Project Public License, either version 1.3 of this license
+% or (at your option) any later version. The latest version of this
+% license is in:
+%
% http://www.latex-project.org/lppl.txt
+%
+% and version 1.3 or later is part of all distributions of LaTeX
+% version 2005/12/01 or later.
+%%
+% This work has the LPPL maintenance status `maintained'.
+%
+% The Current Maintainer of this work is Robert Fuster
%
-% and version 1.2 or later is part of all distributions of LaTeX
-% version 1999/12/01 or later.
+% This work consists of the files calculator.dtx and calculator.ins
+% and the derived files calculator.sty, calculus.ins, and several
+% calculator<nn>.tex derived files.
%
% \fi
-% \CheckSum{3135}
-% \changes{v1.0}{2012/04/25}{First public version}
-% \changes{v1.0a}{2012/06/10}{calculator.dtx modified to make it autoinstallable.
-% calculus.dtx embedded in calculus.dtx}
-%% \CharacterTable
-%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
-%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
-%% Digits \0\1\2\3\4\5\6\7\8\9
-%% Exclamation \! Double quote \" Hash (number) \#
-%% Dollar \$ Percent \% Ampersand \&
-%% Acute accent \' Left paren \( Right paren \)
-%% Asterisk \* Plus \+ Comma \,
-%% Minus \- Point \. Solidus \/
-%% Colon \: Semicolon \; Less than \<
-%% Equals \= Greater than \> Question mark \?
-%% Commercial at \@ Left bracket \[ Backslash \\
-%% Right bracket \] Circumflex \^ Underscore \_
-%% Grave accent \` Left brace \{ Vertical bar \|
-%% Right brace \} Tilde \~}
%
% \iffalse
+%
%<*driver>
\documentclass{ltxdoc}
\ProvidesFile{calculator.dtx}
- [2012/06/10 v.1.0a documented calculator package]
-\GetFileInfo{calculator.dtx}
+ [2014/02/20 v.2.0 documented calculator package]
+
+\usepackage{calculus}
\usepackage{amsmath}
\usepackage[lmargin=1.75in,rmargin=1in]{geometry}
\usepackage{fancyvrb}
-\def\fileversion{1.0a}
-\def\filedate{2012/06/10}
-\usepackage{calculus}
+
+\def\fileversion{2.0}
+\def\filedate{2014/02/20}
+
+\GetFileInfo{calculator.dtx}
+
\title{The \textsf{calculator} and \textsf{calculus} packages%
\thanks{This document corresponds to
- \textsf{calculator} and \textsf{calculus}~\fileversion,
- dated \filedate.}\\
+ \textsf{calculator}~\fileversion{} and
+ \textsf{calculus}~\fileversion, dated \filedate.}\\
Scientific calculations with \LaTeX}
\author{Robert Fuster\\
Universitat Polit\`ecnica de Val\`encia \\
@@ -90,9 +52,19 @@ version 1999/12/01 or later.
\CodelineIndex
\RecordChanges
+\def\partname{Part}
+
\newcommand{\TBS}{\textbackslash}
\newcommand{\Marg}[1]{\textnormal{\marg{#1}}}
+\newcommand{\newinversion}[1]{\textnormal{\textit{(new in version~#1)}}}
+
+\newcommand{\arccot}{\operatorname{arccot}}
+\newcommand{\arsinh}{\operatorname{arsinh}}
+\newcommand{\arcosh}{\operatorname{arcosh}}
+\newcommand{\artanh}{\operatorname{artanh}}
+\newcommand{\arcoth}{\operatorname{arcoth}}
+
\newcounter{exem}\stepcounter{exem}
\newenvironment{exemple}{%
\VerbatimEnvironment\begin{VerbatimOut}[gobble=2]{./calculator\theexem.tex}}{%
@@ -114,7 +86,7 @@ version 1999/12/01 or later.
\stepcounter{exem}\par\bigskip\noindent}
\newcommand{\textttit}[1]{\texttt{\textit{#1}}}
-
+%\OnlyDescription
\begin{document}
\maketitle
\DocInput{calculator.dtx}
@@ -125,6 +97,27 @@ version 1999/12/01 or later.
%
% \fi
%
+% \CheckSum{3753}
+% \changes{v1.0}{2012/04/25}{First public version}
+% \changes{v1.0a}{2012/06/10}{calculator.dtx modified to make it autoinstallable.
+% calculus.dtx embedded in calculus.dtx}
+% \changes{v2.0}{2014/02/20}{new calculator.dtx and calculator.ins files}
+%% \CharacterTable
+%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
+%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
+%% Digits \0\1\2\3\4\5\6\7\8\9
+%% Exclamation \! Double quote \" Hash (number) \#
+%% Dollar \$ Percent \% Ampersand \&
+%% Acute accent \' Left paren \( Right paren \)
+%% Asterisk \* Plus \+ Comma \,
+%% Minus \- Point \. Solidus \/
+%% Colon \: Semicolon \; Less than \<
+%% Equals \= Greater than \> Question mark \?
+%% Commercial at \@ Left bracket \[ Backslash \\
+%% Right bracket \] Circumflex \^ Underscore \_
+%% Grave accent \` Left brace \{ Vertical bar \|
+%% Right brace \} Tilde \~}
+%
% \DoNotIndex{\newcommand,\newenvironment,\RequirePackage,\begin,\end}
% \DoNotIndex{\begingroup,\endgroup,\expandafter,\undefined,\@ifnextchar}
@@ -153,6 +146,14 @@ version 1999/12/01 or later.
% several utilities to use and define various functions and their derivatives,
% including elementary functions, operations with functions,
% polar coordinates and vector-valued real functions.
+
+% Version 2.0 adds new capabilities to both packages.
+% Specifically, now, \textsf{calculator} and \textsf{calculus}
+% can evaluate the inverse trigonometric
+% and the inverse hyperbolic functions
+% (so that we can work with all the classic elementary functions),
+% and also can do some additional calculation with vectors
+% (such as the cross product and the angle between two vectors).
% \end{abstract}
%
% \tableofcontents
@@ -382,15 +383,6 @@ version 1999/12/01 or later.
% \DIVIDE{1.256}{3.214}{\sol}
% $1.256/3.214=\sol$
% \end{exemple}
-%
-% In addition, the \cs{LENGTHDIVIDE} command divides two lengths
-% and returns a number.
-% \item[\cs{LENGTHDIVIDE}\marg{length1}\marg{length2}\marg{\cs{cmd}}]%
-% \SpecialUsageIndex{\LENGTHDIVIDE}\mbox{}
-% \begin{exemple}
-% \LENGTHDIVIDE{1in}{1cm}{\sol}
-% One inch equals $\sol$ centimeters.
-% \end{exemple}
% \end{description}
% \subsubsection{Powers with integer exponent}
% \begin{description}
@@ -759,7 +751,7 @@ version 1999/12/01 or later.
% \sol
% \end{exemple}
%
-% Moreover, we have a couple od commands
+% Moreover, we have a couple of commands
% to convert between radians and degrees,
% \begin{description}
% \item[\cs{DEGtoRAD}%
@@ -830,6 +822,106 @@ version 1999/12/01 or later.
% \sol
% \end{exemple}
% \end{description}
+%
+% \subsubsection{Inverse trigonometric functions\newinversion{2.0}}
+% \begin{description}
+% \item[\cs{ARCSIN}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCSIN}%
+% stores in \textttit{\TBS cmd}
+% the arcsin (inverse of sine) of \textttit{num}.
+%
+% \item[\cs{ARCCOS}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCCOS}%
+% arccos of \textttit{num}.
+%
+% \item[\cs{ARCTAN}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCTAN}%
+% arctan of \textttit{num}.
+%
+% \item[\cs{ARCCOT}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCCOT}%
+% arccot of \textttit{num}.
+%
+% \begin{exemple}
+% \ARCSIN{0.5}{\sol}
+% \sol
+%
+% \ARCCOS{0.5}{\sol}
+% \sol
+%
+% \ARCTAN{\numberSQRTTHREE}{\sol}
+% \sol
+%
+% \ARCCOT{-1}{\sol}
+% \sol
+% \end{exemple}
+% \end{description}
+%
+% \subsubsection{Inverse hyperbolic functions\newinversion{2.0}}
+% \begin{description}
+% \item[\cs{ARSINH}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARSINH}%
+% stores in \textttit{\TBS cmd}
+% the arsinh (inverse of hyperbolic sine) of \textttit{num}.
+%
+% \item[\cs{ARCOSH}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCOSH}%
+% arcosh of \textttit{num}.
+%
+% \item[\cs{ARTANH}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARTANH}%
+% artanh of \textttit{num}.
+%
+% \item[\cs{ARCOTH}%
+% \marg{num}\marg{\cs{cmd}}]\SpecialUsageIndex{\ARCOTH}%
+% arcoth of \textttit{num}.
+%
+% \begin{exemple}
+% \ARSINH{1}{\sol}
+% \sol
+%
+% \ARCOSH{1}{\sol}
+% \sol
+%
+% \ARTANH{0.5}{\sol}
+% \sol
+%
+% \ARCOTH{2}{\sol}
+% \sol
+% \end{exemple}
+% \end{description}
+%
+% \section{Operations with lengths}
+% \begin{description}
+% \item[\cs{LENGTHDIVIDE}\marg{length1}\marg{length2}\marg{\cs{cmd}}]%
+% \SpecialUsageIndex{\LENGTHDIVIDE}\mbox{}
+%
+% This command divides two lengths
+% and returns a number.
+% \begin{exemple}
+% \LENGTHDIVIDE{1in}{1cm}{\sol}
+% One inch equals $\sol$ centimeters.
+% \end{exemple}
+%
+% Commands \cs{LENGTHADD} and \cs{LENGTHSUBTRACT} return the sum and
+% the difference of two lengths \newinversion{2.0}.
+%
+% \item[\cs{LENGTHADD}\marg{length1}\marg{length2}\marg{\cs{cmd}}]%
+% \SpecialUsageIndex{\LENGTHADD}\mbox{}
+% \item[\cs{LENGTHSUBTRACT}\marg{length1}\marg{length2}\marg{\cs{cmd}}]%
+% \SpecialUsageIndex{\LENGTHSUBTRACT}\mbox{}
+%
+% (\cs{cmd} must be a predefined length).
+% \begin{exemple}
+% \newlength{\mylength}
+% \LENGTHADD{1in}{1cm}{\mylength}
+% $1in+1cm=\the\mylength$.
+%
+% \LENGTHSUBTRACT{1in}{1cm}{\mylength}
+% $1in-1cm=\the\mylength$.
+% \end{exemple}
+% \end{description}
+%
% \section{Matrix arithmetic}
% The \textsf{calculator} package defines the commands described below
% to operate on vectors and matrices.
@@ -902,13 +994,16 @@ version 1999/12/01 or later.
% $2(3,5,-1)=(\sola,\solb,\solc)$
% \end{exemple}
% \end{description}
-% \subsubsection{Scalar product and euclidean norm}
+% \subsubsection{Scalar (dot) product and euclidean norm}
% \begin{description}
% \item[\cs{SCALARPRODUCT}\parg{x1,y1}\parg{x2,y2}\marg{\cs{cmd}}]
% \SpecialUsageIndex{\SCALARPRODUCT}%
%
% \item[\cs{SCALARPRODUCT}\parg{x1,y1,z1}\parg{x2,y2,z2}\marg{\cs{cmd}}]
% \SpecialUsageIndex{\SCALARPRODUCT}%
+%
+% \item[\cs{DOTPRODUCT}]\SpecialUsageIndex{\DOTPRODUCT}%
+% is an alias of \cs{SCALARPRODUCT} \newinversion{2.0}.
%
% \item[\cs{VECTORNORM}\parg{x,y}\marg{\cs{cmd}}]\mbox{}
% \SpecialUsageIndex{\VECTORNORM}%
@@ -919,7 +1014,7 @@ version 1999/12/01 or later.
% \SCALARPRODUCT(1,-1)(3,5){\sol}
% $(1,-1)\cdot(3,5)=\sol$
%
-% \SCALARPRODUCT(1,-1,2)(3,5,-1){\sol}
+% \DOTPRODUCT(1,-1,2)(3,5,-1){\sol}
% $(1,-1,2)\cdot(3,5,-1)=\sol$
%
% \VECTORNORM(3,4)\sol
@@ -929,6 +1024,25 @@ version 1999/12/01 or later.
% $\left\|(1,2,-2)\right\|=\sol$
% \end{exemple}
% \end{description}
+% \subsubsection{Vector (cross) product \newinversion{2.0}}
+% \begin{description}
+%
+% \item[\cs{VECTORPRODUCT}\parg{x1,y1,z1}\parg{x2,y2,z2}\parg{\cs{cmd1},\cs{cmd2},\cs{cmd3}}]
+% \SpecialUsageIndex{\VECTORPRODUCT}%
+%
+% \item[\cs{CROSSPRODUCT}]\SpecialUsageIndex{\CROSSPRODUCT}%
+% is an alias of \cs{VECTORPRODUCT}.
+% \begin{exemple}
+% \CROSSPRODUCT(1,-1,2)(3,5,-1)%
+% (\sola,\solb,\solc)
+% $(1,-1,2)\times(3,5,-1)=(\sola,\solb,\solc)$
+%
+% \VECTORPRODUCT(1,-1,2)(-3,3,-6)%
+% (\sola,\solb,\solc)
+% $(1,-1,2)\times(-3,3,-6)=(\sola,\solb,\solc)$
+%
+% \end{exemple}
+% \end{description}
% \subsubsection{Unit vector parallel to a given vector (normalized vector)}
% \begin{description}
% \item[\cs{UNITVECTOR}\parg{x,y}\parg{\TBS cmd1,\TBS cmd2}]
@@ -959,6 +1073,26 @@ version 1999/12/01 or later.
% $(\sola,\solb,\solc)$
% \end{exemple}
% \end{description}
+% \subsubsection{Angle between two vectors \newinversion{2.0}}
+% \begin{description}
+% \item[\cs{TWOVECTORSANGLE}\parg{x1,y1}\parg{x2,y2}\marg{\cs{cmd}}]
+% \SpecialUsageIndex{\TWOVECTORSANGLE}%
+%
+% \item[\cs{TWOVECTORSANGLE}\parg{x1,y1,z1}\parg{x2,y2,z2}\marg{\cs{cmd}}]
+% \mbox{} \SpecialUsageIndex{TWOVECTORSANGLE}
+% \begin{exemple}
+% \TWOVECTORSANGLE(1,1)(0,1){\sol}
+% $\sol$ radians
+% \RADtoDEG{\sol}{\degsol}
+% (or $\degsol$ degrees)
+%
+% \TWOVECTORSANGLE(1,0,0)(0,1,0){\sol}
+% $\sol$
+% \RADtoDEG{\sol}{\degsol}
+% (or $\degsol$ degrees)
+% \end{exemple}
+% \end{description}
+%
% \subsection{Matrix operations}
% \subsubsection{Assignments}
% \begin{description}
@@ -1319,6 +1453,21 @@ version 1999/12/01 or later.
% \end{tabular}
% \end{center}
%
+% The following functions are added in version 2.0 \newinversion{2.0}
+%
+% \begin{center}
+% \begin{tabular}{llll}
+% \ttfamily \cs{ARCCOSfunction} & $f(t)=\arccos t$ &
+% \ttfamily \cs{ARCSINfunction} & $f(t)=\arcsin t$ \\
+% \ttfamily \cs{ARCTANfunction} & $f(t)=\arctan t$ &
+% \ttfamily \cs{ARCCOTfunction} & $f(t)=\arccot t$ \\
+% \ttfamily \cs{ARCOSHfunction} & $f(t)=\arcosh t$ &
+% \ttfamily \cs{ARSINHfunction} & $f(t)=\arsinh t$ \\
+% \ttfamily \cs{ARTANHfunction} & $f(t)=\artanh t$ &
+% \ttfamily \cs{ARCOTHfunction} & $f(t)=\arcoth t$ \\
+% \end{tabular}
+% \end{center}
+%
% In the following example, we use the |\LOGfunction| function to compute
% a table of the $\log$ function and its derivative.
% \begin{exemple}
@@ -1718,13 +1867,14 @@ version 1999/12/01 or later.
%
% \StopEventually{}
%
-% \section{Implementation (\textsf{calculator})}
+% \part{Implementation}
+% \section{\textsf{calculator}}
% \begin{macrocode}
%<*calculator>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{calculator}[2012/06/10 v.1.0a]
+\ProvidesPackage{calculator}[2014/02/20 v.2.0]
% \end{macrocode}
-% \subsection{Internal lengths and special nmbers}
+% \subsection{Internal lengths and special numbers}
% \cs{cctr@lengtha} and \cs{cctr@lengthb}
% will be used in internal calculations and comparisons.
% \begin{macrocode}
@@ -1739,7 +1889,7 @@ version 1999/12/01 or later.
% $0.00002\approx1/65536=1/2^{16}$.
% \begin{macrocode}
\newdimen\cctr@epsilon
-\cctr@epsilon=1sp
+\cctr@epsilon=1sp
% \end{macrocode}
% \end{macro}
% \begin{macro}{\cctr@logmaxnum}
@@ -1772,6 +1922,37 @@ version 1999/12/01 or later.
{The exponent in power function\MessageBreak
must be an integer\MessageBreak
I can't define #1^#2}}
+
+\def\cctr@Warnbigarcsin#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcsin\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define arcsin(#1)}}
+
+\def\cctr@Warnbigarccos#1{%
+ \PackageWarning{calculator}%
+ {The argument in arccos\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define arccos(#1)}}
+
+\def\cctr@Warnsmallarcosh#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcosh\MessageBreak
+ must be a number greater or equal than 1\MessageBreak
+ I can't define arcosh(#1)}}
+
+\def\cctr@Warnbigartanh#1{%
+ \PackageWarning{calculator}%
+ {The argument in artanh\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define artanh(#1)}}
+
+\def\cctr@Warnsmallarcoth#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcoth\MessageBreak
+ must be a number greater than 1\MessageBreak
+ or smaller than -1\MessageBreak
+ I can't define arcoth(#1)}}
\def\cctr@Warnsingmatrix#1#2#3#4{%
\PackageWarning{calculator}%
@@ -1783,18 +1964,18 @@ version 1999/12/01 or later.
{Matrix (#1 #2 #3; #4 #5 #6; #7 #8 #9) is singular\MessageBreak
Its inverse is not defined}}
-\def\cctr@WarnIncLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIncLinSys{\PackageWarning{calculator}{%
Incompatible linear system}}
-\def\cctr@WarnIncTDLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIncTDLinSys{\PackageWarning{calculator}{%
Incompatible or indeterminate linear system\MessageBreak
For 3x3 systems I can solve only determinate systems}}
-\def\cctr@WarnIndLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIndLinSys{\PackageWarning{calculator}{%
Indeterminate linear system.\MessageBreak
I will choose one of the infinite solutions}}
-\def\cctr@WarnZeroLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnZeroLinSys{\PackageWarning{calculator}{%
0x=0 linear system. Every vector is a solution!\MessageBreak
I will choose the (0,0) solution}}
@@ -1829,7 +2010,19 @@ version 1999/12/01 or later.
\PackageWarning{calculator}{%
The value of the variable\MessageBreak
in the logarithm function must be positive\MessageBreak
- I can't define log(#1)}}
+ I can't define log(#1)}}
+
+\def\cctr@Warncrossprod(#1)(#2){%
+ \PackageWarning{calculator}%
+ {Vector product only defined\MessageBreak
+ for 3 dimmensional vectors.\MessageBreak
+ I can't define (#1)x(#2)}}
+
+\def\cctr@Warnnoangle(#1)(#2){%
+ \PackageWarning{calculator}%
+ {Angle between two vectors only defined\MessageBreak
+ for nonzero vectors.\MessageBreak
+ I can't define an angle between (#1) and (#2)}}
% \end{macrocode}
% \subsection{Operations with numbers}
% \subsubsection*{Assignements and comparisons}
@@ -2017,6 +2210,30 @@ version 1999/12/01 or later.
\fi\ignorespaces}
% \end{macrocode}
% \end{macro}
+% \changes{v2.0}{2014/02/13}{New commands: \cs{LENGTHADD},
+% \cs{LENGTHSUBTRACT}}
+% \begin{macro}{\LENGTHADD}
+% The sum of two lengths.
+% \cs{LENGTHADD}\marg{\#1}\marg{\#2}\marg{\#3}
+% stores in \textit{\#3} the sum of the lenghts
+% \textit{\#1} and \textit{\#2} (\#3 must be a length).
+% \begin{macrocode}
+\def\LENGTHADD#1#2#3{\cctr@lengtha=#1
+ \cctr@lengthb=#2
+ \advance\cctr@lengtha by \cctr@lengthb
+ \setlength{#3}{\cctr@lengtha}\ignorespaces}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\LENGTHSUBTRACT}
+% The difference of two lengths.
+% \cs{LENGTHSUBTRACT}\marg{\#1}\marg{\#2}\marg{\#3}
+% stores in \textit{\#3} the difference of the lenghts
+% \textit{\#1} and \textit{\#2} (\#3 must be a length).
+% \begin{macrocode}
+\def\LENGTHSUBTRACT#1#2#3{%
+ \LENGTHADD{#1}{-#2}{#3}}
+% \end{macrocode}
+% \end{macro}
% \begin{macro}{\LENGTHDIVIDE}
% The quotient of two lengths must be a number (not a length).
% For example, one inch over one centimeter equals $2.54$.
@@ -2981,11 +3198,10 @@ version 1999/12/01 or later.
% We start with |\cctr@lengthb=5\p@| to ensure almost one iteration.
% \begin{macrocode}
\cctr@lengthb=5\p@%
- \cctr@lengtha=\cctr@epsilon%
% \end{macrocode}
% Successive iterations
% \begin{macrocode}
- \@whilenum \cctr@lengthb>\cctr@lengtha \do {%
+ \@whilenum \cctr@lengthb>\cctr@epsilon \do {%
\COPY{\cctr@tempw}{\cctr@tempoldw}
\EXP{\cctr@tempw}{\cctr@tempxw}
\DIVIDE{#1}{\cctr@tempxw}{\cctr@tempxw}
@@ -2999,6 +3215,334 @@ version 1999/12/01 or later.
\COPY{\cctr@tempw}{#2}\@OUTPUTSOL{#2}}
% \end{macrocode}
% \end{macro}
+% \paragraph*{Inverse trigonometric functions}
+% \changes{v2.0}{2014/02/13}{New commands: \cs{ARCSIN},
+% \cs{ARCCOS}, \cs{ARCTAN},
+% \cs{ARCCOT}}
+% \begin{macro}{\ARCSIN}
+% \cs{ARCSIN}\marg{\#1}\marg{\#2}
+% defines \textit{\#2} as the arcsin of \textit{\#1},
+% using the Newton's method: $x_{n+1}=x_n-(\sin x_n-\textit{\#1})/(\cos x_n)$.
+% \begin{macrocode}
+\def\ARCSIN#1#2{%
+ \begingroup
+ \ifdim #1\p@ = \z@
+ \COPY{0}{#2}
+ \else
+ \ifdim #1\p@ = 1\p@
+ \COPY{\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ = -1\p@
+ \COPY{-\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ > 1\p@
+ \let#2\undefined
+ \cctr@Warnbigarcsin{#1}
+ \else
+ \ifdim #1\p@ < -1\p@
+ \let#2\undefined
+ \cctr@Warnbigarcsin{#1}
+ \else
+% \end{macrocode}
+% If $x$ is close to $1$ we use $\arcsin x=\pi/2-2\arcsin\sqrt{(1-x)/2}$
+% \begin{macrocode}
+ \ifdim #1\p@ >0.89\p@
+ \SUBTRACT{1}{#1}{\cctr@tempx}
+ \DIVIDE{\cctr@tempx}{2}{\cctr@tempx}
+ \SQRT{\cctr@tempx}{\cctr@tempxx}
+ \ARCSIN{\cctr@tempxx}{#2}
+ \MULTIPLY{2}{#2}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \else
+% \end{macrocode}
+% Symmetrically, for $x$ close to $-1$, $\arcsin x=-\pi/2+2\arcsin\sqrt{(1+x)/2}$
+% \begin{macrocode}
+ \ifdim #1\p@ <-0.89\p@
+ \ADD{1}{#1}{\cctr@tempx}
+ \DIVIDE{\cctr@tempx}{2}{\cctr@tempx}
+ \SQRT{\cctr@tempx}{\cctr@tempxx}
+ \ARCSIN{\cctr@tempxx}{#2}
+ \MULTIPLY{2}{#2}{#2}
+ \SUBTRACT{#2}{\numberHALFPI}{#2}
+ \else
+% \end{macrocode}
+% We take \textit{\#1} as the initial approximation.
+% \begin{macrocode}
+ \COPY{#1}{#2}
+% \end{macrocode}
+% If $-0.4\leq t\leq 0.4$ then $\arcsin x\approx x$ is a good approximation.
+% Else, we apply the Newton method
+% \begin{macrocode}
+ \ABSVALUE{#1}{\cctr@tempy}
+ \ifdim \cctr@tempy\p@ < 0.04\p@
+ \else
+% \end{macrocode}
+% \cs{cctr@lengthb} will be the difference of two successive iterations, and
+% \cs{cctr@tempoldy}, \cs{cctr@tempy} will be the two last iterations.
+%
+% We start with |\cctr@lengthb=5\p@| and |\cctr@tempy=16383| to ensure almost one iteration.
+% \begin{macrocode}
+ \cctr@lengthb=5\p@
+ \COPY{16383}{\cctr@tempy}
+% \end{macrocode}
+% Successive iterations
+% \begin{macrocode}
+ \@whilenum \cctr@lengthb>\cctr@epsilon \do {%
+% \end{macrocode}
+% Copy the actual approximation to \cs{cctr@tempw}
+% \begin{macrocode}
+ \COPY{#2}{\cctr@tempw}
+ \COPY{\cctr@tempy}{\cctr@tempoldy}
+ \SIN{\cctr@tempw}{\cctr@tempz}
+ \SUBTRACT{\cctr@tempz}{#1}{\cctr@tempz}
+ \COS{\cctr@tempw}{\cctr@tempy}
+ \DIVIDE{\cctr@tempz}{\cctr@tempy}{\cctr@tempz}
+ \SUBTRACT{\cctr@tempw}{\cctr@tempz}{\cctr@tempz}
+% \end{macrocode}
+% Now, \cs{cctr@tempz} is the new approximation.
+% \begin{macrocode}
+ \COPY{\cctr@tempz}{#2}
+% \end{macrocode}
+% Finally, we store in \cs{cctr@lengthb} the difference
+% of the two last approximations, finishing the loop.
+% \begin{macrocode}
+ \SUBTRACT{#2}{\cctr@tempw}{\cctr@tempy}
+ \ABSVALUE{\cctr@tempy}{\cctr@tempy}
+ \cctr@lengthb=\cctr@tempy\p@%
+ \ifdim\cctr@tempy\p@=\cctr@tempoldy\p@
+ \cctr@lengthb=\z@
+ \fi}\fi\fi\fi\fi\fi\fi\fi\fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCCOS}
+% \cs{ARCCOS}\marg{\#1}\marg{\#2}
+% defines \textit{\#2} as the arccos of \textit{\#1},
+% using the well know relation $\arccos x=\pi/2-\arcsin x$.
+% \begin{macrocode}
+\def\ARCCOS#1#2{%
+ \begingroup
+ \ifdim #1\p@ = \z@
+ \COPY{\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ = 1\p@
+ \COPY{0}{#2}
+ \else
+ \ifdim #1\p@ = -1\p@
+ \COPY{\numberPI}{#2}
+ \else
+ \ifdim #1\p@ > 1\p@
+ \let#2\undefined
+ \cctr@Warnbigarccos{#1}
+ \else
+ \ifdim #1\p@ < -1\p@
+ \let#2\undefined
+ \cctr@Warnbigarccos{#1}
+ \else
+ \ARCSIN{#1}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \fi\fi\fi\fi\fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCTAN}
+% \cs{ARCTAN}\marg{\#1}\marg{\#2}. arctan of \textit{\#1}.
+% \begin{macrocode}
+\def\ARCTAN#1#2{%
+ \begingroup
+% \end{macrocode}
+% If $\left\vert t \right\vert>1$, compute $\arctan x$ using
+% $\arctan x=sign(x)\pi/2-\arctan(1/x)$.
+% \begin{macrocode}
+ \ifdim#1\p@<-1\p@
+ \DIVIDE{1}{#1}{\cctr@tempb}
+ \ARCTAN{\cctr@tempb}{#2}
+ \SUBTRACT{-\numberHALFPI}{#2}{#2}
+ \else
+ \ifdim#1\p@>1\p@
+ \DIVIDE{1}{#1}{\cctr@tempb}
+ \ARCTAN{\cctr@tempb}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \else
+% \end{macrocode}
+% For $-1\leq x\leq 1$ call \cs{@BASICARCTAN}.
+% \begin{macrocode}
+ \@BASICARCTAN{#1}{#2}
+ \fi
+ \fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\@BASICARCTAN}
+% \cs{@BASICARCTAN}\marg{\#1}\marg{\#2} applies this approximation:
+% \[
+% \arctan x = \frac{x}{
+% 1+\displaystyle\frac{x^2}{
+% 3+\displaystyle\frac{(2x)^2}{
+% 5+\displaystyle\frac{(3x)^2}{
+% 7+\displaystyle\frac{(4x)^2}{
+% 9+\cdots
+% }
+% }
+% }
+% }
+% }
+% \]
+% \begin{macrocode}
+\def\@BASICARCTAN#1#2{%
+ \begingroup
+% \end{macrocode}
+% Exact arctan of zero
+% \begin{macrocode}
+ \ifdim#1\p@=\z@ \COPY{0}{#2}
+ \else
+% \end{macrocode}
+% Compute the continued fraction.
+% \begin{macrocode}
+ \SQUARE{#1}{\cctr@tempa}
+ \MULTIPLY{64}{\cctr@tempa}{#2}
+ \ADD{15}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{49}{#2}{#2}
+ \ADD{13}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{36}{#2}{#2}
+ \ADD{11}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{25}{#2}{#2}
+ \ADD{9}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{16}{#2}{#2}
+ \ADD{7}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{9}{#2}{#2}
+ \ADD{5}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{4}{#2}{#2}
+ \ADD{3}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \ADD{1}{#2}{#2}
+ \DIVIDE{#1}{#2}{#2}
+ \fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCCOT}
+% \cs{ARCCOT}\marg{\#1}\marg{\#2}
+% defines \textit{\#2} as the arccot of \textit{\#1},
+% using the well know relation $\operatorname{arccot} x=\pi/2-\arctan x$.
+% \begin{macrocode}
+\def\ARCCOT#1#2{%
+ \begingroup
+ \ARCTAN{#1}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \paragraph*{Inverse hyperbolic functions}
+% \changes{v2.0}{2014/02/13}{New commands: \cs{ARSINH},
+% \cs{ARCOSH}, \cs{ARTANH},
+% \cs{ARCOTH}}
+% \begin{macro}{\ARSINH}
+% \cs{ARSINH}\marg{\#1}\marg{\#2}. Inverse hyperbolic sine of \textit{\#1}:
+% $\arsinh x = \log\left(x+\sqrt{1+x^2}\right)$
+% \begin{macrocode}
+\def\ARSINH#1#2{%
+ \begingroup
+ \SQUARE{#1}{\cctr@tempa}
+ \ADD{1}{\cctr@tempa}{\cctr@tempa}
+ \SQRT{\cctr@tempa}{\cctr@tempb}
+ \ADD{#1}{\cctr@tempb}{\cctr@tempb}
+ \LOG\cctr@tempb{#2}
+ \@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\ARCOSH}
+% \cs{ARCOSH}\marg{\#1}\marg{\#2}. Inverse hyperbolic sine of \textit{\#1}:
+% $\arcosh x = \log\left(x+\sqrt{x^2-1}\right)$
+% \begin{macrocode}
+\def\ARCOSH#1#2{%
+ \begingroup
+% \end{macrocode}
+% If $x<1$, this function is no defined
+% \begin{macrocode}
+ \ifdim#1\p@<1\p@
+ \let#2\undefined
+ \cctr@Warnsmallarcosh{#1}
+ \else
+ \SQUARE{#1}{\cctr@tempa}
+ \SUBTRACT{\cctr@tempa}{1}{\cctr@tempa}
+ \SQRT{\cctr@tempa}{\cctr@tempb}
+ \ADD{#1}{\cctr@tempb}{\cctr@tempb}
+ \LOG\cctr@tempb{#2}
+ \fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARTANH}
+% \cs{ARTANH}\marg{\#1}\marg{\#2}. Inverse hyperbolic tangent of \textit{\#1}:
+% $\artanh x = \frac12\log \left((1+x)-\log(1-x)\right)$
+% \begin{macrocode}
+\def\ARTANH#1#2{%
+ \begingroup
+% \end{macrocode}
+% If $\left\vert x \right\vert\geq1$, this function is no defined
+% \begin{macrocode}
+ \ifdim#1\p@<-0.99998\p@
+ \let#2\undefined
+ \cctr@Warnbigartanh{#1}
+ \else
+ \ifdim#1\p@>0.99998\p@
+ \let#2\undefined
+ \cctr@Warnbigartanh{#1}
+ \else
+ \COPY{#1}{\cctr@tempa}
+ \ADD1\cctr@tempa\cctr@tempb
+ \SUBTRACT1\cctr@tempa\cctr@tempc
+ \LOG\cctr@tempb\cctr@tempB
+ \LOG\cctr@tempc\cctr@tempC
+ \SUBTRACT\cctr@tempB\cctr@tempC{#2}
+ \DIVIDE{#2}{2}{#2}
+ \fi
+ \fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCOTH}
+% \cs{ARCOTH}\marg{\#1}\marg{\#2}. Inverse hyperbolic cotangent of \textit{\#1}:
+%
+% $\arcoth x = sign(x)\frac12\log \left((x+1)-\log(x-1)\right)$
+% \begin{macrocode}
+\def\ARCOTH#1#2{%
+ \begingroup
+% \end{macrocode}
+% If $\left\vert x \right\vert\leq1$, this function is no defined
+% \begin{macrocode}
+ \ifdim#1\p@>-0.99998\p@
+ \ifdim#1\p@<0.99998\p@
+ \let#2\undefined
+ \cctr@Warnsmallarcoth{#1}
+ \else
+ \ifdim#1\p@>\p@
+% \end{macrocode}
+% For $x>1$, calcule $\arcoth x = \frac12\log \left((x+1)-\log(x-1)\right)$
+% \begin{macrocode}
+ \COPY{#1}{\cctr@tempa}
+ \ADD1\cctr@tempa\cctr@tempb
+ \SUBTRACT\cctr@tempa1\cctr@tempc
+ \LOG\cctr@tempb\cctr@tempB
+ \LOG\cctr@tempc\cctr@tempC
+ \SUBTRACT\cctr@tempB\cctr@tempC{#2}
+ \DIVIDE{#2}{2}{#2}
+ \else
+ \fi
+ \fi
+ \else
+% \end{macrocode}
+% For $x<-1$, calcule $-\artanh(-x)$
+% \begin{macrocode}
+ \MULTIPLY{-1}{#1}{\cctr@tempa}
+ \ARCOTH{\cctr@tempa}{#2}
+ \COPY{-#2}{#2}
+ \fi\@OUTPUTSOL{#2}}
+% \end{macrocode}
+% \end{macro}
+%
% \subsection{Matrix arithmetics}
% \subsubsection*{Vector operations}
% \begin{macro}{\VECTORSIZE}
@@ -3090,6 +3634,45 @@ version 1999/12/01 or later.
\else \@@@SCALARPRODUCT(#1)(#2){#3}\fi\@OUTPUTSOL{#3}}
% \end{macrocode}
% \end{macro}
+
+% \changes{v2.0}{2013/07/10}{New commands: \cs{DOTPRODUCT},
+% \cs{VECTORPRODUCT}, \cs{CROSSPRODUCT}}
+% \begin{macro}{\DOTPRODUCT}
+% \cs{DOTPRODUCT} is an alias for \cs{SCALARPRODUCT}.
+% \begin{macrocode}
+\let\DOTPRODUCT\SCALARPRODUCT
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\VECTORPRODUCT}
+% Vector product of two (three dimensional) vectors.
+% \begin{macrocode}
+\def\@@VECTORPRODUCT(#1)(#2)(#3,#4){%
+ \let#3\undefined
+ \let#4\undefined
+ \cctr@Warncrossprod(#1)(#2)}
+
+\def\@@@VECTORPRODUCT(#1,#2,#3)(#4,#5,#6)(#7,#8,#9){%
+ \DETERMINANT(#2,#3;#5,#6){#7}
+ \DETERMINANT(#3,#1;#6,#4){#8}
+ \DETERMINANT(#1,#2;#4,#5){#9}}
+
+\def\VECTORPRODUCT(#1)(#2)(#3){%
+ \begingroup
+ \VECTORSIZE(#1){\cctr@size}
+ \ifnum\cctr@size=2
+ \@@VECTORPRODUCT(#1)(#2)(#3)
+ \else \@@@VECTORPRODUCT(#1)(#2)(#3)\fi\@OUTPUTSOL{#3}}
+% \end{macrocode}
+% \end{macro}
+
+% \begin{macro}{\CROSSPRODUCT}
+% \cs{CROSSPRODUCT} is an alias for \cs{VECTORPRODUCT}.
+% \begin{macrocode}
+\let\CROSSPRODUCT\VECTORPRODUCT
+% \end{macrocode}
+% \end{macro}
+
% \begin{macro}{\VECTORADD}
% Sum of two vectors.
% \begin{macrocode}
@@ -3179,6 +3762,28 @@ version 1999/12/01 or later.
\SCALARVECTORPRODUCT{\cctr@tempa}(#1)(#2)\@OUTPUTVECTOR(#2)}
% \end{macrocode}
% \end{macro}
+% \begin{macro}{\TWOVECTORSANGLE}
+% Angle between two vectors.
+% \begin{macrocode}
+\def\TWOVECTORSANGLE(#1)(#2)#3{%
+ \begingroup
+ \VECTORNORM(#1){\cctr@tempa}
+ \VECTORNORM(#2){\cctr@tempb}
+ \SCALARPRODUCT(#1)(#2){\cctr@tempc}
+ \ifdim \cctr@tempa\p@ =\z@
+ \let#3\undefined
+ \cctr@Warnnoangle(#1)(#2)
+ \else
+ \ifdim \cctr@tempb\p@ =\z@
+ \let#3\undefined
+ \cctr@Warnnoangle(#1)(#2)
+ \else
+ \DIVIDE{\cctr@tempc}{\cctr@tempa}{\cctr@tempc}
+ \DIVIDE{\cctr@tempc}{\cctr@tempb}{\cctr@tempc}
+ \ARCCOS{\cctr@tempc}{#3}
+ \fi\fi\@OUTPUTSOL{#3}}
+% \end{macrocode}
+% \end{macro}
% \subsubsection*{Matrix operations}
% Here, we need to define some internal macros
% to simulate commands with more than nine arguments.
@@ -3787,12 +4392,12 @@ version 1999/12/01 or later.
%</calculator>
% \end{macrocode}
%
-% \section{Implementation (\textsf{calculator})}
+% \section{\textsf{calculus}}
+% \changes{v2.0}{2013/07/10}{Trivial error in documentation corrected}
% \begin{macrocode}
%<*calculus>
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{calculus}
- [2012/06/10 v.1.0a]
+\ProvidesPackage{calculus}[2014/02/20 v.2.0]
% \end{macrocode}
% This package requires the calculator package.
% \begin{macrocode}
@@ -4382,6 +4987,96 @@ version 1999/12/01 or later.
\COPY{0}{\Dy}}
% \end{macrocode}
% \end{macro}
+% \changes{v2.0}{2014/02/13}{New commands: \cs{ARCSINfunction},
+% \cs{ARCCOSfunction}, \cs{ARCTANfunction},
+% \cs{ARCCOTfunction}}
+% \begin{macro}{\ARCSINfunction}
+% The \cs{ARCSINfunction}: $y(t)=\arcsin t$, $y'(t)=1/\sqrt{1-t^2}$
+% \begin{macrocode}
+\newfunction{\ARCSINfunction}{%
+ \ARCSIN{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCCOSfunction}
+% The \cs{ARCCOSfunction}: $y(t)=\arccos t$, $y'(t)=-1/\sqrt{1-t^2}$
+% \begin{macrocode}
+\newfunction{\ARCCOSfunction}{%
+ \ARCCOS{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{-1}{\Dy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCTANfunction}
+% The \cs{ARCTANfunction}: $y(t)=\arctan t$, $y'(t)=1/(1+t^2)$
+% \begin{macrocode}
+\newfunction{\ARCTANfunction}{%
+ \ARCTAN{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCCOTfunction}
+% The \cs{ARCCOTfunction}: $y(t)=\arccot t$, $y'(t)=-1/(1+t^2)$
+% \begin{macrocode}
+\newfunction{\ARCCOTfunction}{%
+ \ARCCOT{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \DIVIDE{-1}{\yy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \changes{v2.0}{2014/02/13}{New commands: \cs{ARSINHfunction},
+% \cs{ARCOSHfunction}, \cs{ARTANHfunction},
+% \cs{ARCOTHfunction}}
+% \begin{macro}{\ARSINHfunction}
+% The \cs{ARSINHfunction}: $y(t)=\arsinh t$, $y'(t)=1/\sqrt{1+t^2}$
+% \begin{macrocode}
+\newfunction{\ARSINHfunction}{%
+ \ARSINH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCOSHfunction}
+% The \cs{ARSINHfunction}: $y(t)=\arcosh t$, $y'(t)=1/\sqrt{t^2-1}$
+% \begin{macrocode}
+\newfunction{\ARCOSHfunction}{%
+ \ARCOSH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{\yy}{1}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARTANHfunction}
+% The \cs{ARTANHfunction}: $y(t)=\artanh t$, $y'(t)=1/(t^2-1)$
+% \begin{macrocode}
+\newfunction{\ARTANHfunction}{%
+ \ARTANH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
+% \begin{macro}{\ARCOTHfunction}
+% The \cs{ARCOTHfunction}: $y(t)=\arcoth t$, $y'(t)=1/(t^2-1)$
+% \begin{macrocode}
+\newfunction{\ARCOTHfunction}{%
+ \ARCOTH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
+% \end{macrocode}
+% \end{macro}
% \subsection{Operations with functions}
% \begin{macro}{\CONSTANTfunction}
% \cs{CONSTANTfunction} defines \#2 as the constant function $f(t)=\#1$.
diff --git a/Master/texmf-dist/source/latex/calculator/calculator.ins b/Master/texmf-dist/source/latex/calculator/calculator.ins
new file mode 100644
index 00000000000..1b761991586
--- /dev/null
+++ b/Master/texmf-dist/source/latex/calculator/calculator.ins
@@ -0,0 +1,74 @@
+%%
+%% Copyright (C) 2012, 2014 by Robert Fuster <rfuster@mat.upv.es>
+%%
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
+%%
+%% http://www.latex-project.org/lppl.txt
+%%
+%% and version 1.3 or later is part of all distributions of LaTeX
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Robert Fuster
+%%
+%% This work consists of the files calculator.dtx and calculator.ins
+%% and the derived files calculator.sty, calculus.ins, and several
+%% calculator<nn>.tex derived files.
+%%
+
+\input docstrip.tex
+\keepsilent
+
+\usedir{tex/latex/calculator}
+
+\preamble
+This is a generated file.
+
+This work may be distributed and/or modified under the conditions of
+the LaTeX Project Public License, either version 1.3 of this license
+or (at your option) any later version. The latest version of this
+license is in:
+
+ http://www.latex-project.org/lppl.txt
+
+and version 1.3 or later is part of all distributions of LaTeX
+version 2005/12/01 or later.
+
+This work has the LPPL maintenance status `maintained'.
+
+The Current Maintainer of this work is Robert Fuster
+
+This work consists of the files calculator.dtx and calculator.ins
+and the derived files calculator.sty, calculus.ins, and several
+calculator<nn>.tex derived files.
+
+\endpreamble
+
+\generate{\file{calculator.sty}{\from{calculator.dtx}{calculator}}}
+\generate{\file{calculus.sty}{\from{calculator.dtx}{calculus}}}
+
+\obeyspaces
+\Msg{*****************************************************}
+\Msg{* *}
+\Msg{* To finish the installation you have to move the *}
+\Msg{* following file into a directory searched by TeX: *}
+\Msg{* *}
+\Msg{* calculator.sty *}
+\Msg{* *}
+\Msg{* (in a TDS compliant tree, something like *}
+\Msg{* <a texmf dir>/tex/latex/calculator/ *}
+\Msg{* can be a good choice) *}
+\Msg{* *}
+\Msg{* To produce the documentation run the file *}
+\Msg{* calculator.dtx *}
+\Msg{* through LaTeX. *}
+\Msg{* *}
+\Msg{* Happy TeXing! *}
+\Msg{* *}
+\Msg{*****************************************************}
+
+\endbatchfile
diff --git a/Master/texmf-dist/tex/latex/calculator/calculator.sty b/Master/texmf-dist/tex/latex/calculator/calculator.sty
index eb17a0715c0..0c8cd4a23c8 100644
--- a/Master/texmf-dist/tex/latex/calculator/calculator.sty
+++ b/Master/texmf-dist/tex/latex/calculator/calculator.sty
@@ -5,21 +5,27 @@
%% The original source files were:
%%
%% calculator.dtx (with options: `calculator')
-%% ------------------------------------------------------------------
-%% The calculator and calculus packages
-%% Copyright (C) 2012 by Robert Fuster <rfuster@mat.upv.es>
-%% All rights reserved
+%% This is a generated file.
%%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in:
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
%%
-%% http://www.latex-project.org/lppl.txt
+%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
-%% ------------------------------------------------------------------
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Robert Fuster
+%%
+%% This work consists of the files calculator.dtx and calculator.ins
+%% and the derived files calculator.sty, calculus.ins, and several
+%% calculator<nn>.tex derived files.
+%%
+%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -39,8 +45,9 @@
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{calculator}[2012/06/10 v.1.0a]
+\ProvidesPackage{calculator}[2014/02/20 v.2.0]
\newdimen\cctr@lengtha
\newdimen\cctr@lengthb
\newdimen\cctr@epsilon
@@ -67,6 +74,37 @@
must be an integer\MessageBreak
I can't define #1^#2}}
+\def\cctr@Warnbigarcsin#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcsin\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define arcsin(#1)}}
+
+\def\cctr@Warnbigarccos#1{%
+ \PackageWarning{calculator}%
+ {The argument in arccos\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define arccos(#1)}}
+
+\def\cctr@Warnsmallarcosh#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcosh\MessageBreak
+ must be a number greater or equal than 1\MessageBreak
+ I can't define arcosh(#1)}}
+
+\def\cctr@Warnbigartanh#1{%
+ \PackageWarning{calculator}%
+ {The argument in artanh\MessageBreak
+ must be a number between -1 and 1\MessageBreak
+ I can't define artanh(#1)}}
+
+\def\cctr@Warnsmallarcoth#1{%
+ \PackageWarning{calculator}%
+ {The argument in arcoth\MessageBreak
+ must be a number greater than 1\MessageBreak
+ or smaller than -1\MessageBreak
+ I can't define arcoth(#1)}}
+
\def\cctr@Warnsingmatrix#1#2#3#4{%
\PackageWarning{calculator}%
{Matrix (#1 #2 ; #3 #4) is singular\MessageBreak
@@ -77,18 +115,18 @@
{Matrix (#1 #2 #3; #4 #5 #6; #7 #8 #9) is singular\MessageBreak
Its inverse is not defined}}
-\def\cctr@WarnIncLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIncLinSys{\PackageWarning{calculator}{%
Incompatible linear system}}
-\def\cctr@WarnIncTDLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIncTDLinSys{\PackageWarning{calculator}{%
Incompatible or indeterminate linear system\MessageBreak
For 3x3 systems I can solve only determinate systems}}
-\def\cctr@WarnIndLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnIndLinSys{\PackageWarning{calculator}{%
Indeterminate linear system.\MessageBreak
I will choose one of the infinite solutions}}
-\def\cctr@WarnZeroLinSys{\PackageWarning{xpicture}{%
+\def\cctr@WarnZeroLinSys{\PackageWarning{calculator}{%
0x=0 linear system. Every vector is a solution!\MessageBreak
I will choose the (0,0) solution}}
@@ -124,6 +162,18 @@
The value of the variable\MessageBreak
in the logarithm function must be positive\MessageBreak
I can't define log(#1)}}
+
+\def\cctr@Warncrossprod(#1)(#2){%
+ \PackageWarning{calculator}%
+ {Vector product only defined\MessageBreak
+ for 3 dimmensional vectors.\MessageBreak
+ I can't define (#1)x(#2)}}
+
+\def\cctr@Warnnoangle(#1)(#2){%
+ \PackageWarning{calculator}%
+ {Angle between two vectors only defined\MessageBreak
+ for nonzero vectors.\MessageBreak
+ I can't define an angle between (#1) and (#2)}}
\def\COPY#1#2{\edef#2{#1}\ignorespaces}
\def\GLOBALCOPY#1#2{\xdef#2{#1}\ignorespaces}
\def\@OUTPUTSOL#1{\GLOBALCOPY{#1}{\cctr@outa}\endgroup\COPY{\cctr@outa}{#1}}
@@ -185,6 +235,12 @@
\divide\cctr@lengtha\cctr@lengthb
\COPY{\number\cctr@lengtha}{#3}
\fi\ignorespaces}
+\def\LENGTHADD#1#2#3{\cctr@lengtha=#1
+ \cctr@lengthb=#2
+ \advance\cctr@lengtha by \cctr@lengthb
+ \setlength{#3}{\cctr@lengtha}\ignorespaces}
+\def\LENGTHSUBTRACT#1#2#3{%
+ \LENGTHADD{#1}{-#2}{#3}}
\def\LENGTHDIVIDE#1#2#3{%
\begingroup
\cctr@lengtha=#1
@@ -692,8 +748,7 @@
\def\@BASICLOG#1#2{\begingroup
\SUBTRACT{#1}{1}{\cctr@tempw}
\cctr@lengthb=5\p@%
- \cctr@lengtha=\cctr@epsilon%
- \@whilenum \cctr@lengthb>\cctr@lengtha \do {%
+ \@whilenum \cctr@lengthb>\cctr@epsilon \do {%
\COPY{\cctr@tempw}{\cctr@tempoldw}
\EXP{\cctr@tempw}{\cctr@tempxw}
\DIVIDE{#1}{\cctr@tempxw}{\cctr@tempxw}
@@ -705,6 +760,196 @@
\cctr@lengthb<\z@ \cctr@lengthb=-\cctr@lengthb
\fi}%
\COPY{\cctr@tempw}{#2}\@OUTPUTSOL{#2}}
+\def\ARCSIN#1#2{%
+ \begingroup
+ \ifdim #1\p@ = \z@
+ \COPY{0}{#2}
+ \else
+ \ifdim #1\p@ = 1\p@
+ \COPY{\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ = -1\p@
+ \COPY{-\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ > 1\p@
+ \let#2\undefined
+ \cctr@Warnbigarcsin{#1}
+ \else
+ \ifdim #1\p@ < -1\p@
+ \let#2\undefined
+ \cctr@Warnbigarcsin{#1}
+ \else
+ \ifdim #1\p@ >0.89\p@
+ \SUBTRACT{1}{#1}{\cctr@tempx}
+ \DIVIDE{\cctr@tempx}{2}{\cctr@tempx}
+ \SQRT{\cctr@tempx}{\cctr@tempxx}
+ \ARCSIN{\cctr@tempxx}{#2}
+ \MULTIPLY{2}{#2}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \else
+ \ifdim #1\p@ <-0.89\p@
+ \ADD{1}{#1}{\cctr@tempx}
+ \DIVIDE{\cctr@tempx}{2}{\cctr@tempx}
+ \SQRT{\cctr@tempx}{\cctr@tempxx}
+ \ARCSIN{\cctr@tempxx}{#2}
+ \MULTIPLY{2}{#2}{#2}
+ \SUBTRACT{#2}{\numberHALFPI}{#2}
+ \else
+ \COPY{#1}{#2}
+ \ABSVALUE{#1}{\cctr@tempy}
+ \ifdim \cctr@tempy\p@ < 0.04\p@
+ \else
+ \cctr@lengthb=5\p@
+ \COPY{16383}{\cctr@tempy}
+ \@whilenum \cctr@lengthb>\cctr@epsilon \do {%
+ \COPY{#2}{\cctr@tempw}
+ \COPY{\cctr@tempy}{\cctr@tempoldy}
+ \SIN{\cctr@tempw}{\cctr@tempz}
+ \SUBTRACT{\cctr@tempz}{#1}{\cctr@tempz}
+ \COS{\cctr@tempw}{\cctr@tempy}
+ \DIVIDE{\cctr@tempz}{\cctr@tempy}{\cctr@tempz}
+ \SUBTRACT{\cctr@tempw}{\cctr@tempz}{\cctr@tempz}
+ \COPY{\cctr@tempz}{#2}
+ \SUBTRACT{#2}{\cctr@tempw}{\cctr@tempy}
+ \ABSVALUE{\cctr@tempy}{\cctr@tempy}
+ \cctr@lengthb=\cctr@tempy\p@%
+ \ifdim\cctr@tempy\p@=\cctr@tempoldy\p@
+ \cctr@lengthb=\z@
+ \fi}\fi\fi\fi\fi\fi\fi\fi\fi\@OUTPUTSOL{#2}}
+\def\ARCCOS#1#2{%
+ \begingroup
+ \ifdim #1\p@ = \z@
+ \COPY{\numberHALFPI}{#2}
+ \else
+ \ifdim #1\p@ = 1\p@
+ \COPY{0}{#2}
+ \else
+ \ifdim #1\p@ = -1\p@
+ \COPY{\numberPI}{#2}
+ \else
+ \ifdim #1\p@ > 1\p@
+ \let#2\undefined
+ \cctr@Warnbigarccos{#1}
+ \else
+ \ifdim #1\p@ < -1\p@
+ \let#2\undefined
+ \cctr@Warnbigarccos{#1}
+ \else
+ \ARCSIN{#1}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \fi\fi\fi\fi\fi\@OUTPUTSOL{#2}}
+\def\ARCTAN#1#2{%
+ \begingroup
+ \ifdim#1\p@<-1\p@
+ \DIVIDE{1}{#1}{\cctr@tempb}
+ \ARCTAN{\cctr@tempb}{#2}
+ \SUBTRACT{-\numberHALFPI}{#2}{#2}
+ \else
+ \ifdim#1\p@>1\p@
+ \DIVIDE{1}{#1}{\cctr@tempb}
+ \ARCTAN{\cctr@tempb}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \else
+ \@BASICARCTAN{#1}{#2}
+ \fi
+ \fi\@OUTPUTSOL{#2}}
+\def\@BASICARCTAN#1#2{%
+ \begingroup
+ \ifdim#1\p@=\z@ \COPY{0}{#2}
+ \else
+ \SQUARE{#1}{\cctr@tempa}
+ \MULTIPLY{64}{\cctr@tempa}{#2}
+ \ADD{15}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{49}{#2}{#2}
+ \ADD{13}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{36}{#2}{#2}
+ \ADD{11}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{25}{#2}{#2}
+ \ADD{9}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{16}{#2}{#2}
+ \ADD{7}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{9}{#2}{#2}
+ \ADD{5}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \MULTIPLY{4}{#2}{#2}
+ \ADD{3}{#2}{#2}
+ \DIVIDE{\cctr@tempa}{#2}{#2}
+ \ADD{1}{#2}{#2}
+ \DIVIDE{#1}{#2}{#2}
+ \fi\@OUTPUTSOL{#2}}
+\def\ARCCOT#1#2{%
+ \begingroup
+ \ARCTAN{#1}{#2}
+ \SUBTRACT{\numberHALFPI}{#2}{#2}
+ \@OUTPUTSOL{#2}}
+\def\ARSINH#1#2{%
+ \begingroup
+ \SQUARE{#1}{\cctr@tempa}
+ \ADD{1}{\cctr@tempa}{\cctr@tempa}
+ \SQRT{\cctr@tempa}{\cctr@tempb}
+ \ADD{#1}{\cctr@tempb}{\cctr@tempb}
+ \LOG\cctr@tempb{#2}
+ \@OUTPUTSOL{#2}}
+
+\def\ARCOSH#1#2{%
+ \begingroup
+ \ifdim#1\p@<1\p@
+ \let#2\undefined
+ \cctr@Warnsmallarcosh{#1}
+ \else
+ \SQUARE{#1}{\cctr@tempa}
+ \SUBTRACT{\cctr@tempa}{1}{\cctr@tempa}
+ \SQRT{\cctr@tempa}{\cctr@tempb}
+ \ADD{#1}{\cctr@tempb}{\cctr@tempb}
+ \LOG\cctr@tempb{#2}
+ \fi\@OUTPUTSOL{#2}}
+\def\ARTANH#1#2{%
+ \begingroup
+ \ifdim#1\p@<-0.99998\p@
+ \let#2\undefined
+ \cctr@Warnbigartanh{#1}
+ \else
+ \ifdim#1\p@>0.99998\p@
+ \let#2\undefined
+ \cctr@Warnbigartanh{#1}
+ \else
+ \COPY{#1}{\cctr@tempa}
+ \ADD1\cctr@tempa\cctr@tempb
+ \SUBTRACT1\cctr@tempa\cctr@tempc
+ \LOG\cctr@tempb\cctr@tempB
+ \LOG\cctr@tempc\cctr@tempC
+ \SUBTRACT\cctr@tempB\cctr@tempC{#2}
+ \DIVIDE{#2}{2}{#2}
+ \fi
+ \fi\@OUTPUTSOL{#2}}
+\def\ARCOTH#1#2{%
+ \begingroup
+ \ifdim#1\p@>-0.99998\p@
+ \ifdim#1\p@<0.99998\p@
+ \let#2\undefined
+ \cctr@Warnsmallarcoth{#1}
+ \else
+ \ifdim#1\p@>\p@
+ \COPY{#1}{\cctr@tempa}
+ \ADD1\cctr@tempa\cctr@tempb
+ \SUBTRACT\cctr@tempa1\cctr@tempc
+ \LOG\cctr@tempb\cctr@tempB
+ \LOG\cctr@tempc\cctr@tempC
+ \SUBTRACT\cctr@tempB\cctr@tempC{#2}
+ \DIVIDE{#2}{2}{#2}
+ \else
+ \fi
+ \fi
+ \else
+ \MULTIPLY{-1}{#1}{\cctr@tempa}
+ \ARCOTH{\cctr@tempa}{#2}
+ \COPY{-#2}{#2}
+ \fi\@OUTPUTSOL{#2}}
\def\VECTORSIZE(#1)#2{\expandafter\@VECTORSIZE(#1,,){#2}}
\def\@VECTORSIZE(#1,#2,#3,#4)#5{\ifx$#3$\COPY{2}{#5}
\else\COPY{3}{#5}\fi\ignorespaces}
@@ -760,6 +1005,28 @@
\ifnum\cctr@size=2
\@@SCALARPRODUCT(#1)(#2){#3}
\else \@@@SCALARPRODUCT(#1)(#2){#3}\fi\@OUTPUTSOL{#3}}
+
+\let\DOTPRODUCT\SCALARPRODUCT
+
+\def\@@VECTORPRODUCT(#1)(#2)(#3,#4){%
+ \let#3\undefined
+ \let#4\undefined
+ \cctr@Warncrossprod(#1)(#2)}
+
+\def\@@@VECTORPRODUCT(#1,#2,#3)(#4,#5,#6)(#7,#8,#9){%
+ \DETERMINANT(#2,#3;#5,#6){#7}
+ \DETERMINANT(#3,#1;#6,#4){#8}
+ \DETERMINANT(#1,#2;#4,#5){#9}}
+
+\def\VECTORPRODUCT(#1)(#2)(#3){%
+ \begingroup
+ \VECTORSIZE(#1){\cctr@size}
+ \ifnum\cctr@size=2
+ \@@VECTORPRODUCT(#1)(#2)(#3)
+ \else \@@@VECTORPRODUCT(#1)(#2)(#3)\fi\@OUTPUTSOL{#3}}
+
+\let\CROSSPRODUCT\VECTORPRODUCT
+
\def\@@VECTORADD(#1,#2)(#3,#4)(#5,#6){%
\ADD{#1}{#3}{#5}
\ADD{#2}{#4}{#6}}
@@ -819,6 +1086,23 @@
\VECTORNORM(#1){\cctr@tempa}
\DIVIDE{1}{\cctr@tempa}{\cctr@tempa}
\SCALARVECTORPRODUCT{\cctr@tempa}(#1)(#2)\@OUTPUTVECTOR(#2)}
+\def\TWOVECTORSANGLE(#1)(#2)#3{%
+ \begingroup
+ \VECTORNORM(#1){\cctr@tempa}
+ \VECTORNORM(#2){\cctr@tempb}
+ \SCALARPRODUCT(#1)(#2){\cctr@tempc}
+ \ifdim \cctr@tempa\p@ =\z@
+ \let#3\undefined
+ \cctr@Warnnoangle(#1)(#2)
+ \else
+ \ifdim \cctr@tempb\p@ =\z@
+ \let#3\undefined
+ \cctr@Warnnoangle(#1)(#2)
+ \else
+ \DIVIDE{\cctr@tempc}{\cctr@tempa}{\cctr@tempc}
+ \DIVIDE{\cctr@tempc}{\cctr@tempb}{\cctr@tempc}
+ \ARCCOS{\cctr@tempc}{#3}
+ \fi\fi\@OUTPUTSOL{#3}}
\def\@TDMATRIXCOPY(#1,#2,#3;#4,#5,#6;#7,#8,#9){%
\COPY{#1}{\cctr@solAA}
\COPY{#2}{\cctr@solAB}
@@ -1207,6 +1491,6 @@
\def\numberSQRTFIVE{2.23607}
\def\numberCOSXLV{0.70711}
\def\numberCOSXXX{0.86603}
-%%
+\endinput
%%
%% End of file `calculator.sty'.
diff --git a/Master/texmf-dist/tex/latex/calculator/calculus.sty b/Master/texmf-dist/tex/latex/calculator/calculus.sty
index c90dabece8a..86010b080af 100644
--- a/Master/texmf-dist/tex/latex/calculator/calculus.sty
+++ b/Master/texmf-dist/tex/latex/calculator/calculus.sty
@@ -5,21 +5,27 @@
%% The original source files were:
%%
%% calculator.dtx (with options: `calculus')
-%% ------------------------------------------------------------------
-%% The calculator and calculus packages
-%% Copyright (C) 2012 by Robert Fuster <rfuster@mat.upv.es>
-%% All rights reserved
+%% This is a generated file.
%%
-%% This file may be distributed and/or modified under the
-%% conditions of the LaTeX Project Public License, either version 1.3
-%% of this license or (at your option) any later version.
-%% The latest version of this license is in:
+%% This work may be distributed and/or modified under the conditions of
+%% the LaTeX Project Public License, either version 1.3 of this license
+%% or (at your option) any later version. The latest version of this
+%% license is in:
%%
-%% http://www.latex-project.org/lppl.txt
+%% http://www.latex-project.org/lppl.txt
%%
%% and version 1.3 or later is part of all distributions of LaTeX
-%% version 1999/12/01 or later.
-%% ------------------------------------------------------------------
+%% version 2005/12/01 or later.
+%%
+%% This work has the LPPL maintenance status `maintained'.
+%%
+%% The Current Maintainer of this work is Robert Fuster
+%%
+%% This work consists of the files calculator.dtx and calculator.ins
+%% and the derived files calculator.sty, calculus.ins, and several
+%% calculator<nn>.tex derived files.
+%%
+%%
%% \CharacterTable
%% {Upper-case \A\B\C\D\E\F\G\H\I\J\K\L\M\N\O\P\Q\R\S\T\U\V\W\X\Y\Z
%% Lower-case \a\b\c\d\e\f\g\h\i\j\k\l\m\n\o\p\q\r\s\t\u\v\w\x\y\z
@@ -39,9 +45,9 @@
+
\NeedsTeXFormat{LaTeX2e}
-\ProvidesPackage{calculus}
- [2012/06/10 v.1.0a]
+\ProvidesPackage{calculus}[2014/02/20 v.2.0]
\RequirePackage{calculator}
\def\ccls@ErrorFuncDef#1{%
\PackageError{calculus}%
@@ -320,6 +326,50 @@
\newfunction{\HEAVISIDEfunction}{%
\ifdim \t\p@<\z@ \COPY{0}{\y}\else\COPY{1}{\y}\fi
\COPY{0}{\Dy}}
+\newfunction{\ARCSINfunction}{%
+ \ARCSIN{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+\newfunction{\ARCCOSfunction}{%
+ \ARCCOS{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{-1}{\Dy}{\Dy}}
+\newfunction{\ARCTANfunction}{%
+ \ARCTAN{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
+\newfunction{\ARCCOTfunction}{%
+ \ARCCOT{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \DIVIDE{-1}{\yy}{\Dy}}
+\newfunction{\ARSINHfunction}{%
+ \ARSINH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \ADD{1}{\yy}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+\newfunction{\ARCOSHfunction}{%
+ \ARCOSH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{\yy}{1}{\yy}
+ \SQRT{\yy}{\Dy}
+ \DIVIDE{1}{\Dy}{\Dy}}
+\newfunction{\ARTANHfunction}{%
+ \ARTANH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
+\newfunction{\ARCOTHfunction}{%
+ \ARCOTH{\t}{\y}
+ \SQUARE{\t}{\yy}
+ \SUBTRACT{1}{\yy}{\yy}
+ \DIVIDE{1}{\yy}{\Dy}}
\def\CONSTANTfunction#1#2{%
\def#2##1##2##3{%
\xdef##2{#1}%
@@ -433,6 +483,6 @@
#1{##1}{##2}{##3}
#2{##1}{##4}{##5}}}
\let\VECTORfunction\PARAMETRICfunction
-%%
+\endinput
%%
%% End of file `calculus.sty'.