// Lchoose returns math.Log(Choose(n, k)).
337654
func Lchoose(n, k int) float64 {
	if k == 0 || k == n {
		return 0
	}
	if k < 0 || n < k {
		return math.NaN()
	}
	return lchoose(n, k)
}
652341
func (db *DB) LClear(key []byte) (int64, error) {
	if err := checkKeySize(key); err != nil {
		return 0, err
	}

	t := db.listBatch
	t.Lock()
	defer t.Unlock()

	num := db.lDelete(t, key)
	db.rmExpire(t, ListType, key)

	err := t.Commit()
	return num, err
}
1043374
func (q *Quadtree) FindKNearest(p *geo.Point, k int, maxDistance ...float64) []geo.Pointer {
	return q.FindKNearestMatching(p, k, nil, maxDistance...)
}
1159197
func Verbose(verbose bool) Option {
	return func(c *Client) error {
		c.verbose = verbose
		return nil
	}
}
163240
func SwilkCoeffs(n int) []float64 {

	a := make([]float64, n+1)

	an := float64(n)

	n2 := n / 2

	if n == 3 {
		a[1] = sqrth
	} else {
		an25 := an + 0.25
		summ2 := 0.0
		for i := 1; i <= n2; i++ {
			a[i] = ppnd((float64(i) - th) / an25)
			summ2 += a[i] * a[i]
		}
		summ2 *= 2.0
		ssumm2 := math.Sqrt(summ2)
		rsn := 1.0 / math.Sqrt(an)
		a1 := poly(c1, 6, rsn) - a[1]/ssumm2

		// Normalize coefficients

		var i1 int
		var fac float64
		if n > 5 {
			i1 = 3
			a2 := -a[2]/ssumm2 + poly(c2, 6, rsn)
			fac = math.Sqrt((summ2 - 2.0*a[1]*a[1] - 2.0*a[2]*a[2]) / (1.0 - 2.0*a1*a1 - 2.0*a2*a2))
			a[1] = a1
			a[2] = a2
		} else {
			i1 = 2
			fac = math.Sqrt((summ2 - 2.0*a[1]*a[1]) / (1.0 - 2.0*a1*a1))
			a[1] = a1
		}
		for i := i1; i <= n2; i++ {
			a[i] = -a[i] / fac
		}
	}

	return a
}
740543
func (u *Ugen) LCM(val Input) Input {
	return binOpLCM(u.Rate, u, val, u.NumOutputs)
}
1133456
func (log Logger) Logc(lvl Level, closure func() string) {
	log.intLogc(lvl, closure)
}
5624
func SetHook(hook Hook) {
	singltonLock.RLock()
	defer singltonLock.RUnlock()

	blog.SetHook(hook)
}
381236
func sortByHookWeight(hooks []*release.Hook) []*release.Hook {
	hs := newHookWeightSorter(hooks)
	sort.Sort(hs)
	return hs.hooks
}
536819
func (b *builtinCotSig) evalReal(row chunk.Row) (float64, bool, error) {
	val, isNull, err := b.args[0].EvalReal(b.ctx, row)
	if isNull || err != nil {
		return 0, isNull, err
	}

	tan := math.Tan(val)
	if tan != 0 {
		cot := 1 / tan
		if !math.IsInf(cot, 0) && !math.IsNaN(cot) {
			return cot, false, nil
		}
	}
	return 0, false, types.ErrOverflow.GenWithStackByArgs("DOUBLE", fmt.Sprintf("cot(%s)", strconv.FormatFloat(val, 'f', -1, 64)))
}
160398
func choose(n, k int) int {
	if k == 0 {
		return 1
	} else if n == 0 {
		return 0
	}
	result := float64(n - (k - 1))
	for i := 2; i <= k; i++ {
		result *= float64(n-(k-i)) / float64(i)
	}

	return int(result)
}
872994
func lcopy(src, dest string, info os.FileInfo) error {
	src, err := os.Readlink(src)
	if err != nil {
		return err
	}
	return os.Symlink(src, dest)
}
97142
func Lcm(vals []uint32) uint32 {
	out := vals[0]
	for i := 1; i < len(vals); i++ {
		max := Max(uint32(vals[i]), out)
		min := Min(uint32(vals[i]), out)
		r := max % min
		if r != 0 {
			for j := uint32(2); j <= min; j++ {
				if (j*max)%min == 0 {
					out = j * max
					break
				}
			}
		} else {
			out = max
		}
	}
	return out
}
523602
func SubtractWithNonNegativeResult(a corev1.ResourceList, b corev1.ResourceList) corev1.ResourceList {
	zero := resource.MustParse("0")

	result := corev1.ResourceList{}
	for key, value := range a {
		quantity := *value.Copy()
		if other, found := b[key]; found {
			quantity.Sub(other)
		}
		if quantity.Cmp(zero) > 0 {
			result[key] = quantity
		} else {
			result[key] = zero
		}
	}

	for key := range b {
		if _, found := result[key]; !found {
			result[key] = zero
		}
	}
	return result
}
1032711
func linearCounting(m int, V int) float64 {
	return float64(m) * math.Log(float64(m)/float64(V))
}
392852
func (schema *Schema) numberValue(v interface{}) *SchemaNumber {
	number := &SchemaNumber{}
	switch v := v.(type) {
	default:
		fmt.Printf("numberValue: unexpected type %T\n", v)
	case float64:
		v2 := float64(v)
		number.Float = &v2
		return number
	case float32:
		v2 := float64(v)
		number.Float = &v2
		return number
	case int:
		v2 := int64(v)
		number.Integer = &v2
	}
	return nil
}
41997
func golua_gchook(gostateindex uintptr, id uint) int {
	L1 := getGoState(gostateindex)
	L1.unregister(id)
	return 0
}