[goffice] Math: improve sinpil/cospil/tanpil/cotpil.
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Math: improve sinpil/cospil/tanpil/cotpil.
- Date: Wed, 7 Mar 2018 02:17:09 +0000 (UTC)
commit ca0a1c01e1e890e912ac62d77c513d82d933754a
Author: Morten Welinder <terra gnome org>
Date: Tue Mar 6 21:15:56 2018 -0500
Math: improve sinpil/cospil/tanpil/cotpil.
ChangeLog | 5 +++++
NEWS | 3 +++
goffice/math/go-math.c | 2 +-
3 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 9586f0d..5236b50 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2018-03-06 Morten Welinder <terra gnome org>
+
+ * goffice/math/go-math.c (do_sinpil): Improve accuracy of
+ fallback.
+
2018-02-14 Jean Brefort <jean brefort normalesup org>
* goffice/canvas/goc-image.c (goc_image_draw): don't try to display an image
diff --git a/NEWS b/NEWS
index 7ec2ab5..f8f737b 100644
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,8 @@
goffice 0.10.39:
+Morten:
+ * sinpi/cospi/tanpi/cotpi improvement.
+
--------------------------------------------------------------------------
goffice 0.10.38:
diff --git a/goffice/math/go-math.c b/goffice/math/go-math.c
index e2bad63..22d7a9e 100644
--- a/goffice/math/go-math.c
+++ b/goffice/math/go-math.c
@@ -1126,7 +1126,7 @@ do_sinpil (long double x, int k)
else if (x == 0.25)
y = 0.707106781186547524400844362104849039284835937688474036588339L;
else
- y = (k & 1) ? cos (M_PIgo * x) : sin (M_PIgo * x);
+ y = (k & 1) ? cosl (M_PIgo * x) : sinl (M_PIgo * x);
return (k & 2) ? 0 - y : y;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]