mirror of
https://github.com/gonum/gonum.git
synced 2025-10-25 00:00:24 +08:00
all: run gofmt and generate all packages
Changes made in dsp/fourier/internal/fftpack break the formatting used there, so these are reverted. There will be complaints in CI. [git-generate] gofmt -w . go generate gonum.org/v1/gonum/blas go generate gonum.org/v1/gonum/blas/gonum go generate gonum.org/v1/gonum/unit go generate gonum.org/v1/gonum/unit/constant go generate gonum.org/v1/gonum/graph/formats/dot go generate gonum.org/v1/gonum/graph/formats/rdf go generate gonum.org/v1/gonum/stat/card git checkout -- dsp/fourier/internal/fftpack
This commit is contained in:
@@ -23,7 +23,8 @@ const minNormalFloat64 = 0x1p-1022
|
||||
|
||||
// EqualWithinRel returns true when the difference between a and b
|
||||
// is not greater than tol times the greater absolute value of a and b,
|
||||
// abs(a-b) <= tol * max(abs(a), abs(b)).
|
||||
//
|
||||
// abs(a-b) <= tol * max(abs(a), abs(b)).
|
||||
func EqualWithinRel(a, b complex128, tol float64) bool {
|
||||
if a == b {
|
||||
return true
|
||||
@@ -61,9 +62,10 @@ func ParseWithNA(s, missing string) (value complex128, weight float64, err error
|
||||
// Round returns the half away from zero rounded value of x with prec precision.
|
||||
//
|
||||
// Special cases are:
|
||||
// Round(±0) = +0
|
||||
// Round(±Inf) = ±Inf
|
||||
// Round(NaN) = NaN
|
||||
//
|
||||
// Round(±0) = +0
|
||||
// Round(±Inf) = ±Inf
|
||||
// Round(NaN) = NaN
|
||||
func Round(x complex128, prec int) complex128 {
|
||||
if x == 0 {
|
||||
// Make sure zero is returned
|
||||
@@ -76,9 +78,10 @@ func Round(x complex128, prec int) complex128 {
|
||||
// RoundEven returns the half even rounded value of x with prec precision.
|
||||
//
|
||||
// Special cases are:
|
||||
// RoundEven(±0) = +0
|
||||
// RoundEven(±Inf) = ±Inf
|
||||
// RoundEven(NaN) = NaN
|
||||
//
|
||||
// RoundEven(±0) = +0
|
||||
// RoundEven(±Inf) = ±Inf
|
||||
// RoundEven(NaN) = NaN
|
||||
func RoundEven(x complex128, prec int) complex128 {
|
||||
if x == 0 {
|
||||
// Make sure zero is returned
|
||||
|
||||
Reference in New Issue
Block a user