6.1.2170 S>D “s-to-d” (CORE) ( n -- d ) Convert the number n to the double-cell number d with the same numerical value.
517131
function () {
            var t = this.dpop() | 0;
            var ttt = Long.fromInt(t);
            this.dpush(ttt.low);
            this.dpush(ttt.high);
        }
4615
static int hash(double d) {
		long bits = Double.doubleToLongBits(d);
		int hc = (int) (bits ^ (bits >>> 32));
		return hash(hc);
	}
770495
function (n, d, s) {
		var uses = typeof s !== 'undefined';
		var x = [];
		for (var i = 0; i < n; i++) {
			var xhere = [];
			for (var j = 0; j < d; j++) {
				if (uses) {
					xhere.push(s);
				} else {
					xhere.push(randn(0.0, 1e-4));
				}
			}
			x.push(xhere);
		}
		return x;
	}
1119633
function normalizeNumber(val) {
  var bits = howManyBits(val);
  var bytes = howManyBytes(val);
  var value;
  if(bits <= 32) {
    value = val;
  } else {
    value = _(bytes).times(function(idx) {
      var result = val % 256;
      val = Math.floor(val / 256);
      return result;
    }).reverse();
  } 
  return {
    value: value,
    bits:  (bits % 8),
    bytes: Math.floor(bits / 8)
  };
}
768321
def of number
      raise_on_type_mismatch number
      digits = convert_number_to_digits(number)

      INVERSE[digits.reverse_each.with_index.reduce(0) { |check, (digit, idx)|
        d_row = DIHEDRAL_GROUP_D5[check]
        d_row[ PERMUTATION[idx.next % 8][digit] ]
      }]
    end
957646
function NUMBER(m, d) {
    m = m || 10
    d = d || 0;
    if (!(this instanceof NUMBER)) {
        return new NUMBER(m, d);
    }
    this.sql = "DECIMAL(" + m + "," + d + ")";
}
707328
public static void encodeDesc(double value, byte[] dst, int dstOffset) {
        long bits = Double.doubleToLongBits(value);
        if (bits >= 0) {
            bits ^= 0x7fffffffffffffffL;
        }
        int w = (int)(bits >> 32);
        dst[dstOffset    ] = (byte)(w >> 24);
        dst[dstOffset + 1] = (byte)(w >> 16);
        dst[dstOffset + 2] = (byte)(w >> 8);
        dst[dstOffset + 3] = (byte)w;
        w = (int)bits;
        dst[dstOffset + 4] = (byte)(w >> 24);
        dst[dstOffset + 5] = (byte)(w >> 16);
        dst[dstOffset + 6] = (byte)(w >> 8);
        dst[dstOffset + 7] = (byte)w;
    }
214929
def mkIntDate(s):
    
    n = s.__len__()
    d = int(s[-(n - 1):n])

    return d
56903
def decimal_to_ratio(d):
    
    sign, digits, exp = d.as_tuple()
    if exp in ('F', 'n', 'N'):  # INF, NAN, sNAN
        assert not d.is_finite()
        raise ValueError
    num = 0
    for digit in digits:
        num = num * 10 + digit
    if sign:
        num = -num
    den = 10 ** -exp
    return (num, den)
5623
private static double doubleHighPart(double d) {
        if (d > -Precision.SAFE_MIN && d < Precision.SAFE_MIN){
            return d; // These are un-normalised - don't try to convert
        }
        long xl = Double.doubleToLongBits(d);
        xl = xl & MASK_30BITS; // Drop low order bits
        return Double.longBitsToDouble(xl);
    }
220395
public static String doubleToGoString(double d) {
    if (d == Double.POSITIVE_INFINITY) {
      return "+Inf";
    } 
    if (d == Double.NEGATIVE_INFINITY) {
      return "-Inf";
    }
    if (Double.isNaN(d)) {
      return "NaN";
    }
    return Double.toString(d);
  }
541820
def write_double(self, number):
        
        buf = pack(self.byte_order + "d", number)
        self.write(buf)
1038855
function convertOnes(num) {
  if (str(num).length > 1) {
    throw new Error("Must have at most 1 digit");
  }

  num = int(num);
  return mapOnes[num];
}
365080
function d2h(d, digits) {
  d = d.toString(16); 
  while (d.length < digits) {
		d = '0' + d;
	}
	  
  return d;
}
1088625
def number_to_dp(number: Optional[float],
                 dp: int,
                 default: Optional[str] = "",
                 en_dash_for_minus: bool = True) -> str:
    
    if number is None:
        return default
    if number == float("inf"):
        return u"∞"
    if number == float("-inf"):
        s = u"-∞"
    else:
        s = u"{:.{precision}f}".format(number, precision=dp)
    if en_dash_for_minus:
        s = s.replace("-", u"–")  # hyphen becomes en dash for minus sign
    return s
416100
function _convertRef2d($cell)
	{
//		$class = 2; // as far as I know, this is magick.

		// Convert the cell reference
		$cell_array = $this->_cellToPackedRowcol($cell);
		list($row, $col) = $cell_array;

		// The ptg value depends on the class of the ptg.
//		if ($class == 0) {
//			$ptgRef = pack("C", $this->ptg['ptgRef']);
//		} elseif ($class == 1) {
//			$ptgRef = pack("C", $this->ptg['ptgRefV']);
//		} elseif ($class == 2) {
			$ptgRef = pack("C", $this->ptg['ptgRefA']);
//		} else {
//			// TODO: use real error codes
//			throw new PHPExcel_Writer_Exception("Unknown class $class");
//		}
		return $ptgRef.$row.$col;
	}
1136434
public static double parseDouble(String s, double d) {
		if (s == null) {
			return d;
		}
		try {
			return Double.parseDouble(s.trim());
		} catch (NumberFormatException e) {
			return d;
		}
	}