#include "math.h"
/*
// Reciprocal (32-bit Precision)
signed long int qinv1(signed short int x)
{
	return (signed long int)(2147483647.999/(double)x); //2147483648 это 2 в 31-ой степени
}


// Reciprocal (16-bit Precision)
signed short int qinv2(signed short int x)
{
	return (signed short int)(32767.999/(double)x); //32768 это 2 в 15-ой степени
}


// SIN (Table look-up and Linear Interpolation)
signed short int qsinlt(signed short int x)
{
	return (signed short int)(32767.999*sin((double)x*3.1415926535897932384626433832795/32768.));
}


// COS (Table look-up and Linear Interpolation)
signed short int qcoslt(signed short int x)
{
	return (signed short int)(32767.999*cos((double)x*3.1415926535897932384626433832795/32768.));
}


// Fixed point Square-root (Taylor series implementation)
unsigned short int qsqrt(unsigned long int x)
{
	return (unsigned short int)sqrt((double)x);
}
*/

// Single-Precision Floating-Point 1.0/Square Root
float isqrt(float x)
{
	return 1.0/sqrt(x);
}


// Single-Precision Floating-Point SIN and COS (radians)
void sincos(float radian, float *ptrSin, float *ptrCos)
{
	*ptrSin = sin(radian);
	*ptrCos = cos(radian);
}


