# HG changeset patch # User jwe # Date 745529409 0 # Node ID 1feceb2a86f972d66bf8f85e27c8da9f49ccf168 # Parent bd04d91a7a4a0d555a54ec5cba069a06328e165f [project @ 1993-08-16 19:30:09 by jwe] (arg (double)): Return pi for negative real values. diff -r bd04d91a7a4a -r 1feceb2a86f9 src/mappers.cc --- a/src/mappers.cc Sun Aug 15 05:08:48 1993 +0000 +++ b/src/mappers.cc Mon Aug 16 19:30:09 1993 +0000 @@ -35,6 +35,14 @@ #define finite(x) ((x) < DBL_MAX && (x) > -DBL_MAX) #endif +#ifndef M_LOG10E +#define M_LOG10E 0.43429448190325182765 +#endif + +#ifndef M_PI +#define M_PI 3.14159265358979323846 +#endif + /* * Double -> double mappers. */ @@ -42,7 +50,10 @@ double arg (double x) { - return 0.0; + if (x < 0.0) + return M_PI; + else + return 0.0; } double @@ -226,10 +237,6 @@ return Complex (re, im); } -#ifndef M_LOG10E -#define M_LOG10E 0.43429448190325182765 -#endif - Complex log10 (const Complex& x) {