[gcalctool] Fix incorrect calculation of tanh
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gcalctool] Fix incorrect calculation of tanh
- Date: Mon, 22 Nov 2010 10:13:45 +0000 (UTC)
commit 6987d3f1179e7d6ad8af3f183b22309a7bafbe41
Author: Robert Ancell <robert ancell canonical com>
Date: Mon Nov 22 21:13:31 2010 +1100
Fix incorrect calculation of tanh
NEWS | 4 ++++
src/mp-trigonometric.c | 1 +
2 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 74bd5a6..fa15f52 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,7 @@
+Overview of changes in gcalctool 5.91.3
+
+ * Fix incorrect calculation of tanh
+
Overview of changes in gcalctool 5.91.2
* Fix broken thousands separators code (Bug #628908)
diff --git a/src/mp-trigonometric.c b/src/mp-trigonometric.c
index 1de0548..f4cc8bb 100644
--- a/src/mp-trigonometric.c
+++ b/src/mp-trigonometric.c
@@ -557,6 +557,7 @@ mp_tanh(const MPNumber *x, MPNumber *z)
} else {
mp_epowy(&t, &t);
mp_add_integer(&t, 1, z);
+ mp_add_integer(&t, -1, &t);
mp_divide(&t, z, z);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]