Lines Matching refs:value
16 // returns `value * pow(base, e)`, assuming `e` is positive.
17 static double pow_by_squaring(double value, double base, int e) {
22 value *= base;
26 return value;
64 sscanf(output, "%f", &x) will return the original value iff the
65 value is finite. This function accepts all possible input values.
70 unsigned SkFloatToDecimal(float value, char output[kMaximumSkFloatToDecimalLength]) {
94 /* This function is written to accept any possible input value,
96 we ignore value-correctness and output a syntacticly-valid
98 if (value == INFINITY) {
99 value = FLT_MAX; // nearest finite float.
101 if (value == -INFINITY) {
102 value = -FLT_MAX; // nearest finite float.
104 if (!std::isfinite(value) || value == 0.0f) {
111 if (value < 0.0) {
113 value = -value;
115 SkASSERT(value >= 0.0f);
118 (void)std::frexp(value, &binaryExponent);
123 SkASSERT(value * power <= (double)INT_MAX);
124 int d = static_cast<int>(value * power + 0.5);
125 // SkASSERT(value == (float)(d * pow(10.0, decimalShift)));
132 d = static_cast<int>(value * (power * 0.1) + 0.5);
140 // SkASSERT(value == (float)(d * pow(10.0, decimalShift)));
141 unsigned char buffer[9]; // decimal value buffer.