[goffice] Math: generate positive nan.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Math: generate positive nan.
- Date: Fri, 20 Mar 2015 21:49:51 +0000 (UTC)
commit 77f1349fae8f762fbca9e8cec80f7e6875a96dff
Author: Morten Welinder <terra gnome org>
Date: Fri Mar 20 17:49:19 2015 -0400
Math: generate positive nan.
For some reason doing +inf*+0 gives a negative nan. Send it through
fabs.
ChangeLog | 4 ++++
goffice/math/go-math.c | 2 +-
2 files changed, 5 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index e10e154..485fa09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2015-03-20 Morten Welinder <terra gnome org>
+
+ * goffice/math/go-math.c (_go_math_init): generate positive nan.
+
2015-03-19 Jean Brefort <jean brefort normalesup org>
* goffice/graph/gog-axis-line.c (axis_line_point): fix selection of
diff --git a/goffice/math/go-math.c b/goffice/math/go-math.c
index fdb9a0d..6c5dfc8 100644
--- a/goffice/math/go-math.c
+++ b/goffice/math/go-math.c
@@ -129,7 +129,7 @@ _go_math_init (void)
#error "Please do not compile this code with -ffast-math. It will not work."
#endif
- go_nan = go_pinf * 0.0;
+ go_nan = fabs (go_pinf * 0.0);
if (isnan (go_nan))
goto have_nan;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]