Fix warning in posix/tst-getopt_long1.c.
[glibc.git] / soft-fp / fmadf4.c
blobc4826ca20c6ee5c976d19b4becba5e8920fb5ff2
1 /* Implement fma using soft-fp.
2 Copyright (C) 2013-2014 Free Software Foundation, Inc.
3 This file is part of the GNU C Library.
5 The GNU C Library is free software; you can redistribute it and/or
6 modify it under the terms of the GNU Lesser General Public
7 License as published by the Free Software Foundation; either
8 version 2.1 of the License, or (at your option) any later version.
10 In addition to the permissions in the GNU Lesser General Public
11 License, the Free Software Foundation gives you unlimited
12 permission to link the compiled version of this file into
13 combinations with other programs, and to distribute those
14 combinations without any restriction coming from the use of this
15 file. (The Lesser General Public License restrictions do apply in
16 other respects; for example, they cover modification of the file,
17 and distribution when not linked into a combine executable.)
19 The GNU C Library is distributed in the hope that it will be useful,
20 but WITHOUT ANY WARRANTY; without even the implied warranty of
21 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22 Lesser General Public License for more details.
24 You should have received a copy of the GNU Lesser General Public
25 License along with the GNU C Library; if not, see
26 <http://www.gnu.org/licenses/>. */
28 #include <math.h>
29 #include "soft-fp.h"
30 #include "double.h"
32 double
33 __fma (double a, double b, double c)
35 FP_DECL_EX;
36 FP_DECL_D (A);
37 FP_DECL_D (B);
38 FP_DECL_D (C);
39 FP_DECL_D (R);
40 double r;
42 FP_INIT_ROUNDMODE;
43 FP_UNPACK_D (A, a);
44 FP_UNPACK_D (B, b);
45 FP_UNPACK_D (C, c);
46 FP_FMA_D (R, A, B, C);
47 FP_PACK_D (r, R);
48 FP_HANDLE_EXCEPTIONS;
50 return r;
52 #ifndef __fma
53 weak_alias (__fma, fma)
54 #endif
56 #ifdef NO_LONG_DOUBLE
57 strong_alias (__fma, __fmal)
58 weak_alias (__fmal, fmal)
59 #endif