Marble

MathHelper.cpp
1/*
2 SPDX-FileCopyrightText: 2008 Torsten Rahn <tackat@kde.org>
3
4 SPDX-License-Identifier: LGPL-2.0-or-later
5*/
6
7#include "MathHelper.h"
8
9#ifdef Q_CC_MSVC
10#include <float.h>
11
12qreal msvc_asinh(qreal x)
13{
14 if (_isnan(x)) {
15 errno = EDOM;
16 return x;
17 }
18
19 return (log(x + sqrt(x * x + 1.0)));
20}
21
22qreal msvc_atanh(qreal x)
23{
24 return (0.5 * log((1.0 + x) / (1.0 - x)));
25}
26
27#endif // Q_CC_MSVC
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 4 2024 16:37:03 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.