Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@445 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
- Loading branch information
matz
committed
Apr 27, 1999
1 parent
e67e5ad
commit e975828
Showing
11 changed files
with
1,260 additions
and
15 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
int | ||
finite(n) | ||
double n; | ||
{ | ||
return !isnan(n) && !isinf(n); | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
static double zero() { return 0.0; } | ||
static double one() { return 1.0; } | ||
static double inf() { return one() / zero(); } | ||
|
||
int | ||
isinf(n) | ||
double n; | ||
{ | ||
static double pinf = 0.0; | ||
static double ninf = 0.0; | ||
|
||
if (pinf == 0.0) { | ||
pinf = inf(); | ||
ninf = -pinf; | ||
} | ||
return memcmp(&n, &pinf, sizeof n) == 0 | ||
|| memcmp(&n, &ninf, sizeof n) == 0; | ||
} |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
static int double_ne(); | ||
|
||
int | ||
isnan(n) | ||
double n; | ||
{ | ||
return double_ne(n, n); | ||
} | ||
|
||
static | ||
int | ||
double_ne(n1, n2) | ||
double n1, n2; | ||
{ | ||
return n1 != n2; | ||
} | ||
|
||
|
Oops, something went wrong.