double
integer(double x)
{
if(x<-2147483648.0 || x>2147483647.0)
execerror("argument out of domain", 0);
return (double)(long)x;
}
double
errcheck(double d, char* s) /* check result of library call */
{
if(isNaN(d))
execerror(s, "argument out of domain");
if(isInf(d, 0))
execerror(s, "result out of range");
return d;
}