File indexing completed on 2024-04-14 03:47:56

0001 /*
0002     SPDX-FileCopyrightText: 2008 Torsten Rahn <tackat@kde.org>
0003 
0004     SPDX-License-Identifier: LGPL-2.0-or-later
0005 */
0006 
0007 #include "MathHelper.h"
0008 
0009 #ifdef Q_CC_MSVC
0010 #include <float.h>
0011 
0012 qreal msvc_asinh(qreal x)
0013 {
0014     if ( _isnan ( x ) ) {
0015         errno = EDOM;
0016         return x;
0017     }
0018 
0019     return ( log( x + sqrt ( x * x + 1.0 ) ) );
0020 }
0021 
0022 qreal msvc_atanh(qreal x)
0023 {
0024     return ( 0.5 * log( ( 1.0 + x ) / ( 1.0 - x ) ) );
0025 }
0026 
0027 #endif  // Q_CC_MSVC
0028