mirror of
https://github.com/reactos/reactos.git
synced 2025-06-14 23:29:50 +00:00
[CRT]
Check for NaN and set error accordingly svn path=/trunk/; revision=54447
This commit is contained in:
parent
ada492283a
commit
7d1620fa34
1 changed files with 21 additions and 10 deletions
|
@ -19,11 +19,22 @@
|
||||||
Boston, MA 02110-1301, USA.
|
Boston, MA 02110-1301, USA.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#include <precomp.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
#include <float.h>
|
||||||
|
|
||||||
double ldexp (double value, int exp)
|
double ldexp (double value, int exp)
|
||||||
{
|
{
|
||||||
register double result;
|
register double result;
|
||||||
|
|
||||||
|
/* Check for value correctness
|
||||||
|
* and set errno if required
|
||||||
|
*/
|
||||||
|
if (_isnan(value))
|
||||||
|
{
|
||||||
|
errno = EDOM;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#if defined(__clang__)
|
#if defined(__clang__)
|
||||||
asm ("fild %[exp]\n"
|
asm ("fild %[exp]\n"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue