numeric_util

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2016 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const ShiftStartInt64 byte = 0x20

Variables

This section is empty.

Functions

func Float64ToInt64

func Float64ToInt64(f float64) int64

func Int64ToFloat64

func Int64ToFloat64(i int64) float64

func ValidPrefixCodedTerm added in v0.4.0

func ValidPrefixCodedTerm(p string) (bool, int)

Types

type PrefixCoded

type PrefixCoded []byte

PrefixCoded is a byte array encoding of 64-bit numeric values shifted by 0-63 bits

func MustNewPrefixCodedInt64

func MustNewPrefixCodedInt64(in int64, shift uint) PrefixCoded

func NewPrefixCodedInt64

func NewPrefixCodedInt64(in int64, shift uint) (PrefixCoded, error)

func (PrefixCoded) Int64

func (p PrefixCoded) Int64() (int64, error)

func (PrefixCoded) Shift

func (p PrefixCoded) Shift() (uint, error)

Shift returns the number of bits shifted returns 0 if in uninitialized state

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL