template <>
const char* dataTypeNameOf<Void> (void)
{
- DE_ASSERT(!"Impossible");
+ DE_FATAL("Impossible");
return DE_NULL;
}
template <>
VarType getVarTypeOf<Void> (Precision)
{
- DE_ASSERT(!"Impossible");
+ DE_FATAL("Impossible");
return VarType();
}
const float& value,
ostream& os)
{
- os << (value ? "true" : "false");
+ os << (value != 0.0f ? "true" : "false");
}
static void doPrintIVal (const FloatFormat&,
case glu::PRECISION_LOWP:
return ctx.format.ulp(ret, 2.0);
default:
- DE_ASSERT(!"Impossible");
+ DE_FATAL("Impossible");
}
return 0;
}
case glu::PRECISION_LOWP:
return ctx.format.ulp(ret, 2.0);
default:
- DE_ASSERT(!"Impossible");
+ DE_FATAL("Impossible");
}
return 0;
// These are not defined as derived forms in the GLSL ES spec, but
// that gives us a reasonable precision.
DEFINE_DERIVED_FLOAT1(ASinh, asinh, x, log(x + sqrt(x * x + constant(1.0f))));
-DEFINE_DERIVED_FLOAT1(ACosh, acosh, x, log(x + sqrt((x + constant(1.0f)) *
- (x - constant(1.0f)))));
+DEFINE_DERIVED_FLOAT1(ACosh, acosh, x, log(x + sqrt(alternatives((x + constant(1.0f)) * (x - constant(1.0f)),
+ (x*x - constant(1.0f))))));
DEFINE_DERIVED_FLOAT1(ATanh, atanh, x, constant(0.5f) * log((constant(1.0f) + x) /
(constant(1.0f) - x)));
const int exp = rnd.getInt(0, getNumBits(prec)-2);
const int sign = rnd.getBool() ? -1 : 1;
- return sign * rnd.getInt(0, 1L << exp);
+ return sign * rnd.getInt(0, (deInt32)1 << exp);
}
void genFixeds (const FloatFormat&, vector<int>& dst) const
for (int sign = -1; sign <= 1; sign += 2)
{
// Smallest subnormal
- dst.push_back(sign * minQuantum);
+ dst.push_back((float)sign * minQuantum);
// Largest subnormal
- dst.push_back(sign * (minNormalized - minQuantum));
+ dst.push_back((float)sign * (minNormalized - minQuantum));
// Smallest normalized
- dst.push_back(sign * minNormalized);
+ dst.push_back((float)sign * minNormalized);
// Next smallest normalized
- dst.push_back(sign * (minNormalized + minQuantum));
+ dst.push_back((float)sign * (minNormalized + minQuantum));
- dst.push_back(sign * 0.5f);
- dst.push_back(sign * 1.0f);
- dst.push_back(sign * 2.0f);
+ dst.push_back((float)sign * 0.5f);
+ dst.push_back((float)sign * 1.0f);
+ dst.push_back((float)sign * 2.0f);
// Largest number
- dst.push_back(sign * (deFloatLdExp(1.0f, maxExp) +
- (deFloatLdExp(1.0f, maxExp) - maxQuantum)));
+ dst.push_back((float)sign * (deFloatLdExp(1.0f, maxExp) +
+ (deFloatLdExp(1.0f, maxExp) - maxQuantum)));
- dst.push_back(sign * TCU_INFINITY);
+ dst.push_back((float)sign * TCU_INFINITY);
}
}
case 1:
return new InOutFuncCase<Sig>(context, name, func);
default:
- DE_ASSERT(!"Impossible");
+ DE_FATAL("Impossible");
}
return DE_NULL;
}