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