File: qrfunc05.html

package info (click to toggle)
yorick 2.2.04%2Bdfsg1-12
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye
  • size: 10,012 kB
  • sloc: ansic: 86,757; sh: 1,697; cpp: 1,309; lisp: 1,234; makefile: 1,050; fortran: 19
file content (106 lines) | stat: -rw-r--r-- 5,316 bytes parent folder | download | duplicates (9)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html><head><title>Yorick Reference Card</title>
<link rel="stylesheet" type="text/css" href="../style.css">
<link rel="icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="shortcut icon" href="../images/favicon.ico" type="image/x-icon">
<link rel="stylesheet" type="text/css" href="../skull.css" title="skull">
<!--[if IE 6]>
   <style type="text/css">
   /*<![CDATA[*/ 
body {overflow-y:auto;}
#content { width: 873px; }
#l-bar {display:block; top:0px; left:0px; width:130px; position:absolute; border:0px solid #888; background-color:transparent;background-url:none;}
#searchbox { width:100px; background-color:transparent;}
* html #l-bar {position:absolute;}
html {overflow-x:auto; overflow-y:hidden;}
   /*]]>*/
   </style>
<![endif]-->
</head>

<body>
<div id="l-bar">
<div id="links">
<div class="nav1"><a href="http://yorick.sourceforge.net/index.php">Web Home</a></div>
<div class="nav1"><a href="../README.html">Getting Started</a></div>
<div class="nav1"><a href="../manual/yorick_1.html">Manual</a></div>
<div class="nav1"><a href="./index.html">Quick Reference</a></div>
<div class="nav2"><a href="qrlang00.html">Language Reference</a></div>
<div class="nav2"><a href="qrfunc00.html">Function Reference</a></div>
<div class="nav2"><a href="qrio00.html">I/O Reference</a></div>
</div>
<div id="bottomnav"></div>
</div>
<div id="banner"></div>
<div id="content"><br>

<table border="0" cellpadding="5" cellspacing="0"><tbody>
<tr><td valign="top" width="230"><br>
  <ul>
  <li><A href="./qrlang00.html">Language Reference</A></li>
  <li><A href="./qrfunc00.html">Function Reference</A>
    <ul>
    <li><A href="./qrfunc00.html">Including Source Files</A></li>
    <li><A href="./qrfunc01.html">Comments</A></li>
    <li><A href="./qrfunc02.html">Issuing Shell Commands</A></li>
    <li><A href="./qrfunc03.html">Matrix Multiplication</A></li>
    <li><A href="./qrfunc04.html">Information About Variables</A></li>
    <li><A href="./qrfunc05.html">Elementary Functions</A></li>
    <li><A href="./qrfunc06.html">Advanced Array Indexing</A></li>
    <li><A href="./qrfunc07.html">Index Range Functions</A></li>
    <li><A href="./qrfunc08.html">Logical Functions</A></li>
    <li><A href="./qrfunc09.html">Interpolation and Lookup Functions</A></li>
    <li><A href="./qrfunc10.html">Sorting</A></li>
    <li><A href="./qrfunc11.html">Transposing</A></li>
    <li><A href="./qrfunc12.html">Manipulating Strings</A></li>
    <li><A href="./qrfunc13.html">Generating Simple Meshes</A></li>
    <li><A href="./qrfunc14.html">Using Pointers</A></li>
    <li><A href="./qrfunc15.html">Instancing Data Structures</A></li>
    <li><A href="./qrfunc16.html">Reshaping Arrays</A></li>
    </ul></li>
  <li><A href="./qrio00.html">I/O Reference</A></li>
  </ul>
</td><td valign="top">

<h1>Yorick Function Reference</h1>

<h2>Elementary Functions</h2>
<p><tt>abs, sign&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> absolute value, arithmetic sign
<br><tt>sqrt&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> square root
<br><tt>floor, ceil&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> round down, round up to integer
<br><tt>conj&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> complex conjugation
<br><tt>pi&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> the constant 3.14159265358979323846...
<br><tt>sin, cos, tan&nbsp;&nbsp;&nbsp;&nbsp;</tt> trigonometric functions (of radians)
<br><tt>asin, acos, atan&nbsp;</tt> inverse trigonometric functions
<br><tt>sinh, cosh, tanh, sech, csch&nbsp;</tt> hyperbolic functions
<br><tt>asinh, acosh, atanh&nbsp;</tt> inverse hyperbolic functions
<br><tt>exp, log, log10&nbsp;&nbsp;</tt> exponential and logarithmic functions
<br><tt>min, max&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> find minimum, maximum of array
<br><tt>sum, avg&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> find sum, average of array
<br><tt>random&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</tt> random number generator

</p>
<p>The <tt>atan</tt> function takes one or two arguments; <tt>atan(t)</tt>
returns a value in the range (-<font face="symbol">p</font>/2,<font face="symbol">p</font>/2]),
while <tt>atan(y,x)</tt> returns the counterclockwise angle from (1,0)
to (x,y) in the range (-<font face="symbol">p</font>,<font face="symbol">p</font>]).
</p>
<p>The <tt>abs</tt> function allows any number of arguments; for example,
<tt>abs(x,y,z)</tt> is the same as <tt>sqrt(x^2+y^2+z^2)</tt>. The <tt>sign</tt>
satisfies <tt>sign(0)==1</tt> and <tt>abs(z)*sign(z)==z</tt> always (even
when <tt>z</tt> is <tt>complex</tt>).
</p>
<p>The <tt>min</tt> and <tt>max</tt> functions return a scalar result when
presented with a single argument, but the pointwise minimum or maximum
when presented with multiple arguments.
</p>
<p>The <tt>min</tt>, <tt>max</tt>, <tt>sum</tt>, and single argument <tt>abs</tt>
functions return integer results when presented integer arguments; the
other functions will promote their arguments to a real type and return
reals.
</p>

</td></tr>
</tbody></table>
</div></body>
</html>