mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-12-10 03:47:40 +00:00
Minor fixes and cleanup
Former-commit-id: 362dcbcaa40ad64c42fec541fff855d69bc4372a
This commit is contained in:
@@ -163,7 +163,7 @@ static inline int __fpclassifyd(double x) {
|
||||
#define isinf(x) (fpclassify(x) == FP_INFINITE)
|
||||
#define isfinite(x) ((fpclassify(x) > FP_INFINITE))
|
||||
|
||||
static inline float sqrtf(float x) {
|
||||
_MATH_INLINE float sqrtf(float x) {
|
||||
const double _half = .5;
|
||||
const double _three = 3.0;
|
||||
volatile float y;
|
||||
@@ -182,7 +182,7 @@ static inline float sqrtf(float x) {
|
||||
return x;
|
||||
}
|
||||
|
||||
static inline double sqrt(double x) {
|
||||
_MATH_INLINE double sqrt(double x) {
|
||||
if (x > 0.0) {
|
||||
double guess = __frsqrte(x); /* returns an approximation to */
|
||||
guess = .5 * guess * (3.0 - guess * guess * x); /* now have 8 sig bits */
|
||||
|
||||
Reference in New Issue
Block a user