Thanks to visit codestin.com
Credit goes to github.com

Skip to content

The floats package provides types for handling multi-precision floating-point numbers.

License

Notifications You must be signed in to change notification settings

shogo82148/floats

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

760 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

floats

Go Reference test

The floats package provides types for handling multi-precision floating-point numbers.

SUPPORTED TYPES

Supported types are:

SYNOPSIS

package main

import (
  "fmt"

  "github.com/shogo82148/floats"
)

func main() {
  a := floats.NewFloat16(1.0)
  b := floats.NewFloat16(2.0)
  fmt.Printf("%g + %g = %g\n", a, b, a.Add(b))
  fmt.Printf("%g - %g = %g\n", a, b, a.Sub(b))
  fmt.Printf("%g * %g = %g\n", a, b, a.Mul(b))
  fmt.Printf("%g / %g = %g\n", a, b, a.Quo(b))
}

CORRECTNESS

The package passes tests generated by Berkeley TestFloat.

NOTICE

Some code has been developed with reference to Go's standard library and chewxy/math32. Please refer to the NOTICE for the copyright information of these libraries.

About

The floats package provides types for handling multi-precision floating-point numbers.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •