60 Commits

Author SHA1 Message Date
Sebastien Binet
ceaa7d4909 cmplxs,floats: fix testing.T.Errorf compilation error
This CL fixes the following compilation error while running 'go test':

```
Error: cmplxs/cmplxs_test.go:476:12: non-constant format string in call to (*testing.common).Errorf
```

Signed-off-by: Sebastien Binet <binet@cern.ch>
2025-09-21 14:15:33 +02:00
Dan Kortschak
bc349ecfab all: replace internal rand shim with math/rand/v2 2025-02-01 22:18:04 +10:30
Dan Kortschak
cf3307fa63 all: partially migrate to math/rand/v2
This is not intended to be a completed transition since it leaves the
libraries unusable to external client code, but rather as a step towards
use of math/rand/v2. This initial step allows repair of sequence change
failures without having to worry about API difference.
2025-02-01 22:18:04 +10:30
Dan Kortschak
affaa34094 all: fix doc comments identified by staticcheck
All complaints in mathext/internal are ignored, and an unfortunate naming
of methods in spatial/{r2,r3} is now permanent.
2024-04-23 17:11:29 +09:30
Jonathan Bluett-Duncan
b7b8c32778 floats: add deprecation warning to Reverse 2024-03-23 11:11:18 +10:30
Jonathan Bluett-Duncan
67ef7582e8 floats: add benchmarks for Reverse 2024-03-23 11:11:18 +10:30
Jonathan Bluett-Duncan
06535719e1 floats: replace custom reverse logic with slices.Reverse 2024-03-23 11:11:18 +10:30
Chris Nobody
45b800a8c6 all: add pkg.go.dev reference README badges
As discussed during the review of the immediately preceding changesets.
2023-03-16 06:40:50 +10:30
Chris Nobody
f040f6bd07 all: replace godoc.org README badges with godocs.io ones
The links have been redirecting to `pkg.go.dev` for a while now. In the
case of the main README, that made the badge a virtual duplicate of the
"go.dev reference" one.
2023-03-16 06:40:50 +10:30
Dan Kortschak
5f0141ca4c 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
2022-08-06 07:05:17 +09:30
Dan Kortschak
1a8a607b3c floats/scalar: make use of math.Round and math.RoundToEven 2022-03-05 17:33:45 +10:30
Dustin Spicuzza
3ace57a6f9 floats: add ArgsortStable function 2021-03-28 09:07:53 +10:30
Dan Kortschak
fa55f91ef9 floats: remove deprecated functions 2021-03-02 19:44:06 +10:30
Dan Kortschak
8d1ffe1e87 cmplxs,floats,internal/asm: don't use global rand state 2020-11-28 07:06:30 +10:30
Dan Kortschak
459f250b3d cmplxs,floats: harmonise docs and panic strings 2020-08-13 15:28:49 +09:30
Dan Kortschak
f3d13f45bc cmplxs/cscalar,floats/scalar: expand return value names 2020-08-07 07:59:02 +09:30
Dan Kortschak
91fb2f26fb cmplxs,floats: fix comments 2020-08-07 07:59:02 +09:30
Dan Kortschak
e205be025e cmplxs/cscalar,floats/scalar: fix comments and clarify implementation 2020-08-07 07:59:02 +09:30
Dan Kortschak
0e6fb8d22a all: use scalar.Same instead of local same function 2020-08-07 07:59:02 +09:30
Dan Kortschak
da72779e7a floats/scalar: new package containing non-vector functions from floats 2020-08-07 07:59:02 +09:30
Sebastien Binet
66aa83975b all: put examples into a xxx_test package clause
Fixes gonum/gonum#1395.
2020-07-13 12:01:16 +02:00
Dan Kortschak
6ded9ce79f floats: fix formatting and grammar 2020-06-08 18:43:06 +09:30
Roman Werpachowski
b88fa1fdc9 floats: add compensated summation using Neumaier's algorithm 2020-05-31 07:10:29 +09:30
Roman Werpachowski
be889500d8 floats: improve test coverage 2020-05-28 22:51:02 +09:30
Sebastien Binet
ba4c768325 floats: fix typo in Same documentation 2020-03-20 08:48:32 +01:00
Egon Elbre
8f4a280bc3 floats: make tests parallel 2020-03-16 16:10:59 +02:00
Chad Kunde
4e1ef9c972 translate netlib l2norm algorithm to asm and remove branches
Netlib algorithm reduces overflow while calculating the l2norm of a
vector.

Translated to asm while reducing branches in NaN and Inf checks.
Overflow protection is equivalent to the Netlib standard implementation.
2019-11-15 18:20:45 +08:00
Dan Kortschak
7e1144f373 floats: match Norm behaviour in Distance 2019-10-25 16:27:36 +10:30
Dan Kortschak
e2ba7f0950 internal/asm,blas,floats: move level 2 norm to asm
This allows sharing of the blas implementation with floats and opens the
possibility of an assembly implementation of this function.
2019-10-25 16:27:36 +10:30
Dan Kortschak
a4ad4d254f all: run go fmt ./... 2019-03-31 13:31:35 +10:30
Dan Kortschak
95e6ef1584 all: fix mispellings
Found by github.com/client9/misspell.
2019-01-27 20:31:48 +10:30
Brendan Tracey
004553317c floats: Implement ScaleTo (#765)
Fixes #737
2018-12-14 18:46:30 +00:00
Chad Kunde
cc0c958a30 floats,asm/f64: add asm routine for sum 2018-10-29 19:26:01 +10:30
Dan Kortschak
36be7e6faa travis: check for copyright headers 2018-09-05 16:54:43 +09:30
Francesc Campoy
46d1865d43 floats: use asm version of AddConst when available 2018-08-01 02:05:33 -07:00
Dan Kortschak
e558b37b29 floats: fix nearest, span and min/max index behaviours
* Fix nearest and span behaviours
* Fix max and min behaviour for NaN-containing slices
* Unexport exported test helpers
2018-02-25 13:57:12 +10:30
kortschak
39ce232e1a floats: fix Same for NaN/N 2018-01-31 07:26:30 +10:30
Dan Kortschak
95704fa00e floats: add functions for handling NaN payloads
This handles the simple case of ignoring sign and only dealing with
quiet NaN values since signalling NaN would require that we check that
at least one of the low bits was set and fail somehow if not.

Note that Go treats all NaNs as silent.
2017-11-20 20:20:44 +10:30
Dan Kortschak
790b7356e7 all: migrate to golang.org/x/exp/rand 2017-11-20 15:20:25 +10:30
kortschak
fa0c5aa7bc all: use golang.org/x/exp/rand instead of math/rand 2017-11-17 11:52:34 +10:30
kortschak
81f1289e48 all: run Go tip gofmt -s 2017-11-16 17:54:36 +10:30
kortschak
805531d142 all: change capitalization of gonum in license header 2017-11-02 06:54:08 +10:30
Janne Snabb
f01292bb52 floats: Fix Argsort documentation. 2017-09-02 17:53:34 +09:30
mewmew
7e53ef2fae all: use fixdocs tool to store package documentation in doc.go
Add copyright header to doc.go

Keep original comment style (e.g. line comments and block comments).

Fix doc comments containing multiple line comments.

Remove vanity imports from all files except doc.go.

Fixes #12.

The source code of fixdocs is located at:
https://play.golang.org/p/7RtYLzldsO
2017-08-16 14:26:00 +02:00
mewmew
ac48587c92 Revert "all: use fixdocs tool to store package documentation in doc.go"
This reverts commit b2982a3e50.
2017-08-16 14:21:05 +02:00
mewmew
b2982a3e50 all: use fixdocs tool to store package documentation in doc.go
Add copyright header to doc.go

Keep original comment style (e.g. line comments and block comments).

Fix doc comments containing multiple line comments.
2017-08-16 14:07:36 +02:00
mewmew
5b4711aa15 Revert "all: use fixdocs tool to store package documentation in doc.go"
This reverts commit b0a98102dc.
2017-08-16 14:07:17 +02:00
mewmew
b0a98102dc all: use fixdocs tool to store package documentation in doc.go
Add copyright header to doc.go

Keep original comment style (e.g. line comments and block comments).
2017-08-16 14:02:26 +02:00
mewmew
7eaea7c428 Revert "all: use fixdocs tool to store package documentation in doc.go"
This reverts commit 00292b2d57.
2017-08-16 14:01:36 +02:00
mewmew
00292b2d57 all: use fixdocs tool to store package documentation in doc.go
Add copyright header to doc.go
2017-08-16 13:56:50 +02:00