# HG changeset patch # User jwe # Date 831966257 0 # Node ID d5af81681fda17476386593155b7d554cb916c33 # Parent fe675f6fa03aa5d5e3a32d570f0ff24b59e75226 [project @ 1996-05-13 05:41:36 by jwe] diff -r fe675f6fa03a -r d5af81681fda src/variables.cc --- a/src/variables.cc Mon May 13 05:27:08 1996 +0000 +++ b/src/variables.cc Mon May 13 05:44:17 1996 +0000 @@ -25,6 +25,7 @@ #endif #include +#include #include #include @@ -1669,7 +1670,13 @@ static void install_builtin_variables_4 (void) { - DEFCONST (e, exp (1.0), 0, 0, +#if defined (M_E) + double e_val = M_E; +#else + double e_val = exp (1.0); +#endif + + DEFCONST (e, e_val, 0, 0, "exp (1)"); DEFVAR (empty_list_elements_ok, "warn", 0, empty_list_elements_ok, @@ -1728,7 +1735,13 @@ DEFVAR (output_precision, 5.0, 0, set_output_precision, "number of significant figures to display for numeric output"); - DEFCONST (pi, 4.0 * atan (1.0), 0, 0, +#if defined (M_PI) + double pi_val = M_PI; +#else + double pi_val = 4.0 * atan (1.0); +#endif + + DEFCONST (pi, pi_val, 0, 0, "ratio of the circumference of a circle to its diameter"); DEFVAR (prefer_column_vectors, 1.0, 0, prefer_column_vectors,