GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - ALTree/bigfloat: Additional operations for the standard library big.Float type

BranchesTags
Open more actions menu

Latest commit

 

History

106 Commits
106 Commits

Folders and files

NameName
Last commit message
Last commit date
.gitignore
.gitignore
 
 
LICENSE.md
LICENSE.md
 
 
README.md
README.md
 
 
exp.go
exp.go
 
 
exp_test.go
exp_test.go
 
 
go.mod
go.mod
 
 
log.go
log.go
 
 
log_test.go
log_test.go
 
 
misc.go
misc.go
 
 
misc_test.go
misc_test.go
 
 
pow.go
pow.go
 
 
pow_test.go
pow_test.go
 
 

Repository files navigation

Package bigfloat provides arbitrary-precision natural logarithm (Log), and exponentiation (Exp, and Pow) functions for the standard library's big.Float type.

GoDoc

Example

package main

import (
	"fmt"
	"math/big"

	"github.com/ALTree/bigfloat"
)

// We'll compute the value of the transcendental number 2^√2, also
// known as the Gelfond–Schneider constant, to 1000 bits.
func main() {
	const prec = 1000 // in binary digits
	two := big.NewFloat(2).SetPrec(prec)
	sqrtTwo := new(big.Float).SetPrec(prec).Sqrt(two)

	// Pow uses the first argument's precision.
	gsc := bigfloat.Pow(two, sqrtTwo) // 2^√2
	fmt.Printf("gsc = %.60f\n", gsc)
}

outputs:

gsc = 2.665144142690225188650297249873139848274211313714659492835980

Documentation

See https://godoc.org/github.com/ALTree/bigfloat

About

Additional operations for the standard library big.Float type

Resources

Readme
MIT license
Activity

Stars

26 stars

Watchers

7 watching

Forks

13 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.