/*	Copyright (C) 2006 Garrett A. Kajmowicz

	This file is part of the uClibc++ Library.

	This library is free software; you can redistribute it and/or
	modify it under the terms of the GNU Lesser General Public
	License as published by the Free Software Foundation; either
	version 2.1 of the License, or (at your option) any later version.

	This library is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
	Lesser General Public License for more details.

	You should have received a copy of the GNU Lesser General Public
	License along with this library; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
*/

#include <math.h>

#ifndef __STD_HEADER_CMATH
#define __STD_HEADER_CMATH 1

#undef abs
#undef acos
#undef asin
#undef atan
#undef atan2
#undef ceil
#undef cos
#undef cosh
#undef exp
#undef fabs
#undef floor
#undef fmod
#undef frexp
#undef ldexp
#undef log
#undef log10
#undef modf
#undef pow
#undef sin
#undef sinh
#undef sqrt
#undef tan
#undef tanh

namespace std {

	using ::acos;
	using ::asin;
	using ::atan;
	using ::atan2;
	using ::ceil;
	using ::cos;
	using ::cosh;
	using ::exp;
	using ::fabs;
	using ::floor;
	using ::fmod;
	using ::frexp;
	using ::ldexp;
	using ::log;
	using ::log10;
	using ::modf;
	using ::pow;
	using ::sin;
	using ::sinh;
	using ::sqrt;
	using ::tan;
	using ::tanh;

#ifndef __CORRECT_ISO_CPP_MATH_H_PROTO
	inline float abs  (float x){
		return fabsf(x);
	}
	inline float acos (float x){
		return acosf(x);
	}
	inline float asin (float x){
		return asinf(x);
	}
	inline float atan (float x){
		return atanf(x);
	}
	inline float atan2(float y, float x){
		return atan2f(y, x);
	}
	inline float ceil (float x){
		return ceilf(x);
	}
	inline float cos  (float x){
		return cosf(x);
	}
	inline float cosh (float x){
		return coshf(x);
	}
	inline float exp  (float x){
		return expf(x);
	}
	inline float fabs (float x){
		return fabsf(x);
	}
	inline float floor(float x){
		return floorf(x);
	}
	inline float fmod (float x, float y){
		return fmodf(x, y);
	}
	inline float frexp(float x, int* exp){
		return frexpf(x, exp);
	}
	inline float ldexp(float x, int exp){
		return ldexpf(x, exp);
	}
	inline float log  (float x){
		return logf(x);
	}
	inline float log10(float x){
		return log10f(x);
	}
	inline float modf (float x, float* inptr){
		return modff(x, inptr);
	}
	inline float pow  (float x, float y){
		return powf(x, y);
	}
#if 1 // DR 550 removed this
	inline float pow  (float x, int y){
		return pow((double)x, (double)y);
	}
#endif
	inline float sin  (float x){
		return sinf(x);
	}
	inline float sinh (float x){
		return sinhf(x);
	}
	inline float sqrt (float x){
		return sqrtf(x);
	}
	inline float tan  (float x){
		return tanf(x);
	}
	inline float tanh (float x){
		return tanhf(x);
	}
	inline double abs(double x){
		return fabs(x);
	}
	inline double pow(double x, int y){
		return pow((double)x, (double)y);
	}


#endif	//	 __CORRECT_ISO_CPP_MATH_H_PROTO
}

#endif	//__STD_HEADER_CMATH

