summaryrefslogtreecommitdiff
path: root/missing/isnan.c
blob: 5846947f500a4d51302715c8e864db5e567c819e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/* public domain rewrite of isnan(3) */

#include "ruby/missing.h"

static int double_ne(double n1, double n2);

int
isnan(double n)
{
    return double_ne(n, n);
}

static int
double_ne(double n1, double n2)
{
    return n1 != n2;
}