[goffice] Math: add test for buggy math library.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Math: add test for buggy math library.
- Date: Sun, 16 Mar 2014 22:02:50 +0000 (UTC)
commit 292371bb556119118aea5c1a3ccf2ff159810a93
Author: Morten Welinder <terra gnome org>
Date: Sun Mar 16 18:01:28 2014 -0400
Math: add test for buggy math library.
We rely on a mostly-working math library. Warn users about trouble
we know how to detect.
ChangeLog | 9 +++++++--
goffice/math/go-math.c | 9 +++++++++
2 files changed, 16 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index bd666e1..0399434 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-03-16 Morten Welinder <terra gnome org>
+
+ * goffice/math/go-math.c (_go_math_init): Add test for buggy math
+ library (probably caused by compiler bug).
+
2014-03-15 Morten Welinder <terra gnome org>
* goffice/utils/go-pango-extras.c (go_pango_translate_here): Plug
@@ -10,8 +15,8 @@
2014-03-15 Jean Brefort <jean brefort normalesup org>
- * goffice/canvas/goc-canvas.c (goc_canvas_init): really accept leave_notify
- events. [#668103][see also #706659]
+ * goffice/canvas/goc-canvas.c (goc_canvas_init): really accept
+ leave_notify events. [#668103][see also #706659]
2014-03-14 Andreas J. Guelzow <aguelzow pyrshep ca>
diff --git a/goffice/math/go-math.c b/goffice/math/go-math.c
index 5c534ca..574403a 100644
--- a/goffice/math/go-math.c
+++ b/goffice/math/go-math.c
@@ -176,6 +176,15 @@ _go_math_init (void)
}
#endif
+ {
+ double x = atof ("24985672148.49707");
+ double sx = sin (x);
+ double ref = -0.55266506738426566413304;
+ if (fabs (sx - ref) > 0.01) {
+ g_warning ("Running with buggy math library, see
https://bugzilla.gnome.org/show_bug.cgi?id=726250");
+ }
+ }
+
g_free (old_locale);
#ifdef SIGFPE
signal (SIGFPE, signal_handler);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]