1 /* Macros for infinity.
2 Copyright (C) 2011-2012 Free Software Foundation, Inc.
4 This program is free software: you can redistribute it and/or modify
5 it under the terms of the GNU General Public License as published by
6 the Free Software Foundation; either version 3 of the License, or
7 (at your option) any later version.
9 This program is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 GNU General Public License for more details.
14 You should have received a copy of the GNU General Public License
15 along with this program. If not, see <http://www.gnu.org/licenses/>. */
18 /* Infinityf () returns a 'float' +Infinity. */
20 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0f / 0.0f. */
25 static float zero
= 0.0f
;
29 # define Infinityf() (1.0f / 0.0f)
33 /* Infinityd () returns a 'double' +Infinity. */
35 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0 / 0.0. */
40 static double zero
= 0.0;
44 # define Infinityd() (1.0 / 0.0)
48 /* Infinityl () returns a 'long double' +Infinity. */
50 /* The Microsoft MSVC 9 compiler chokes on the expression 1.0L / 0.0L. */
55 static long double zero
= 0.0L;
59 # define Infinityl() (1.0L / 0.0L)