fix abs(-0), which shall evaluate to +0
This commit is contained in:
parent
8f44e9da44
commit
4d95360a68
|
|
@ -69,7 +69,7 @@ typedef struct {
|
|||
#endif
|
||||
|
||||
/* Some defines used mainly in cmath.c. */
|
||||
#define FTEcabs(d) (((d) < 0.0) ? - (d) : (d))
|
||||
#define FTEcabs(d) fabs(d)
|
||||
#define cph(c) (atan2(imagpart(c), (realpart(c))))
|
||||
#define cmag(c) (hypot(realpart(c), imagpart(c)))
|
||||
#define radtodeg(c) (cx_degrees ? ((c) / 3.14159265358979323846 * 180) : (c))
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ double PTfudge_factor;
|
|||
double
|
||||
PTabs(double arg)
|
||||
{
|
||||
return arg >= 0.0 ? arg : -arg;
|
||||
return fabs(arg);
|
||||
}
|
||||
|
||||
double
|
||||
|
|
|
|||
Loading…
Reference in New Issue