Skip to content

Commit 6f0d783

Browse files
committed
Release v1.0.0
1 parent 3fd03af commit 6f0d783

6 files changed

Lines changed: 229 additions & 0 deletions

File tree

.github/workflows/build.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
---
2+
# Github Actions build for swift
3+
# -*- compile-command: "yamllint -f parsable build.yml" -*-
4+
5+
name: build
6+
7+
# Trigger the workflow on push or pull request
8+
on:
9+
push:
10+
branches:
11+
- '*'
12+
tags:
13+
- '*'
14+
pull_request:
15+
workflow_dispatch:
16+
inputs:
17+
manual:
18+
required: true
19+
default: true
20+
21+
jobs:
22+
build:
23+
if: ${{ github.repository == 'ncw/find_arctan_formulae' || github.event.inputs.manual }}
24+
timeout-minutes: 60
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
job_name: ['go1.23', 'go1.22']
29+
30+
include:
31+
- job_name: go1.23
32+
os: ubuntu-latest
33+
go: '1.23.x'
34+
gotests: true
35+
integrationtest: true
36+
check: true
37+
38+
- job_name: go1.22
39+
os: ubuntu-latest
40+
go: '1.22.x'
41+
gotests: true
42+
integrationtest: true
43+
check: false
44+
45+
name: ${{ matrix.job_name }}
46+
47+
runs-on: ${{ matrix.os }}
48+
49+
steps:
50+
- name: Checkout
51+
uses: actions/checkout@v4
52+
with:
53+
fetch-depth: 0
54+
55+
- name: Install Go
56+
uses: actions/setup-go@v5
57+
with:
58+
go-version: ${{ matrix.go }}
59+
60+
- name: Print Go version and environment
61+
shell: bash
62+
run: |
63+
printf "Using go at: $(which go)\n"
64+
printf "Go version: $(go version)\n"
65+
printf "\n\nGo environment:\n\n"
66+
go env
67+
printf "\n\nSystem environment:\n\n"
68+
env
69+
70+
- name: Go module cache
71+
uses: actions/cache@v4
72+
with:
73+
path: |
74+
~/go/pkg/mod
75+
~/.cache/go-build
76+
~/.cache/golangci-lint
77+
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
78+
restore-keys: |
79+
${{ runner.os }}-go-
80+
81+
- name: Build
82+
shell: bash
83+
run: |
84+
go build ./...
85+
86+
- name: Unit tests
87+
shell: bash
88+
run: |
89+
go test -v
90+
if: matrix.gotests
91+
92+
- name: Regression tests
93+
shell: bash
94+
run: |
95+
go build -v
96+
./regression.sh
97+
if: matrix.gotests
98+
99+
- name: Code quality test
100+
uses: golangci/golangci-lint-action@v6
101+
with:
102+
version: latest
103+
if: matrix.check

.github/workflows/goreleaser.yaml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: goreleaser
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
push:
7+
8+
permissions:
9+
contents: write
10+
11+
jobs:
12+
goreleaser:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Set Vars
16+
if: ${{ !startsWith(github.ref, 'refs/tags/v') }}
17+
run: echo "GORELEASER_FLAGS=--snapshot" >> $GITHUB_ENV
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Set up Go
23+
uses: actions/setup-go@v5
24+
- name: Run GoReleaser
25+
uses: goreleaser/goreleaser-action@v6
26+
with:
27+
distribution: goreleaser
28+
version: '~> v2'
29+
args: release --clean ${{ env.GORELEASER_FLAGS }}
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
- name: Upload all builds
33+
uses: actions/upload-artifact@v4
34+
with:
35+
name: builds
36+
path: |
37+
dist/*.zip
38+
dist/*.txt
39+
dist/*.json

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,6 @@
44
*.test
55
*.prof
66
/find_arctan_formulae
7+
/dist/
78
_junk/
89

.goreleaser.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Release the Go binary
2+
version: 2
3+
4+
before:
5+
hooks:
6+
# You may remove this if you don't use go modules.
7+
- go mod download
8+
# you may remove this if you don't need go generate
9+
- go generate ./...
10+
builds:
11+
- env:
12+
- CGO_ENABLED=0
13+
goos:
14+
- linux
15+
- windows
16+
- darwin
17+
- freebsd
18+
- netbsd
19+
- openbsd
20+
goarch:
21+
- amd64
22+
- 386
23+
- arm
24+
- arm64
25+
archives:
26+
-
27+
format: zip
28+
files:
29+
- README.md
30+
- LICENSE
31+
- score_arctan.py
32+
name_template: >-
33+
{{- .ProjectName }}_
34+
{{- title .Os }}_
35+
{{- if eq .Arch "amd64" }}x86_64
36+
{{- else if eq .Arch "386" }}i386
37+
{{- else }}{{ .Arch }}{{ end }}
38+
{{- if .Arm }}v{{ .Arm }}{{ end -}}
39+
checksum:
40+
name_template: 'checksums.txt'
41+
snapshot:
42+
version_template: "{{ .Tag }}-beta"
43+
changelog:
44+
sort: asc
45+
filters:
46+
exclude:
47+
- '^docs:'
48+
- '^test:'

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,27 @@ A Go tool `find_arctan_relations` that searches for Machin‑style arctan formul
44

55
This reposistory also contains `score_arctan.py` which is used to process the log files generated by `find_arctan_relations`.
66

7+
There is an accompanying paper which explains how this program works which can be found on arXiv at https://arxiv.org/abs/2508.08307
8+
79
The full set of results found with this program are available at https://doi.org/10.5281/zenodo.16758216
810

911
The top results are available in the [results-by4-top.txt](results-by4-top.txt) and [results-by4-top.csv](results-by4-top.csv) files in this repository.
1012

13+
Here is an example of formulae found this this program which are the lowest known Lehmer measure relations with 5 and 6 terms.
14+
15+
```math
16+
\begin{alignat*}{2}
17+
\tfrac{\pi}{4} &= 29\,\arctan\left(\tfrac{1}{68}\right) &+& 42\,\arctan\left(\tfrac{1}{117}\right) \\
18+
& -15\,\arctan\left(\tfrac{1}{2675143}\right) &-& 5 \,\arctan\left(\tfrac{1}{2976163}\right) \\
19+
& -5\,\arctan\left(\tfrac{1}{302342643}\right) \\
20+
\lambda &= 1.4572 \\
21+
\tfrac{\pi}{4} &= 83\,\arctan\left(\tfrac{1}{107}\right) &+& 17\,\arctan\left(\tfrac{1}{1710}\right) \\
22+
& -44\,\arctan\left(\tfrac{1}{225443}\right) &-& 68\,\arctan\left(\tfrac{1}{2513489}\right) \\
23+
& +22\,\arctan\left(\tfrac{1}{42483057}\right) &+& 34\,\arctan\left(\tfrac{1}{7939642926390344818}\right) \\
24+
\lambda &= 1.3291
25+
\end{alignat*}
26+
```
27+
1128
## Features
1229

1330
- Groups primes (excluding 2) into combinations of configurable size.
@@ -32,6 +49,8 @@ The top results are available in the [results-by4-top.txt](results-by4-top.txt)
3249

3350
## Installation
3451

52+
Download [the latest release](https://github.com/ncw/find_arctan_formulae/releases/latest) or build from source:
53+
3554
```bash
3655
git clone https://github.com/ncw/find_arctan_formulae.git
3756
cd find_arctan_formulae

RELEASE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Making a release
2+
3+
Compile and test
4+
5+
Then run
6+
7+
goreleaser --clean --snapshot
8+
9+
To test the build
10+
11+
When happy, tag the release
12+
13+
git tag -s -m "Release v1.0.XX" v1.0.XX
14+
15+
Push to GitHub
16+
17+
git push --follow-tags origin
18+
19+
The github action should build the release

0 commit comments

Comments
 (0)