mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-11-28 07:45:00 +00:00
[!HAVE_RINT] (rint): Convert macro to an actual
function, so we can take its address.
This commit is contained in:
parent
9a10bd0dc2
commit
4b5878a8c6
@ -123,10 +123,6 @@ extern int errno;
|
|||||||
#define sinh(x) ((exp(x)-exp(-x))*0.5)
|
#define sinh(x) ((exp(x)-exp(-x))*0.5)
|
||||||
#endif /* VMS */
|
#endif /* VMS */
|
||||||
|
|
||||||
#ifndef HAVE_RINT
|
|
||||||
#define rint(x) (floor((x)+0.5))
|
|
||||||
#endif
|
|
||||||
|
|
||||||
static SIGTYPE float_error ();
|
static SIGTYPE float_error ();
|
||||||
|
|
||||||
/* Nonzero while executing in floating point.
|
/* Nonzero while executing in floating point.
|
||||||
@ -828,6 +824,15 @@ round2 (i1, i2)
|
|||||||
return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
|
return q + (abs_r + (q & 1) <= abs_r1 ? 0 : (i2 ^ r) < 0 ? -1 : 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifndef HAVE_RINT
|
||||||
|
static double
|
||||||
|
rint (d)
|
||||||
|
double d;
|
||||||
|
{
|
||||||
|
return floor(d + 0.5);
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
static double
|
static double
|
||||||
double_identity (d)
|
double_identity (d)
|
||||||
double d;
|
double d;
|
||||||
|
Loading…
Reference in New Issue
Block a user