Skip to content

Fixed Point Integers for Go

License

MIT, Unlicense licenses found

Licenses found

MIT
LICENSE-MIT
Unlicense
LICENSE-UNLICENSE
Notifications You must be signed in to change notification settings

ryanavella/fixed

Go Report Card License: MIT License: Unlicense

Fixed

Fixed point integers for Go.

The following fixed point representations are implemented:

  • int32_32

Fixed is free and open source software distributed under the terms of both the MIT License and the Unlicense.

Installing

go get github.com/ryanavella/fixed

Usage

package main

import (
	"fmt"

	"github.com/ryanavella/fixed/int32_32"
)

func main() {
	a := int32_32.FromInt32(-1)    // -1
	b := int32_32.FromFloat64(1.5) // +1.5
	fmt.Println(a+b, a-b, a.Mul(b))
}

Scope

This package is intended for efficient and fast computations (i.e. for scientific and mathematical applications). There are no plans to support applications which require constant-time cryptographic security.

Contributions

See contributor guidelines.

About

Fixed Point Integers for Go

Topics

Resources

License

MIT, Unlicense licenses found

Licenses found

MIT
LICENSE-MIT
Unlicense
LICENSE-UNLICENSE

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages