source: project/complex/complex.html @ 1463

Last change on this file since 1463 was 1463, checked in by felix winkelmann, 14 years ago

complex fixes

File size: 4.9 KB
Line 
1<html><head><title>Eggs Unlimited - complex</title>
2<style type="text/css">
3  <!--
4      CODE {
5             color: #666666;
6           }
7      EM {
8           font-weight: bold;
9           font-style: normal;
10         }
11      DT.function { 
12                    background: #f5f5f5;
13                    color: black;
14                    padding: 0.1em;
15                    border: 1px solid #bbbaaf;
16                    font-family: monospace;
17                  }
18      PRE {
19        background: #efeee0;
20        padding: 0.1em;
21        border: 1px solid #bbbaaf;
22      }
23    -->
24</style></head>
25<body>
26
27<center><img src="egg.jpg"></center>
28<center><a href="http://www.call-with-current-continuation.org/eggs/index.html">back</a></center>
29
30<h2>complex</h2>
31
32<h3>Description:</h3>
33Support for complex numbers in chicken.
34
35<h3>Author:</h3>
36Thomas Christian Chust
37
38<h3>Version:</h3>
39<ul>
40<li>1.6
41Added <code>regex-case</code> requirement, complex-base.scm didn't disable usual integrations [Thanks to "elf"]
42<li>1.5
43Added missing internal definitions for <code>min</code> and <code>max</code> [Thanks to Arno Peters]
44<li>1.4
45Doesn't give warning when <code>use</code>d in interpreted mode
46<li>1.3
47Changed representation to disjoint record type
48<i1>1.2
49Some checks in <code>log</code> and <code>expt</code>
50<li>1.1
51When used with Chicken 1.71, not special declarations are needed to prevent the compiler from inlining
52redefined standard bindings
53<li>1.0
54</ul>
55
56<h3>Usage:</h3>
57<pre>(require-extension complex)
58</pre>
59
60<h3>Download:</h3>
61<a href="http://www.call-with-current-continuation.org/eggs/complex.egg">complex.egg</a>
62
63<h3>Documentation:</h3>
64
65This library provides new versions of all numeric operations. Specifically, the following standard
66procedures are re-implemented:
67
68<pre>
69abs
70complex? number? real? rational? integer?
71exact? inexact?
72zero?
73positive?
74odd? even?
75= < > <= >=
76max min
77+ - * /
78quotient remainder modulo
79gcd lcm
80floor ceiling
81truncate round
82exact->inexact inexact->exact
83number->string string->number
84exp log sin cos tan
85asin acos atan
86sqrt
87expt
88</pre>
89
90<p>The library also provides the following definitions:
91
92<dl>
93<dt class="function"><em>(procedure)</em> (conj COMPLEX)</dt>
94<dd><p>Computes the conjugate of COMPLEX.
95</dd>
96
97<dt class="function"><em>(constant)</em> i</dt>
98<dt class="function"><em>(constant)</em> -i</dt>
99<dt class="function"><em>(constant)</em> j</dt>
100<dt class="function"><em>(constant)</em> -j</dt>
101<dd><p>Handy numeric values.
102</dd>
103</dl>
104
105<p>Note: If this library is used in compiled code, the option
106<code>-usual-integrations</code> and the declaration <code>standard-bindings</code>
107(implied by <code>-O2</code>) will
108replace invocations of numeric standard procedures with open-coded
109versions that support only the basic numeric types provided by
110the Chicken system. If you use the <code>complex</code> extension
111and compile with <code>-O2</code>, then add declarations that mark
112the used numeric primitives to disable in-lining:
113
114<pre>
115(declare
116  (not standard-bindings sin number->string) )
117
118(pp (number->string (sin i)))     ; ==> "0.+1.1752011936438i"
119</pre>
120
121<p>(This has been fixed in Chicken version 1.72 and higher)
122
123<h3>License:</h3>
124<pre>
125Copyright (c) 2004 by Thomas Christian Chust
126All rights reserved.
127
128Redistribution and use in source and binary forms, with or
129without modification, are permitted provided that the following
130conditions are met:
131
132* Redistributions of source code must retain the above copyright
133  notice, this list of conditions and the following disclaimer.
134* Redistributions in binary form must reproduce the above
135  copyright notice, this list of conditions and the following
136  disclaimer in the documentation and/or other materials provided
137  with the distribution.
138* Neither the name of the author nor the names of its
139  contributors may be used to endorse or promote products derived
140  from this software without specific prior written permission.
141
142THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND
143CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES,
144INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
145MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
146DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR
147CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
148SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
149LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
150USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
151AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
152LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
153ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
154POSSIBILITY OF SUCH DAMAGE.
155</pre>
156
157
158<hr><a href="http://www.call-with-current-continuation.org/eggs/index.html">back</a>
159
160</body></html>
Note: See TracBrowser for help on using the repository browser.