[goffice] Constants: add print statements for 180/pi and pi/180
- From: Morten Welinder <mortenw src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [goffice] Constants: add print statements for 180/pi and pi/180
- Date: Sat, 25 Nov 2017 01:53:56 +0000 (UTC)
commit 300199b342aa486853f9923ad39a032c443260d4
Author: Morten Welinder <terra gnome org>
Date: Fri Nov 24 20:52:28 2017 -0500
Constants: add print statements for 180/pi and pi/180
This answers the question whether those constants can be computed
accurately using double math. Evidently they can.
tests/constants.c | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/tests/constants.c b/tests/constants.c
index 16ab30d..45e0a9f 100644
--- a/tests/constants.c
+++ b/tests/constants.c
@@ -253,6 +253,8 @@ main (int argc, char **argv)
go_quad_init (&qc, 180);
go_quad_div (&qc, &qc, &go_quad_pi);
examine_constant ("180/pi", &qc);
+ g_printerr ("180/pi computed as double: %.55g\n", 180 / M_PI);
+ g_printerr ("pi/180 computed as double: %.55g\n", M_PI / 180);
go_quad_end (state);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]