Created
November 17, 2009 11:44
-
-
Save takano32/236854 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| static VALUE | |
| flo_is_finite_p(VALUE num) | |
| { | |
| double value = RFLOAT_VALUE(num); | |
| #if HAVE_FINITE | |
| if (!finite(value)) | |
| return Qfalse; | |
| #else | |
| if (isinf(value) || isnan(value)) | |
| return Qfalse; | |
| #endif | |
| return Qtrue; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment