lib/dtrace-async.js
/*
 * JS implementation of DTRACE_QUANTIZE_BUCKETVAL() macro.
 */
JS implementation of DTRACE_QUANTIZE_BUCKETVAL() macro.
JS implementation of DTRACE_QUANTIZE_BUCKETVAL () macro .
function quantizeBucketval(bi)
{
	if (bi < dtc_conf.DTRACE_QUANTIZE_ZEROBUCKET)
		return (-Math.pow(2,
		    (dtc_conf.DTRACE_QUANTIZE_ZEROBUCKET - 1 - bi)));
	if (bi == dtc_conf.DTRACE_QUANTIZE_ZEROBUCKET)
		return (0);
	return (Math.pow(2, (bi - dtc_conf.DTRACE_QUANTIZE_ZEROBUCKET - 1)));
}
function quantizeBucketval ( bi ) { if ( bi < dtc_conf . DTRACE_QUANTIZE_ZEROBUCKET ) return ( - Math . pow ( 2 , ( dtc_conf . DTRACE_QUANTIZE_ZEROBUCKET - 1 - bi ) ) ) ; if ( bi == dtc_conf . DTRACE_QUANTIZE_ZEROBUCKET ) return ( 0 ) ; return ( Math . pow ( 2 , ( bi - dtc_conf . DTRACE_QUANTIZE_ZEROBUCKET - 1 ) ) ) ; }
JS implementation of DTRACE_QUANTIZE_BUCKETVAL() macro.
JS implementation of DTRACE_QUANTIZE_BUCKETVAL () macro .
/*
	 * There aren't enough bits in JavaScript numbers for shifting to do the
	 * right thing.  Math.pow() is pretty slow, but we're only doing this
	 * once in the entire program lifetime.
	 */