641 |
return x; |
return x; |
642 |
} |
} |
643 |
else if (SCM_REALP (x)) |
else if (SCM_REALP (x)) |
644 |
return scm_make_real (fabs (SCM_REAL_VALUE (x))); |
{ |
645 |
|
/* note that if x is a NaN then xx<0 is false so we return x unchanged */ |
646 |
|
double xx = SCM_REAL_VALUE (x); |
647 |
|
if (xx < 0.0) |
648 |
|
return scm_make_real (-xx); |
649 |
|
else |
650 |
|
return x; |
651 |
|
} |
652 |
else if (SCM_FRACTIONP (x)) |
else if (SCM_FRACTIONP (x)) |
653 |
{ |
{ |
654 |
if (SCM_FALSEP (scm_negative_p (SCM_FRACTION_NUMERATOR (x)))) |
if (SCM_FALSEP (scm_negative_p (SCM_FRACTION_NUMERATOR (x)))) |