You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: exponential_histogram.go
    path of file: ./repos/gotosocial/vendor/go.opentelemetry.io/otel/sdk/metric/internal/aggregate
    
    the code of the file until where you have to start completion: // Copyright The OpenTelemetry Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required b
    
func (p *expoHistogramDataPoint[N]) getBin(v float64) int {
	frac, exp := math.Frexp(v)
	if p.scale <= 0 {
		// Because of the choice of fraction is always 1 power of two higher than we want.
		correction := 1
		if frac == .5 {
			// If v is an exact power of two the frac will be .5 and the exp
			// will be one higher than we want.
			correction = 2
		}
		return (exp - correction) >> (-p.scale)
	}
	return exp<<p.scale + int(math.Log(frac)*scaleFactors[p.scale]) - 1
}