summaryrefslogtreecommitdiff
path: root/jni/ruby/missing/finite.c
blob: ab7686317bcdd342e2111c47a9581cae9aa05857 (plain)
1
2
3
4
5
6
7
8
9
/* public domain rewrite of finite(3) */

#include "ruby/missing.h"

int
finite(double n)
{
    return !isnan(n) && !isinf(n);
}