-
Notifications
You must be signed in to change notification settings - Fork 668
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed compilation with OSX 10.8 (std::isnan, Issue #23)
- Loading branch information
Armin Hornung
committed
Apr 8, 2013
1 parent
f19a23d
commit 77a7501
Showing
1 changed file
with
2 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -37,6 +37,7 @@ | |
#include <string.h> | ||
#include <stdlib.h> | ||
#include <list> | ||
#include <cmath> | ||
|
||
using std::cout; | ||
using std::endl; | ||
|
@@ -126,7 +127,7 @@ int main(int argc, char** argv) { | |
else | ||
kld +=log(p1/p2)*p1 + log((1-p1)/(1-p2))*(1-p1); | ||
|
||
if (isnan(kld)){ | ||
if (std::isnan(kld)){ | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
ahornung
Member
|
||
OCTOMAP_ERROR("KLD is nan! KLD(%f,%f)=%f; sum = %f", p1, p2, kld, kld_sum); | ||
exit(-1); | ||
} | ||
|
I ran into this today on Groovy, do you plan to release this fix into Groovy?