File: nan.h

package info (click to toggle)
stellarsolver 2.7-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 34,112 kB
  • sloc: ansic: 31,587; cpp: 15,103; python: 186; sh: 74; pascal: 67; perl: 9; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 1,581 bytes parent folder | download | duplicates (5)
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
/***************************************************************************
                      nan.h  -  K Desktop Planetarium
                             -------------------
    begin                : Sat 16 Mar 2013 17:50:49 CDT
    copyright            : (c) 2013 by Akarsh Simha
    email                : akarsh.simha@kdemail.net
***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/

#pragma once

#include <limits>

// The way of doing this in C++ 11. Leaving it here for future purposes.
#if 0
namespace NaN
{
constexpr double d = std::numeric_limits::quiet_NaN();
constexpr float f = std::numeric_limits<float>::quiet_NaN();
constexpr long double ld = std::numeric_limits<long double>::quiet_NaN();
}
#endif

namespace NaN
{
const double d       = std::numeric_limits<double>::quiet_NaN();
const float f        = std::numeric_limits<float>::quiet_NaN();
const long double ld = std::numeric_limits<long double>::quiet_NaN();
}