Commit 808fed73 authored by Liam M. Healy's avatar Liam M. Healy
Browse files

Document changes to systems of units

parent 67cea885
No preview for this file type
......@@ -1225,7 +1225,6 @@ NIL
@include include/class-antik-physical-quantity.texinfo
@include include/fun-antik-check-dimension.texinfo
@include include/fun-antik-make-pq.texinfo
@include include/fun-antik-new-units.texinfo
@include include/fun-antik-pqval.texinfo
@include include/macro-antik-with-pq.texinfo
@include include/var-antik-star-zero-is-dimensionless-star.texinfo
......@@ -1299,19 +1298,19 @@ ANTIK-USER> #_3_m
#_9.842519685039370d0_ft
@end example
A new system of units may be defined with @code{define-sysunits}. One need not define all physical dimensions, but if a unit is needed for a particular dimension and it's not defined, an error will be signalled. For convenience, a system of units may be defined by alteration of an existing system of units. For example, suppose that you wish to have a system of units that is like SI except that lengths are measured in km instead of meters. This will define such a system:
A new system of units may be defined with @code{define-system-of-units}. One need not define all physical dimensions, but if a unit is needed for a particular dimension and it's not defined, an error will be signalled. For convenience, a system of units may be defined by alteration of an existing system of units. For example, suppose that you wish to have a system of units that is like SI except that lengths are measured in km instead of meters. This will define such a system:
@example
(define-sysunits *kmu* (km) *siu* "Kilometer system.")
(define-system-of-units *kmu* (km) *siu* "Kilometer system.")
@end example
To set the default system of units, use @code{set-default-sysunits}. To define a symbol macro to set a default system of units, use @code{setsys}. The SI system is the initial default system of units. It may be reset as the system of units with the symbol macro @code{si}.
To set the default system of units, use @code{set-default-system-of-units}. To define a symbol macro to set a default system of units, use @code{make-set-system-of-units-symbol}. The SI system is the initial default system of units. It may be reset as the system of units with the symbol macro @code{si}.
For formatted output of angles, the units (degrees or radians) may be set with the nf option @code{:degrees}, so the system of units may be maintained whether degrees or radians are desired on output.
@include include/macro-antik-define-sysunits.texinfo
@include include/fun-antik-set-default-sysunits.texinfo
@include include/macro-antik-setsys.texinfo
@include include/var-antik-star-system-of-units-star.texinfo
@include include/macro-antik-define-system-of-units.texinfo
@include include/fun-antik-set-default-system-of-units.texinfo
@include include/macro-antik-make-set-system-of-units-symbol.texinfo
@include include/macro-antik-with-si-units.texinfo
@include include/macro-antik-with-system-of-units.texinfo
@include include/macro-antik-with-system-of-units-star.texinfo
@include include/var-antik-star-siu-star.texinfo
@include include/var-antik-star-englishu-star.texinfo
@include include/var-antik-star-cgsu-star.texinfo
......
......@@ -36,42 +36,42 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Three-Dimensional-Space.html#Three-Dime
<h3 class="section">8.1 Cartesian</h3>
<p><a name="index-Cartesian-space-406"></a><a name="index-Functions_002c-Cartesian-space-407"></a>
<p><a name="index-Cartesian-space-410"></a><a name="index-Functions_002c-Cartesian-space-411"></a>
<div class="defun">
&mdash; Function: <b>antik:coordinate-unit-vector</b><var> i &amp;optional length<a name="index-antik_003acoordinate_002dunit_002dvector-408"></a></var><br>
<blockquote><p><a name="index-antik_003acoordinate_002dunit_002dvector-409"></a>A coordinate unit vector.
&mdash; Function: <b>antik:coordinate-unit-vector</b><var> i &amp;optional length<a name="index-antik_003acoordinate_002dunit_002dvector-412"></a></var><br>
<blockquote><p><a name="index-antik_003acoordinate_002dunit_002dvector-413"></a>A coordinate unit vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:coplanar</b><var> vect1-or-matrix &amp;optional vect2 vect3<a name="index-antik_003acoplanar-410"></a></var><br>
<blockquote><p><a name="index-antik_003acoplanar-411"></a>The sine of the angle between vect1 and the cross product
of vect2 and vect3. This should be near zero.
&mdash; Function: <b>antik:coplanar</b><var> vect1-or-matrix &amp;optional vect2 vect3<a name="index-antik_003acoplanar-414"></a></var><br>
<blockquote><p><a name="index-antik_003acoplanar-415"></a>The cosine of the angle between vect1 and the cross product of vect2 and vect3.
This should be near zero if the vectors are coplanar.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:distance</b><var> a b<a name="index-antik_003adistance-412"></a></var><br>
<blockquote><p><a name="index-antik_003adistance-413"></a>The length of the vector and the vector difference a-b.
&mdash; Function: <b>antik:distance</b><var> a b &amp;optional combination-function<a name="index-antik_003adistance-416"></a></var><br>
<blockquote><p><a name="index-antik_003adistance-417"></a>The length of the vector and the vector difference a-b.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:first-3vector</b><var> vec<a name="index-antik_003afirst_002d3vector-414"></a></var><br>
<blockquote><p><a name="index-antik_003afirst_002d3vector-415"></a>Extract the first 3-vector.
&mdash; Function: <b>antik:first-3vector</b><var> vec<a name="index-antik_003afirst_002d3vector-418"></a></var><br>
<blockquote><p><a name="index-antik_003afirst_002d3vector-419"></a>Extract the first 3-vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:right-angle</b><var> vector<a name="index-antik_003aright_002dangle-416"></a></var><br>
<blockquote><p><a name="index-antik_003aright_002dangle-417"></a>Find an arbitrary right angle to the vector.
&mdash; Function: <b>antik:right-angle</b><var> vector<a name="index-antik_003aright_002dangle-420"></a></var><br>
<blockquote><p><a name="index-antik_003aright_002dangle-421"></a>Find an arbitrary right angle to the vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:second-3vector</b><var> vec<a name="index-antik_003asecond_002d3vector-418"></a></var><br>
<blockquote><p><a name="index-antik_003asecond_002d3vector-419"></a>Extract the second 3-vector.
&mdash; Function: <b>antik:second-3vector</b><var> vec<a name="index-antik_003asecond_002d3vector-422"></a></var><br>
<blockquote><p><a name="index-antik_003asecond_002d3vector-423"></a>Extract the second 3-vector.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:vector-angle</b><var> a b<a name="index-antik_003avector_002dangle-420"></a></var><br>
<blockquote><p><a name="index-antik_003avector_002dangle-421"></a>The short angle between a and b, and the rotation vector.
&mdash; Function: <b>antik:vector-angle</b><var> a b<a name="index-antik_003avector_002dangle-424"></a></var><br>
<blockquote><p><a name="index-antik_003avector_002dangle-425"></a>The short angle between a and b, and the rotation vector.
</p></blockquote></div>
</body></html>
......
......@@ -55,6 +55,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Mathematics.html#Mathematics">Mathemati
<blockquote><p><a name="index-antik_003ahandling_002dcomplex_002dnumber-80"></a>A handler to make the complex number.
</p></blockquote></div>
<!-- This needs node information -->
<h3 class="section">2.3 Iterate generalized numbers</h3>
<p>Extensions to the <a href="http://common-lisp.net/project/iterate/"><samp><span class="command">iterate</span></samp></a>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">12 Copying</h2>
<p><a name="index-Copying-Antik-software-466"></a>All code and documentation in this collection is copyright as indicated
<p><a name="index-Copying-Antik-software-470"></a>All code and documentation in this collection is copyright as indicated
at the top of this document. It may be copied under the
<a href="http://www.gnu.org/licenses/gpl.html">GPL v3</a>.
......
......@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-Quantities.html#Physical-Quant
<h3 class="section">5.5 Date and time</h3>
<p><a name="index-Class_002c-date-and-time-352"></a><a name="index-Date-353"></a><a name="index-Time-_0028of-day_0029-354"></a><a name="index-Date-and-time_002c-creating-355"></a><a name="index-Reader-macro_002c-date-and-time-356"></a><a name="index-ISO8601-357"></a><a name="index-UTC-_0028coordinated-universal-time_0029-358"></a><a name="index-TAI-_0028atomic-time_0029-359"></a><a name="index-Coordinated-Universal-Time-_0028UTC_0029-360"></a><a name="index-International-Atomic-Time-_0028TAI_0029-361"></a><a name="index-UT1-362"></a><a name="index-Astronomical-time-_0028UT1_0029-363"></a><a name="index-Timezones-364"></a>Dates and times can be represented in Antik with the <code>timepoint</code> class. A timepoint is a specific point in Newtonian time, so includes a date and time, and a <dfn>timescale</dfn> (best thought of as a timezone). Timepoints are most conveniently made with the <dfn>#d</dfn> reader macro; the default timescale is <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>, and the standard format for specification of timepoints is
<p><a name="index-Class_002c-date-and-time-356"></a><a name="index-Date-357"></a><a name="index-Time-_0028of-day_0029-358"></a><a name="index-Date-and-time_002c-creating-359"></a><a name="index-Reader-macro_002c-date-and-time-360"></a><a name="index-ISO8601-361"></a><a name="index-UTC-_0028coordinated-universal-time_0029-362"></a><a name="index-TAI-_0028atomic-time_0029-363"></a><a name="index-Coordinated-Universal-Time-_0028UTC_0029-364"></a><a name="index-International-Atomic-Time-_0028TAI_0029-365"></a><a name="index-UT1-366"></a><a name="index-Astronomical-time-_0028UT1_0029-367"></a><a name="index-Timezones-368"></a>Dates and times can be represented in Antik with the <code>timepoint</code> class. A timepoint is a specific point in Newtonian time, so includes a date and time, and a <dfn>timescale</dfn> (best thought of as a timezone). Timepoints are most conveniently made with the <dfn>#d</dfn> reader macro; the default timescale is <a href="http://en.wikipedia.org/wiki/Coordinated_Universal_Time">UTC</a>, and the standard format for specification of timepoints is
<a href="http://en.wikipedia.org/wiki/ISO_8601">ISO 8601</a>
<pre class="example"> ANTIK-USER&gt; #d2011-08-04T12:00
2011-08-04 12:00:00.000
......@@ -65,36 +65,36 @@ In order to convert to and from UT1, it is necessary to obtain earth orientation
<p>Dates are output in ISO8601 format. The function <code>write-us-date</code> can be used to format in US style.
<div class="defun">
&mdash; Class: <b>antik:timepoint</b><var><a name="index-antik_003atimepoint-365"></a></var><br>
<blockquote><p><a name="index-antik_003atimepoint-366"></a>Class precedence list: <code>timepoint, dtspec, standard-object, t</code>
&mdash; Class: <b>antik:timepoint</b><var><a name="index-antik_003atimepoint-369"></a></var><br>
<blockquote><p><a name="index-antik_003atimepoint-370"></a>Class precedence list: <code>timepoint, dtspec, standard-object, t</code>
<p>Specification of a point in time, including a scale.
</p></blockquote></div>
<div class="defun">
&mdash; Variable: <b>antik:*real-ut1-utc*</b><var><a name="index-antik_003a_002areal_002dut1_002dutc_002a-367"></a></var><br>
<blockquote><p><a name="index-antik_003a_002areal_002dut1_002dutc_002a-368"></a>If <code>nil</code>, <code>ut1</code> will be taken the same as <code>utc</code>.
&mdash; Variable: <b>antik:*real-ut1-utc*</b><var><a name="index-antik_003a_002areal_002dut1_002dutc_002a-371"></a></var><br>
<blockquote><p><a name="index-antik_003a_002areal_002dut1_002dutc_002a-372"></a>If <code>nil</code>, <code>ut1</code> will be taken the same as <code>utc</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-time</b><var> string<a name="index-antik_003aread_002dtime-369"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtime-370"></a>Parse the datime or time interval string and create a timepoint object.
&mdash; Function: <b>antik:read-time</b><var> string<a name="index-antik_003aread_002dtime-373"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtime-374"></a>Parse the datime or time interval string and create a timepoint object.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-timepoint</b><var> string &amp;optional pos-ymdhms scale<a name="index-antik_003aread_002dtimepoint-371"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtimepoint-372"></a>Read a timepoint from a string with specification for the position in the string of each component; pos-ymdhms is a list of year, month, day, hour, minute, and second as sequence numbers for the integers in the string. Scale is the timescale (zone) as a string or symbol. If pos-ymdhms has only three components, or only a date is provided, the timepoint created will be specifed as day-only. The default reads an <code>iso8601</code> string like <code>1999-03-30t12:33:45</code>.
&mdash; Function: <b>antik:read-timepoint</b><var> string &amp;optional pos-ymdhms scale<a name="index-antik_003aread_002dtimepoint-375"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dtimepoint-376"></a>Read a timepoint from a string with specification for the position in the string of each component; pos-ymdhms is a list of year, month, day, hour, minute, and second as sequence numbers for the integers in the string. Scale is the timescale (zone) as a string or symbol. If pos-ymdhms has only three components, or only a date is provided, the timepoint created will be specifed as day-only. The default reads an <code>iso8601</code> string like <code>1999-03-30t12:33:45</code>.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:read-us-date</b><var> string &amp;optional day-only<a name="index-antik_003aread_002dus_002ddate-373"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dus_002ddate-374"></a>Read dates and times in customary <code>us</code> format MM/DD/YYYY; times may
&mdash; Function: <b>antik:read-us-date</b><var> string &amp;optional day-only<a name="index-antik_003aread_002dus_002ddate-377"></a></var><br>
<blockquote><p><a name="index-antik_003aread_002dus_002ddate-378"></a>Read dates and times in customary <code>us</code> format MM/DD/YYYY; times may
be included as well if day-only is nil.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:write-us-date</b><var> datime<a name="index-antik_003awrite_002dus_002ddate-375"></a></var><br>
<blockquote><p><a name="index-antik_003awrite_002dus_002ddate-376"></a>Write dates and times in customary <code>us</code> format MM/DD/YYYY.
&mdash; Function: <b>antik:write-us-date</b><var> datime<a name="index-antik_003awrite_002dus_002ddate-379"></a></var><br>
<blockquote><p><a name="index-antik_003awrite_002dus_002ddate-380"></a>Write dates and times in customary <code>us</code> format MM/DD/YYYY.
</p></blockquote></div>
</body></html>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">11 Download and installation</h2>
<p><a name="index-Installation-of-Antik-463"></a><a name="index-Download-of-Antik-464"></a><a name="index-Dependencies-of-Antik-on-external-libraries-465"></a>The recommended way to download and install this software is through
<p><a name="index-Installation-of-Antik-467"></a><a name="index-Download-of-Antik-468"></a><a name="index-Dependencies-of-Antik-on-external-libraries-469"></a>The recommended way to download and install this software is through
<a href="http://www.quicklisp.org/">quicklisp</a>. Install quicklisp following
the directions, then do one of:
<pre class="example"> (ql:quickload "antik")
......
......@@ -36,7 +36,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Internals.html#Internals">Internals</a>
<h3 class="section">10.1 Foreign Library Kit</h3>
<p><a name="index-Foreign-array-metadata-462"></a>Antik is designed with the idea that scientific and engineering libraries, particularly foreign (non-Lisp) libraries, can easily be integrated, so that data can be exchanged with and among the libraries. Function and other definitions, when duplicated, will be named the same, differing only in the package. For example, if libraries &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and &lsquo;<samp><span class="samp">bar</span></samp>&rsquo; both define a singular value decomposition (SVD), they would use the function names <code>foo:sv-decomposition</code> and <code>bar:sv-decomposition</code>, and the arguments would be as similar as possible. Then a user may call either one on a matrix (two-dimensional) grid, and compare results.
<p><a name="index-Foreign-array-metadata-466"></a>Antik is designed with the idea that scientific and engineering libraries, particularly foreign (non-Lisp) libraries, can easily be integrated, so that data can be exchanged with and among the libraries. Function and other definitions, when duplicated, will be named the same, differing only in the package. For example, if libraries &lsquo;<samp><span class="samp">foo</span></samp>&rsquo; and &lsquo;<samp><span class="samp">bar</span></samp>&rsquo; both define a singular value decomposition (SVD), they would use the function names <code>foo:sv-decomposition</code> and <code>bar:sv-decomposition</code>, and the arguments would be as similar as possible. Then a user may call either one on a matrix (two-dimensional) grid, and compare results.
<p>To facilitate the exchange of foreign arrays, the class <code>grid:foreign-array</code> has a slot <code>grid::foreign-metadata</code>. The interface code for a foreign library can save information there as a plist that the library needs in order to use the array, such as the dimensions.
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">9 Higher</h2>
<p><a name="index-GSLL-443"></a><a name="index-Higher-mathematics-using-external-libraries-444"></a>These functions provide a more straightforward interface to foreign libraries like <a href="http://common-lisp.net/project/gsll/">GSLL</a>. For example, GSLL supplies several functions to invert a matrix, but the function defined here <code>invert-matrix</code> uses LU decomposition with all the necessary preparation.
<p><a name="index-GSLL-447"></a><a name="index-Higher-mathematics-using-external-libraries-448"></a>These functions provide a more straightforward interface to foreign libraries like <a href="http://common-lisp.net/project/gsll/">GSLL</a>. For example, GSLL supplies several functions to invert a matrix, but the function defined here <code>invert-matrix</code> uses LU decomposition with all the necessary preparation.
<ul class="menu">
<li><a accesskey="1" href="Linear-Algebra.html#Linear-Algebra">Linear Algebra</a>
......
This diff is collapsed.
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">10 Internals</h2>
<p><a name="index-Internals-of-Antik-461"></a>This chapter describes some of the designs used internally, for the benefit of those who wish to port libraries to use some of the definitions in Antik, or those who are merely curious. If you wish to simply use Antik, you can skip this chapter.
<p><a name="index-Internals-of-Antik-465"></a>This chapter describes some of the designs used internally, for the benefit of those who wish to port libraries to use some of the definitions in Antik, or those who are merely curious. If you wish to simply use Antik, you can skip this chapter.
<ul class="menu">
<li><a accesskey="1" href="Foreign-Library-Kit.html#Foreign-Library-Kit">Foreign Library Kit</a>
......
......@@ -36,16 +36,16 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Higher.html#Higher">Higher</a>
<h3 class="section">9.1 Linear Algebra</h3>
<p><a name="index-Linear-Algebra-445"></a><a name="index-GSLL-446"></a><a name="index-Functions_002c-linear-algebra-447"></a>These functions require that <a href="http://common-lisp.net/project/gsll/">GSLL</a> be loaded.
<p><a name="index-Linear-Algebra-449"></a><a name="index-GSLL-450"></a><a name="index-Functions_002c-linear-algebra-451"></a>These functions require that <a href="http://common-lisp.net/project/gsll/">GSLL</a> be loaded.
<div class="defun">
&mdash; Function: <b>antik:determinant</b><var> matrix<a name="index-antik_003adeterminant-448"></a></var><br>
<blockquote><p><a name="index-antik_003adeterminant-449"></a>Find the determinant of the matrix.
&mdash; Function: <b>antik:determinant</b><var> matrix<a name="index-antik_003adeterminant-452"></a></var><br>
<blockquote><p><a name="index-antik_003adeterminant-453"></a>Find the determinant of the matrix.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:invert-matrix</b><var> matrix<a name="index-antik_003ainvert_002dmatrix-450"></a></var><br>
<blockquote><p><a name="index-antik_003ainvert_002dmatrix-451"></a>Invert the matrix; return the inverse and determinant.
&mdash; Function: <b>antik:invert-matrix</b><var> matrix<a name="index-antik_003ainvert_002dmatrix-454"></a></var><br>
<blockquote><p><a name="index-antik_003ainvert_002dmatrix-455"></a>Invert the matrix; return the inverse and determinant.
</p></blockquote></div>
</body></html>
......
......@@ -73,13 +73,12 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-dimension.html#Physical-dimens
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:make-pq</b><var> magnitude unit-expression &amp;optional sysunits scalar-dimension<a name="index-antik_003amake_002dpq-326"></a></var><br>
&mdash; Function: <b>antik:make-pq</b><var> magnitude unit-expression &amp;optional scalar-dimension<a name="index-antik_003amake_002dpq-326"></a></var><br>
<blockquote><p><a name="index-antik_003amake_002dpq-327"></a>Make a physical dimension quantity (PDQ). Allow for the
possiblity that magnitude is already a <code>pdq</code>; in this case, check
that the physical dimension is correct, and pass it on. This can
be used as a way of assigning default units to a number. If
sysunits is specified, unitless dimensions (e.g., 'length) are
interpeted as units in that system. If scalar-dimension is <code>t</code> and
be used as a way of assigning default units to a number. Unitless dimensions (e.g., 'length) are
interpeted as units in the :system-of-units. If scalar-dimension is <code>t</code> and
magnitude is not a scalar, the unit-expression applies to each
element of the magnitude. Otherwise it must be a grid or list of
the shape as the magnitude.
......@@ -92,13 +91,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-dimension.html#Physical-dimens
</p></blockquote></div>
<div class="defun">
&mdash; Generic Function: <b>antik:pqval</b><var> pq &amp;rest sysunits-additional-units<a name="index-antik_003apqval-330"></a></var><br>
&mdash; Generic Function: <b>antik:pqval</b><var> pq<a name="index-antik_003apqval-330"></a></var><br>
<blockquote><p><a name="index-antik_003apqval-331"></a>Get the numerical value and the units of the physical dimension quantity. Returns the magnitude, the units, and whether units are the same for each element of a sequence or grid.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>antik:with-pq</b><var> physical-quantities &amp;body body<a name="index-antik_003awith_002dpq-332"></a></var><br>
<blockquote><p><a name="index-antik_003awith_002dpq-333"></a>Ensure that the named physical dimension quantities are of the right dimensions, or convert them from plain numbers using the current system of units as specified by *system-of-units*.
<blockquote><p><a name="index-antik_003awith_002dpq-333"></a>Ensure that the named physical dimension quantities are of the right dimensions, or convert them from plain numbers using the current system of units as specified by (nf-option :system-of-units).
</p></blockquote></div>
<div class="defun">
......
......@@ -38,13 +38,13 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<p>This module has definitions for mathematical utilities.
<div class="defun">
&mdash; Function: <b>antik:angle-law-of-cosines</b><var> length-opp length-adj1 length-adj2<a name="index-antik_003aangle_002dlaw_002dof_002dcosines-402"></a></var><br>
<blockquote><p><a name="index-antik_003aangle_002dlaw_002dof_002dcosines-403"></a>Solve for the angle when lengths of a triangle are known.
&mdash; Function: <b>antik:angle-law-of-cosines</b><var> length-opp length-adj1 length-adj2<a name="index-antik_003aangle_002dlaw_002dof_002dcosines-406"></a></var><br>
<blockquote><p><a name="index-antik_003aangle_002dlaw_002dof_002dcosines-407"></a>Solve for the angle when lengths of a triangle are known.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:prime-factors</b><var> n<a name="index-antik_003aprime_002dfactors-404"></a></var><br>
<blockquote><p><a name="index-antik_003aprime_002dfactors-405"></a>Find the prime factors of the integer n.
&mdash; Function: <b>antik:prime-factors</b><var> n<a name="index-antik_003aprime_002dfactors-408"></a></var><br>
<blockquote><p><a name="index-antik_003aprime_002dfactors-409"></a>Find the prime factors of the integer n.
</p></blockquote></div>
</body></html>
......
......@@ -35,7 +35,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<h2 class="chapter">6 Numerical Output Format</h2>
<p><a name="index-Formatting-381"></a><a name="index-Significant-figures-382"></a><a name="index-Grid_002c-formatting-383"></a><a name="index-Physical-dimension-quantities_002c-formatting-384"></a><a name="index-Number_002c-formatting-385"></a><a name="index-NF_002c-table-of-options-386"></a>The function <code>nf</code> is provided to format numbers according to specific criteria set as parameters in the <code>:nf</code> category (see <a href="Parameters.html#Parameters">Parameters</a>). There is precise control over the number of digits printed, how grids are printed, etc. To show all parameters available, evaluate <code>(parameter-help :nf)</code>; to get information about each one, <code>(parameter-help :nf </code><var>name</var><code>)</code>.
<p><a name="index-Formatting-385"></a><a name="index-Significant-figures-386"></a><a name="index-Grid_002c-formatting-387"></a><a name="index-Physical-dimension-quantities_002c-formatting-388"></a><a name="index-Number_002c-formatting-389"></a><a name="index-NF_002c-table-of-options-390"></a>The function <code>nf</code> is provided to format numbers according to specific criteria set as parameters in the <code>:nf</code> category (see <a href="Parameters.html#Parameters">Parameters</a>). There is precise control over the number of digits printed, how grids are printed, etc. To show all parameters available, evaluate <code>(parameter-help :nf)</code>; to get information about each one, <code>(parameter-help :nf </code><var>name</var><code>)</code>.
<p><table summary=""><tr align="left"><th valign="top" width="15%">Parameter </th><th valign="top" width="15%">Values </th><th valign="top" width="70%">Description
<br></th></tr><tr align="left"><td valign="top" width="15%"><code>components</code> </td><td valign="top" width="15%">list of strings
......@@ -83,43 +83,43 @@ Up:&nbsp;<a rel="up" accesskey="u" href="index.html#Top">Top</a>
<br></td></tr></table>
<div class="defun">
&mdash; Generic Function: <b>antik:nf</b><var> object &amp;optional stream<a name="index-antik_003anf-387"></a></var><br>
<blockquote><p><a name="index-antik_003anf-388"></a>Format output for numerical objects. If stream is nil, use *standard-output*.
&mdash; Generic Function: <b>antik:nf</b><var> object &amp;optional stream<a name="index-antik_003anf-391"></a></var><br>
<blockquote><p><a name="index-antik_003anf-392"></a>Format output for numerical objects. If stream is nil, use *standard-output*.
</p></blockquote></div>
<div class="defun">
&mdash; Method: <b>antik:nf</b> (<var>object float</var>)<var> &amp;optional </var>(<var>stream *standard-output*</var>)<var><a name="index-antik_003anf-389"></a></var><br>
&mdash; Method: <b>antik:nf</b> (<var>object float</var>)<var> &amp;optional </var>(<var>stream *standard-output*</var>)<var><a name="index-antik_003anf-393"></a></var><br>
<blockquote><p>Returns two values: the string and prints-as-zero.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>antik:nf-option</b><var> name<a name="index-antik_003anf_002doption-390"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002doption-391"></a>Get/set the nf option named.
&mdash; Macro: <b>antik:nf-option</b><var> name<a name="index-antik_003anf_002doption-394"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002doption-395"></a>Get/set the nf option named.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:nf-readably</b><var><a name="index-antik_003anf_002dreadably-392"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002dreadably-393"></a>The format produced will be readable to Lisp.
&mdash; Function: <b>antik:nf-readably</b><var><a name="index-antik_003anf_002dreadably-396"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002dreadably-397"></a>The format produced will be readable to Lisp.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:nf-string</b><var> object<a name="index-antik_003anf_002dstring-394"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002dstring-395"></a>Format output for numerical objects to a new string.
&mdash; Function: <b>antik:nf-string</b><var> object<a name="index-antik_003anf_002dstring-398"></a></var><br>
<blockquote><p><a name="index-antik_003anf_002dstring-399"></a>Format output for numerical objects to a new string.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>antik:set-nf-options</b><var> &amp;rest name-values<a name="index-antik_003aset_002dnf_002doptions-396"></a></var><br>
<blockquote><p><a name="index-antik_003aset_002dnf_002doptions-397"></a>Set the numerical formatting options.
&mdash; Macro: <b>antik:set-nf-options</b><var> &amp;rest name-values<a name="index-antik_003aset_002dnf_002doptions-400"></a></var><br>
<blockquote><p><a name="index-antik_003aset_002dnf_002doptions-401"></a>Set the numerical formatting options.
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>antik:with-nf-options</b> (<var>&amp;rest name-values</var>)<var> &amp;body body<a name="index-antik_003awith_002dnf_002doptions-398"></a></var><br>
<blockquote><p><a name="index-antik_003awith_002dnf_002doptions-399"></a>Set the options for all nf calls within body to inherit.
&mdash; Macro: <b>antik:with-nf-options</b> (<var>&amp;rest name-values</var>)<var> &amp;body body<a name="index-antik_003awith_002dnf_002doptions-402"></a></var><br>
<blockquote><p><a name="index-antik_003awith_002dnf_002doptions-403"></a>Set the options for all nf calls within body to inherit.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:object-as-nf</b><var> object<a name="index-antik_003aobject_002das_002dnf-400"></a></var><br>
<blockquote><p><a name="index-antik_003aobject_002das_002dnf-401"></a>Define a new object exactly as the current nf options print an existing one. This function can be used for example to define a number exactly as the rounded print format of another one.
&mdash; Function: <b>antik:object-as-nf</b><var> object<a name="index-antik_003aobject_002das_002dnf-404"></a></var><br>
<blockquote><p><a name="index-antik_003aobject_002das_002dnf-405"></a>Define a new object exactly as the current nf options print an existing one. This function can be used for example to define a number exactly as the rounded print format of another one.
</p></blockquote></div>
</body></html>
......
......@@ -34,25 +34,25 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Higher.html#Higher">Higher</a>
<h3 class="section">9.2 Optimization</h3>
<p><a name="index-Mathematical-optimization-452"></a><a name="index-Optimization_002c-mathematical-453"></a><a name="index-Functions_002c-mathematical-optimization-454"></a>These functions require that GSLL be loaded.
<p><a name="index-Mathematical-optimization-456"></a><a name="index-Optimization_002c-mathematical-457"></a><a name="index-Functions_002c-mathematical-optimization-458"></a>These functions require that GSLL be loaded.
<div class="defun">
&mdash; Function: <b>antik:maximize-1d</b><var> function x-lower x-upper &amp;optional x-maximum absolute-error relative-error method<a name="index-antik_003amaximize_002d1d-455"></a></var><br>
<blockquote><p><a name="index-antik_003amaximize_002d1d-456"></a>Find the maximum of the function of one variable (x) between x-lower
&mdash; Function: <b>antik:maximize-1d</b><var> function x-lower x-upper &amp;optional x-maximum absolute-error relative-error method<a name="index-antik_003amaximize_002d1d-459"></a></var><br>
<blockquote><p><a name="index-antik_003amaximize_002d1d-460"></a>Find the maximum of the function of one variable (x) between x-lower
and x-upper. The optional argument x-maximum is a guess of x for the
maximum value of the function. Returns the argument and value at the maximum.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:minimize-1d</b><var> function x-lower x-upper &amp;optional x-minimum absolute-error relative-error method<a name="index-antik_003aminimize_002d1d-457"></a></var><br>
<blockquote><p><a name="index-antik_003aminimize_002d1d-458"></a>Find the minimum of the function of one variable (x) between x-lower
&mdash; Function: <b>antik:minimize-1d</b><var> function x-lower x-upper &amp;optional x-minimum absolute-error relative-error method<a name="index-antik_003aminimize_002d1d-461"></a></var><br>
<blockquote><p><a name="index-antik_003aminimize_002d1d-462"></a>Find the minimum of the function of one variable (x) between x-lower
and x-upper. The optional argument x-minimum is a guess of x for the
minimum value of the function. Returns the argument and value at the minimum.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:root-1d</b><var> function initial derivative &amp;optional absolute-error relative-error method<a name="index-antik_003aroot_002d1d-459"></a></var><br>
<blockquote><p><a name="index-antik_003aroot_002d1d-460"></a>Find the root of a real function of a real variable. Returns the
&mdash; Function: <b>antik:root-1d</b><var> function initial derivative &amp;optional absolute-error relative-error method<a name="index-antik_003aroot_002d1d-463"></a></var><br>
<blockquote><p><a name="index-antik_003aroot_002d1d-464"></a>Find the root of a real function of a real variable. Returns the
argument value of the root and the computed value of the function at
that value. The argument and return values may be physical quantities.
</p></blockquote></div>
......
......@@ -115,7 +115,7 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Organization-of-Computation.html#Organi
</p></blockquote></div>
<div class="defun">
&mdash; Macro: <b>antik:parameter-value</b><var> category name &amp;optional default<a name="index-antik_003aparameter_002dvalue-92"></a></var><br>
&mdash; Macro: <b>antik:parameter-value</b><var> category name<a name="index-antik_003aparameter_002dvalue-92"></a></var><br>
<blockquote><p><a name="index-antik_003aparameter_002dvalue-93"></a>Get or set the parameter value.
</p></blockquote></div>
......
......@@ -46,8 +46,8 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Physical-Quantities.html#Physical-Quant
#_5.105399999999999d0_m
</pre>
<div class="defun">
&mdash; Macro: <b>antik:define-physical-constant</b><var> name value &amp;optional synonyms print-name docstring<a name="index-antik_003adefine_002dphysical_002dconstant-350"></a></var><br>
<blockquote><p><a name="index-antik_003adefine_002dphysical_002dconstant-351"></a>Define the variable to be the physical dimension quantity given, and also make it a unit of measure.
&mdash; Macro: <b>antik:define-physical-constant</b><var> name value &amp;optional synonyms print-name docstring<a name="index-antik_003adefine_002dphysical_002dconstant-354"></a></var><br>
<blockquote><p><a name="index-antik_003adefine_002dphysical_002dconstant-355"></a>Define the variable to be the physical dimension quantity given, and also make it a unit of measure.
</p></blockquote></div>
</body></html>
......
......@@ -36,18 +36,18 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Three-Dimensional-Space.html#Three-Dime
<h3 class="section">8.2 Polar</h3>
<p><a name="index-Polar-coordinates-422"></a><a name="index-Rectangular-coordinates-423"></a><a name="index-Functions_002c-polar_002frectangular-conversion-424"></a>
<p><a name="index-Polar-coordinates-426"></a><a name="index-Rectangular-coordinates-427"></a><a name="index-Functions_002c-polar_002frectangular-conversion-428"></a>
<div class="defun">
&mdash; Function: <b>antik:polar-to-rectangular</b><var> azimuth elevation &amp;optional radius sign1<a name="index-antik_003apolar_002dto_002drectangular-425"></a></var><br>
<blockquote><p><a name="index-antik_003apolar_002dto_002drectangular-426"></a>Convert polar coordinates to rectangular coordinates.
&mdash; Function: <b>antik:polar-to-rectangular</b><var> azimuth elevation &amp;optional radius sign1<a name="index-antik_003apolar_002dto_002drectangular-429"></a></var><br>
<blockquote><p><a name="index-antik_003apolar_002dto_002drectangular-430"></a>Convert polar coordinates to rectangular coordinates.
Argument sign1 should be set to <code>-1</code> for accomodating topocentric azimuth,
which is measured from North instead of South.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:rectangular-to-polar</b><var> vector &amp;optional sign1<a name="index-antik_003arectangular_002dto_002dpolar-427"></a></var><br>
<blockquote><p><a name="index-antik_003arectangular_002dto_002dpolar-428"></a>Convert rectangular coordinates to polar coordinates.
&mdash; Function: <b>antik:rectangular-to-polar</b><var> vector &amp;optional sign1<a name="index-antik_003arectangular_002dto_002dpolar-431"></a></var><br>
<blockquote><p><a name="index-antik_003arectangular_002dto_002dpolar-432"></a>Convert rectangular coordinates to polar coordinates.
Argument sign1 should be set to <code>-1</code> for accomodating topocentric azimuth,
which is measured from North instead of South.
Returns a list of azimuth, elevation, and radius, and the
......
......@@ -34,42 +34,42 @@ Up:&nbsp;<a rel="up" accesskey="u" href="Three-Dimensional-Space.html#Three-Dime
<h3 class="section">8.3 Rotation</h3>
<p><a name="index-Rotation-in-two-and-three-dimensions-429"></a><a name="index-Functions_002c-rotation-430"></a>
<p><a name="index-Rotation-in-two-and-three-dimensions-433"></a><a name="index-Functions_002c-rotation-434"></a>
<div class="defun">
&mdash; Function: <b>antik:euler-angle-rotation</b><var> rot3a rot1 rot3b &amp;optional passive<a name="index-antik_003aeuler_002dangle_002drotation-431"></a></var><br>
<blockquote><p><a name="index-antik_003aeuler_002dangle_002drotation-432"></a>Compute the matrix for a <code>3-1-3</code> rotation. See Curtis (9.118).
&mdash; Function: <b>antik:euler-angle-rotation</b><var> rot3a rot1 rot3b &amp;optional passive<a name="index-antik_003aeuler_002dangle_002drotation-435"></a></var><br>
<blockquote><p><a name="index-antik_003aeuler_002dangle_002drotation-436"></a>Compute the matrix for a <code>3-1-3</code> rotation. See Curtis (9.118).
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:rotate</b><var> angle &amp;optional passive<a name="index-antik_003arotate-433"></a></var><br>
<blockquote><p><a name="index-antik_003arotate-434"></a>Create a rotation matrix in two dimensions.
&mdash; Function: <b>antik:rotate</b><var> angle &amp;optional passive<a name="index-antik_003arotate-437"></a></var><br>
<blockquote><p><a name="index-antik_003arotate-438"></a>Create a rotation matrix in two dimensions.
Passive rotation if passive is true, otherwise active.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:rotate-3d</b><var> axis angle &amp;optional passive<a name="index-antik_003arotate_002d3d-435"></a></var><br>
<blockquote><p><a name="index-antik_003arotate_002d3d-436"></a>Create a rotation matrix about the (0, <code>1</code>, 2)
&mdash; Function: <b>antik:rotate-3d</b><var> axis angle &amp;optional passive<a name="index-antik_003arotate_002d3d-439"></a></var><br>
<blockquote><p><a name="index-antik_003arotate_002d3d-440"></a>Create a rotation matrix about the (0, <code>1</code>, 2)
axis in three dimensions. Passive rotation
if passive is true, otherwise active.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:rotate-3daa</b><var> rotation-axis angle &amp;optional passive<a name="index-antik_003arotate_002d3daa-437"></a></var><br>
<blockquote><p><a name="index-antik_003arotate_002d3daa-438"></a>Rotation about an arbitrary axis in <code>3d</code>.
&mdash; Function: <b>antik:rotate-3daa</b><var> rotation-axis angle &amp;optional passive<a name="index-antik_003arotate_002d3daa-441"></a></var><br>
<blockquote><p><a name="index-antik_003arotate_002d3daa-442"></a>Rotation about an arbitrary axis in <code>3d</code>.
See Goldstein, Poole, Safko (4.62) or
http://mathworld.wolfram.com/RotationFormula.html.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:tait-bryan-angles</b><var> dcm<a name="index-antik_003atait_002dbryan_002dangles-439"></a></var><br>
<blockquote><p><a name="index-antik_003atait_002dbryan_002dangles-440"></a>Find the three angles psi, theta, phi of a <code>3-2-1</code> (Tait-Bryan)
&mdash; Function: <b>antik:tait-bryan-angles</b><var> dcm<a name="index-antik_003atait_002dbryan_002dangles-443"></a></var><br>
<blockquote><p><a name="index-antik_003atait_002dbryan_002dangles-444"></a>Find the three angles psi, theta, phi of a <code>3-2-1</code> (Tait-Bryan)
rotation for the direction cosine matrix.
</p></blockquote></div>
<div class="defun">
&mdash; Function: <b>antik:tait-bryan-rotation</b><var> rot1 rot2 rot3 &amp;optional passive<a name="index-antik_003atait_002dbryan_002drotation-441"></a></var><br>
<blockquote><p><a name="index-antik_003atait_002dbryan_002drotation-442"></a>Compute the matrix for a <code>3-2-1</code> (yaw-pitch-roll) rotation.
&mdash; Function: <b>antik:tait-bryan-rotation</b><var> rot1 rot2 rot3 &amp;optional passive<a name="index-antik_003atait_002dbryan_002drotation-445"></a></var><br>
<blockquote><p><a name="index-antik_003atait_002dbryan_002drotation-446"></a>Compute the matrix for a <code>3-2-1</code> (yaw-pitch-roll) rotation.
See Curtis (9.124). This transforms a vector in the body
frame into a vector in the external frame.
</p></blockquote></div>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment