1 /*
2 mpfrx_swap
3
4 swaps the contents of f and g
5
6 Copyright (C) 2009 Andreas Enge
7
8 This file is part of the MPFRCX Library.
9
10 The MPFRCX Library is free software; you can redistribute it and/or modify
11 it under the terms of the GNU Lesser General Public License as published by
12 the Free Software Foundation; either version 3 of the License, or (at your
13 option) any later version.
14
15 The MPFRCX Library is distributed in the hope that it will be useful, but
16 WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
17 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
18 License for more details.
19
20 You should have received a copy of the GNU Lesser General Public License
21 along with the MPFRCX library; see the file COPYING.LESSER. If not, write to
22 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
23 MA 02111-1307, USA.
24 */
25
26 #include "mpfrcx-impl.h"
27
mpfrx_swap(mpfrx_ptr f,mpfrx_ptr g)28 void mpfrx_swap (mpfrx_ptr f, mpfrx_ptr g) {
29 mpfrx_t tmp;
30
31 tmp [0] = *f;
32 *f = *g;
33 *g = tmp [0];
34 }
35