
#ifndef lint
static	char sccsid[] = "@(#)ldexp.c 1.1 94/10/31 SMI";
#endif

/*
 * Copyright (c) 1986 by Sun Microsystems, Inc.
 */

#include <math.h>
#include <errno.h>

double ldexp(value, exp)
double value; int exp;
{
	if(!finite(value)||value==0.0) return value;
	value = scalbn(value,exp);
	if(!finite(value)||value==0.0) errno = ERANGE;
	return value;
}
