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
|
<html lang="en">
<head>
<title>Precision - FFTW 3.2.2</title>
<meta http-equiv="Content-Type" content="text/html">
<meta name="description" content="FFTW 3.2.2">
<meta name="generator" content="makeinfo 4.13">
<link title="Top" rel="start" href="index.html#Top">
<link rel="up" href="Data-Types-and-Files.html#Data-Types-and-Files" title="Data Types and Files">
<link rel="prev" href="Complex-numbers.html#Complex-numbers" title="Complex numbers">
<link rel="next" href="Memory-Allocation.html#Memory-Allocation" title="Memory Allocation">
<link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
<!--
This manual is for FFTW
(version 3.2.2, 12 July 2009).
Copyright (C) 2003 Matteo Frigo.
Copyright (C) 2003 Massachusetts Institute of Technology.
Permission is granted to make and distribute verbatim copies of
this manual provided the copyright notice and this permission
notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of
this manual under the conditions for verbatim copying, provided
that the entire resulting derived work is distributed under the
terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this
manual into another language, under the above conditions for
modified versions, except that this permission notice may be
stated in a translation approved by the Free Software Foundation.
-->
<meta http-equiv="Content-Style-Type" content="text/css">
<style type="text/css"><!--
pre.display { font-family:inherit }
pre.format { font-family:inherit }
pre.smalldisplay { font-family:inherit; font-size:smaller }
pre.smallformat { font-family:inherit; font-size:smaller }
pre.smallexample { font-size:smaller }
pre.smalllisp { font-size:smaller }
span.sc { font-variant:small-caps }
span.roman { font-family:serif; font-weight:normal; }
span.sansserif { font-family:sans-serif; font-weight:normal; }
--></style>
</head>
<body>
<div class="node">
<a name="Precision"></a>
<p>
Next: <a rel="next" accesskey="n" href="Memory-Allocation.html#Memory-Allocation">Memory Allocation</a>,
Previous: <a rel="previous" accesskey="p" href="Complex-numbers.html#Complex-numbers">Complex numbers</a>,
Up: <a rel="up" accesskey="u" href="Data-Types-and-Files.html#Data-Types-and-Files">Data Types and Files</a>
<hr>
</div>
<h4 class="subsection">4.1.2 Precision</h4>
<p><a name="index-precision-140"></a>
You can install single and long-double precision versions of FFTW,
which replace <code>double</code> with <code>float</code> and <code>long double</code>,
respectively (see <a href="Installation-and-Customization.html#Installation-and-Customization">Installation and Customization</a>). To use these
interfaces, you:
<ul>
<li>Link to the single/long-double libraries; on Unix, <code>-lfftw3f</code> or
<code>-lfftw3l</code> instead of (or in addition to) <code>-lfftw3</code>. (You
can link to the different-precision libraries simultaneously.)
<li>Include the <em>same</em> <code><fftw3.h></code> header file.
<li>Replace all lowercase instances of ‘<samp><span class="samp">fftw_</span></samp>’ with ‘<samp><span class="samp">fftwf_</span></samp>’ or
<code>fftwl_</code> for single or long-double precision, respectively.
(<code>fftw_complex</code> becomes <code>fftwf_complex</code>, <code>fftw_execute</code>
becomes <code>fftwf_execute</code>, etcetera.)
<li>Uppercase names, i.e. names beginning with ‘<samp><span class="samp">FFTW_</span></samp>’, remain the
same.
<li>Replace <code>double</code> with <code>float</code> or <code>long double</code> for
subroutine parameters.
</ul>
<p>Depending upon your compiler and/or hardware, <code>long double</code> may not
be any more precise than <code>double</code> (or may not be supported at all,
although it is standard in C99).
<a name="index-C99-141"></a>
<!-- =========> -->
</body></html>
|