comparison src/fftw-3.3.3/doc/html/Precision.html @ 10:37bf6b4a2645

Add FFTW3
author Chris Cannam
date Wed, 20 Mar 2013 15:35:50 +0000
parents
children
comparison
equal deleted inserted replaced
9:c0fb53affa76 10:37bf6b4a2645
1 <html lang="en">
2 <head>
3 <title>Precision - FFTW 3.3.3</title>
4 <meta http-equiv="Content-Type" content="text/html">
5 <meta name="description" content="FFTW 3.3.3">
6 <meta name="generator" content="makeinfo 4.13">
7 <link title="Top" rel="start" href="index.html#Top">
8 <link rel="up" href="Data-Types-and-Files.html#Data-Types-and-Files" title="Data Types and Files">
9 <link rel="prev" href="Complex-numbers.html#Complex-numbers" title="Complex numbers">
10 <link rel="next" href="Memory-Allocation.html#Memory-Allocation" title="Memory Allocation">
11 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
12 <!--
13 This manual is for FFTW
14 (version 3.3.3, 25 November 2012).
15
16 Copyright (C) 2003 Matteo Frigo.
17
18 Copyright (C) 2003 Massachusetts Institute of Technology.
19
20 Permission is granted to make and distribute verbatim copies of
21 this manual provided the copyright notice and this permission
22 notice are preserved on all copies.
23
24 Permission is granted to copy and distribute modified versions of
25 this manual under the conditions for verbatim copying, provided
26 that the entire resulting derived work is distributed under the
27 terms of a permission notice identical to this one.
28
29 Permission is granted to copy and distribute translations of this
30 manual into another language, under the above conditions for
31 modified versions, except that this permission notice may be
32 stated in a translation approved by the Free Software Foundation.
33 -->
34 <meta http-equiv="Content-Style-Type" content="text/css">
35 <style type="text/css"><!--
36 pre.display { font-family:inherit }
37 pre.format { font-family:inherit }
38 pre.smalldisplay { font-family:inherit; font-size:smaller }
39 pre.smallformat { font-family:inherit; font-size:smaller }
40 pre.smallexample { font-size:smaller }
41 pre.smalllisp { font-size:smaller }
42 span.sc { font-variant:small-caps }
43 span.roman { font-family:serif; font-weight:normal; }
44 span.sansserif { font-family:sans-serif; font-weight:normal; }
45 --></style>
46 </head>
47 <body>
48 <div class="node">
49 <a name="Precision"></a>
50 <p>
51 Next:&nbsp;<a rel="next" accesskey="n" href="Memory-Allocation.html#Memory-Allocation">Memory Allocation</a>,
52 Previous:&nbsp;<a rel="previous" accesskey="p" href="Complex-numbers.html#Complex-numbers">Complex numbers</a>,
53 Up:&nbsp;<a rel="up" accesskey="u" href="Data-Types-and-Files.html#Data-Types-and-Files">Data Types and Files</a>
54 <hr>
55 </div>
56
57 <h4 class="subsection">4.1.2 Precision</h4>
58
59 <p><a name="index-precision-143"></a>
60 You can install single and long-double precision versions of FFTW,
61 which replace <code>double</code> with <code>float</code> and <code>long double</code>,
62 respectively (see <a href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>). To use these
63 interfaces, you:
64
65 <ul>
66 <li>Link to the single/long-double libraries; on Unix, <code>-lfftw3f</code> or
67 <code>-lfftw3l</code> instead of (or in addition to) <code>-lfftw3</code>. (You
68 can link to the different-precision libraries simultaneously.)
69
70 <li>Include the <em>same</em> <code>&lt;fftw3.h&gt;</code> header file.
71
72 <li>Replace all lowercase instances of &lsquo;<samp><span class="samp">fftw_</span></samp>&rsquo; with &lsquo;<samp><span class="samp">fftwf_</span></samp>&rsquo; or
73 &lsquo;<samp><span class="samp">fftwl_</span></samp>&rsquo; for single or long-double precision, respectively.
74 (<code>fftw_complex</code> becomes <code>fftwf_complex</code>, <code>fftw_execute</code>
75 becomes <code>fftwf_execute</code>, etcetera.)
76
77 <li>Uppercase names, i.e. names beginning with &lsquo;<samp><span class="samp">FFTW_</span></samp>&rsquo;, remain the
78 same.
79
80 <li>Replace <code>double</code> with <code>float</code> or <code>long double</code> for
81 subroutine parameters.
82
83 </ul>
84
85 <p>Depending upon your compiler and/or hardware, <code>long double</code> may not
86 be any more precise than <code>double</code> (or may not be supported at all,
87 although it is standard in C99).
88 <a name="index-C99-144"></a>
89
90 <p>We also support using the nonstandard <code>__float128</code>
91 quadruple-precision type provided by recent versions of <code>gcc</code> on
92 32- and 64-bit x86 hardware (see <a href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>).
93 To use this type, link with <code>-lfftw3q -lquadmath -lm</code> (the
94 <code>libquadmath</code> library provided by <code>gcc</code> is needed for
95 quadruple-precision trigonometric functions) and use &lsquo;<samp><span class="samp">fftwq_</span></samp>&rsquo;
96 identifiers.
97
98 <!-- =========> -->
99 </body></html>
100