Home | History | Annotate | Download | only in binary

Lines Matching refs:arith

40 goog.provide('jspb.arith.Int64');
41 goog.provide('jspb.arith.UInt64');
53 jspb.arith.UInt64 = function(lo, hi) {
70 * @param {!jspb.arith.UInt64} other
73 jspb.arith.UInt64.prototype.cmp = function(other) {
86 * @return {!jspb.arith.UInt64}
88 jspb.arith.UInt64.prototype.rightShift = function() {
91 return new jspb.arith.UInt64(lo >>> 0, hi >>> 0);
97 * @return {!jspb.arith.UInt64}
99 jspb.arith.UInt64.prototype.leftShift = function() {
102 return new jspb.arith.UInt64(lo >>> 0, hi >>> 0);
110 jspb.arith.UInt64.prototype.msb = function() {
119 jspb.arith.UInt64.prototype.lsb = function() {
128 jspb.arith.UInt64.prototype.zero = function() {
135 * @param {!jspb.arith.UInt64} other
136 * @return {!jspb.arith.UInt64}
138 jspb.arith.UInt64.prototype.add = function(other) {
143 return new jspb.arith.UInt64(lo >>> 0, hi >>> 0);
149 * @param {!jspb.arith.UInt64} other
150 * @return {!jspb.arith.UInt64}
152 jspb.arith.UInt64.prototype.sub = function(other) {
157 return new jspb.arith.UInt64(lo >>> 0, hi >>> 0);
165 * @return {!jspb.arith.UInt64}
167 jspb.arith.UInt64.mul32x32 = function(a, b) {
198 return new jspb.arith.UInt64(productLow >>> 0, productHigh >>> 0);
206 * @return {!jspb.arith.UInt64}
208 jspb.arith.UInt64.prototype.mul = function(a) {
210 var lo = jspb.arith.UInt64.mul32x32(this.lo, a);
211 var hi = jspb.arith.UInt64.mul32x32(this.hi, a);
224 * @return {Array.<jspb.arith.UInt64>} array of [quotient, remainder],
227 jspb.arith.UInt64.prototype.div = function(_divisor) {
235 var quotient = new jspb.arith.UInt64(0, 0);
236 var remainder = new jspb.arith.UInt64(this.lo, this.hi);
237 var divisor = new jspb.arith.UInt64(_divisor, 0);
238 var unit = new jspb.arith.UInt64(1, 0);
268 jspb.arith.UInt64.prototype.toString = function() {
287 * @return {?jspb.arith.UInt64}
289 jspb.arith.UInt64.fromString = function(s) {
290 var result = new jspb.arith.UInt64(0, 0);
292 var digit64 = new jspb.arith.UInt64(0, 0);
307 * @return {!jspb.arith.UInt64}
309 jspb.arith.UInt64.prototype.clone = function() {
310 return new jspb.arith.UInt64(this.lo, this.hi);
328 jspb.arith.Int64 = function(lo, hi) {
344 * @param {!jspb.arith.Int64} other
345 * @return {!jspb.arith.Int64}
347 jspb.arith.Int64.prototype.add = function(other) {
352 return new jspb.arith.Int64(lo >>> 0, hi >>> 0);
358 * @param {!jspb.arith.Int64} other
359 * @return {!jspb.arith.Int64}
361 jspb.arith.Int64.prototype.sub = function(other) {
366 return new jspb.arith.Int64(lo >>> 0, hi >>> 0);
372 * @return {!jspb.arith.Int64}
374 jspb.arith.Int64.prototype.clone = function() {
375 return new jspb.arith.Int64(this.lo, this.hi);
384 jspb.arith.Int64.prototype.toString = function() {
387 var num = new jspb.arith.UInt64(this.lo, this.hi);
389 num = new jspb.arith.UInt64(0, 0).sub(num);
398 * @return {?jspb.arith.Int64}
400 jspb.arith.Int64.fromString = function(s) {
405 var num = jspb.arith.UInt64.fromString(s);
410 num = new jspb.arith.UInt64(0, 0).sub(num);
412 return new jspb.arith.Int64(num.lo, num.hi);