Lines Matching refs:value

53  * bits of a split value - for example, if the original value was a 64-bit
54 * integer, this temporary value will contain the low 32 bits of that integer.
55 * If the original value was a double, this temporary value will contain the
64 * of whatever value was split.
73 * @param {number} value The number to split.
75 jspb.utils.splitUint64 = function(value) {
77 var lowBits = value >>> 0;
78 var highBits = Math.floor((value - lowBits) /
89 * @param {number} value The number to split.
91 jspb.utils.splitInt64 = function(value) {
93 var sign = (value < 0);
94 value = Math.abs(value);
97 var lowBits = value >>> 0;
98 var highBits = Math.floor((value - lowBits) /
122 * @param {number} value The number to split.
124 jspb.utils.splitZigzag64 = function(value) {
125 // Convert to sign-magnitude and scale by 2 before we split the value.
126 var sign = (value < 0);
127 value = Math.abs(value) * 2;
129 jspb.utils.splitUint64(value);
133 // If the value is negative, subtract 1 from the split representation so we
157 * @param {number} value
159 jspb.utils.splitFloat32 = function(value) {
160 var sign = (value < 0) ? 1 : 0;
161 value = sign ? -value : value;
166 if (value === 0) {
167 if ((1 / value) > 0) {
180 if (isNaN(value)) {
187 if (value > jspb.BinaryConstants.FLOAT32_MAX) {
194 if (value < jspb.BinaryConstants.FLOAT32_MIN) {
196 mant = Math.round(value / Math.pow(2, -149));
202 exp = Math.floor(Math.log(value) / Math.LN2);
203 mant = value * Math.pow(2, -exp);
214 * @param {number} value
216 jspb.utils.splitFloat64 = function(value) {
217 var sign = (value < 0) ? 1 : 0;
218 value = sign ? -value : value;
221 if (value === 0) {
222 if ((1 / value) > 0) {
235 if (isNaN(value)) {
242 if (value > jspb.BinaryConstants.FLOAT64_MAX) {
249 if (value < jspb.BinaryConstants.FLOAT64_MIN) {
251 var mant = value / Math.pow(2, -1074);
259 // the value by repeadly dividing/multiplying by 2 until the magnitude
264 var x = value;
277 var mant = value * Math.pow(2, -exp);
349 * the result value, takes parameters (lowBits, highBits).
389 * the result value, takes parameters (lowBits, highBits).
532 // value in a digit at this step is representable as a 48-bit integer, which
575 // If we're treating the input as a signed value and the high bit is set, do
677 * @param {string} value The decimal string to convert.
679 jspb.utils.splitDecimalString = function(value) {
680 jspb.utils.splitHash64(jspb.utils.decimalStringToHash64(value));
769 * precision if the value is non-integral or greater than 2^64.
770 * @param {number} value The integer to convert.
773 jspb.utils.numberToHash64 = function(value) {
774 jspb.utils.splitInt64(value);
861 * @param {number} tag The tag value to count.
880 // Skip the value.
896 // Skip the value.