REM => PX四舍五入的处理
967513
function(num){
        // 非法值默认处理为none
        if(config.rounding !== 'none' && !Math[config.rounding]){
            config.rounding = 'none'
        }

        return config.rounding === 'none' ?         
            parseInt((num*config.constant *100)/100) :
            (Math[config.rounding](num*config.constant *100)/100).toString().indexOf('.0') > -1 ? 
                // 如果结果后边有小数'.0'，直接取整，否则调用Math方法
                parseInt(Math[config.rounding](num*config.constant *100)/100):
                Math[config.rounding](num*config.constant *100)/100;
    }
966229
def crc16(cmd, use_byte=False):
    
    crc = 0xFFFF

    # crc16 计算方法, 需要使用 byte
    if hasattr(cmd, 'encode'):
        cmd = bytes.fromhex(cmd)

    for _ in cmd:
        c = _ & 0x00FF
        crc ^= c
        for i in range(8):
            if crc & 0x0001 > 0:
                crc >>= 1
                crc ^= 0xA001
            else:
                crc >>= 1

    # modbus crc16计算时,需要高/低位倒置
    t = [(crc & 0x00FF), (crc >> 8 & 0xFF)]
    crc = '%02X%02X' % (t[0], t[1])
    if use_byte:
        crc = bytes.fromhex(crc)
    return crc
331745
def _one_cycle_mult(areg, breg, rem_bits, sum_sf=0, curr_bit=0):
    
    if rem_bits == 0:
        return sum_sf
    else:
        a_curr_val = areg[curr_bit].sign_extended(len(breg))
        if curr_bit == 0:  # if no shift
            return(_one_cycle_mult(areg, breg, rem_bits-1,  # areg, breg, rem_bits
                                   sum_sf + (a_curr_val & breg),  # sum_sf
                                   curr_bit+1))  # curr_bit
        else:
            return _one_cycle_mult(
                areg, breg, rem_bits-1,  # areg, breg, rem_bits
                sum_sf + (a_curr_val &
                          pyrtl.concat(breg, pyrtl.Const(0, curr_bit))),  # sum_sf
                curr_bit+1  # curr_bit
            )
829043
function calcRdx(n, m) {
  var val = n > m ? n : m;
  return Math.pow(10,
                  17 - ~~(Math.log(((val > 0) ? val : -val)) * Math.LOG10E));
}
1311099
function () {
                    var value, c = input.charCodeAt(i);
                    if ((c > 57 || c < 45) || c === 47) return;

                    if (value = $(/^(-?\d*\.?\d+)(px|%|em|pc|ex|in|deg|s|ms|pt|cm|mm|rad|grad|turn|dpi|dpcm|dppx|rem|vw|vh|vmin|vm|ch)?/)) {
                        return new(tree.Dimension)(value[1], value[2]);
                    }
                }
1351315
function pnorm(qn) {
        var b = [1.570796288, 0.03706987906, -0.8364353589e-3,
                -0.2250947176e-3, 0.6841218299e-5, 0.5824238515e-5,
                -0.104527497e-5, 0.8360937017e-7, -0.3231081277e-8,
                0.3657763036e-10, 0.6936233982e-12],
            w1 = qn,
            w3 = -Math.log(4.0 * w1 * (1.0 - w1)),
            i = 1;

        if (qn < 0.0 || qn > 1.0) { return 0.0; }
        if (qn === 0.5) { return 0.0; }
        if (qn > 0.5) { w1 = 1.0 - w1; }

        w1 = b[0];
        for (i; i < 11; i++) {
            w1 += b[i] * Math.pow(w3, i);
        }

        if (qn > 0.5) { return Math.sqrt(w1 * w3); }

        return -Math.sqrt(w1 * w3);
    }
618847
function readMPInt(der, nm) {
	assert.strictEqual(der.peek(), asn1.Ber.Integer,
	    nm + ' is not an Integer');
	return (utils.mpNormalize(der.readString(asn1.Ber.Integer, true)));
}
678276
def pixels(self, value: int) -> 'Gap':
        """"""
        raise_not_number(value)
        self.gap = '{}px'.format(value)
        return self
631299
def rem_or(self, start, end, instr, target=None, include_beyond_target=False):
        
        assert(start >= 0 and end <= len(self.code) and start <= end)

        # Find all offsets of requested instructions
        instr_offsets = self.inst_matches(start, end, instr, target,
                                          include_beyond_target)
        # Get all POP_JUMP_IF_TRUE (or) offsets
        if self.version == 3.0:
            jump_true_op = self.opc.JUMP_IF_TRUE
        else:
            jump_true_op = self.opc.POP_JUMP_IF_TRUE
        pjit_offsets = self.inst_matches(start, end, jump_true_op)
        filtered = []
        for pjit_offset in pjit_offsets:
            pjit_tgt = self.get_target(pjit_offset) - 3
            for instr_offset in instr_offsets:
                if instr_offset <= pjit_offset or instr_offset >= pjit_tgt:
                    filtered.append(instr_offset)
            instr_offsets = filtered
            filtered = []
        return instr_offsets
255855
def dre_dm(self, pars):
        
        """
        self._set_parameters(pars)
        terms = self.num / self.denom
        result = - self.sigmai * terms

        return result
1096063
function Me(ct,pt,ut){// Remove trailing zeros.
for(var bt=1,ht=pt.length;!pt[--ht];pt.pop());// Calculate the base 10 exponent. First get the number of digits of c[0].
for(ht=pt[0];10<=ht;ht/=10,bt++);// Overflow?
return(ut=bt+ut*Pe-1)>Qe?ct.c=ct.e=null:ut<Ze?ct.c=[ct.e=0]:(ct.e=ut,ct.c=pt),ct}
698880
def getRectArea(*args):
    """"""
    rect = args[0]
    if len(args) > 1:
        unit = args[1]
    else:
        unit = "px"    
    u = {"px": (1,1), "in": (1.,72.), "cm": (2.54, 72.), "mm": (25.4, 72.)}
    f = (u[unit][0] / u[unit][1])**2
    return f * rect.width * rect.height
400497
private boolean MMM(float minX, float minY, float minZ, float maxX, float maxY, float maxZ) {
        return originX >= minX && originY >= minY && originZ >= minZ
            && s_xy * minX - maxY + c_xy <= 0.0f
            && s_yx * minY - maxX + c_yx <= 0.0f
            && s_zy * minZ - maxY + c_zy <= 0.0f
            && s_yz * minY - maxZ + c_yz <= 0.0f
            && s_xz * minX - maxZ + c_xz <= 0.0f
            && s_zx * minZ - maxX + c_zx <= 0.0f;
    }
584866
function(color, prc) {
		var num = parseInt(color, 16),
		    amt = Math.round(2.55 * prc),
		    R = (num >> 16) + amt,
		    G = (num >> 8 & 0x00FF) + amt,
		    B = (num & 0x0000FF) + amt;
		return (0x1000000 + (R < 255 ? R < 1 ? 0 : R : 255) * 0x10000 +
			(G < 255 ? G < 1 ? 0 : G : 255) * 0x100 +
			(B < 255 ? B < 1 ? 0 : B : 255))
			.toString(16)
			.slice(1);
	}
817965
def dre_dm(self, pars):
        
        """
        self._set_parameters(pars)
        numerator = -self.otc * (np.cos(self.ang) + self.otc)
        result = numerator / self.denom
        result *= self.rho0
        return result
442341
public static byte[] intToBytes(int num) {
        byte[] result = new byte[4];
        result[0] = (byte) (num >>> 24);//取最高8位放到0下标
        result[1] = (byte) (num >>> 16);//取次高8为放到1下标
        result[2] = (byte) (num >>> 8); //取次低8位放到2下标
        result[3] = (byte) (num); //取最低8位放到3下标
        return result;
    }
1049989
function(param) {
      var step, start, res;
      //如果无参数 当成是获取第一个元素
      if (!param || !(param = param.replace(/\s+/g, ""))) {
        return {
          start: 1,
          step: 0
        };
      }
      if (res = nthCache.get(param)) return res;
      // 对even odd等转化为标准的a，b组合(即step与start)
      if (param == "even") {
        start = 2;
        step = 2;
      } else if (param == "odd") {
        step = 2;
        start = 1;
      } else {
        res = param.match(nthValueReg);
        // 对错误的nth参数抛出错误
        if (!res) step = null; // 无论其他参数，如果step为null，则永远为false
        else {
          if (res[1]) {
            step = 0;
            start = parseInt(res[1]);
          } else {
            if (res[2] == "-") res[2] = "-1";
            step = res[2] ? parseInt(res[2]) : 1;
            start = res[3] ? parseInt(res[3]) : 0;
          }
        }
      }
      if (start < 1) {
        if (step < 1) {
          step = null; //标志false
        } else {
          start = -(-start) % step + step;
        }
      }
      return nthCache.set(param, {
        start: start,
        step: step
      });
    }