Skip to content

Commit

Permalink
Merge pull request #1 from ckormanyos/update_ci
Browse files Browse the repository at this point in the history
Update ci
  • Loading branch information
ckormanyos authored Aug 29, 2023
2 parents 1947cce + 294e005 commit 94f25a4
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 14 deletions.
15 changes: 9 additions & 6 deletions .github/workflows/gamma_f77.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,20 +48,23 @@ jobs:
strategy:
fail-fast: false
matrix:
compiler: [ g++-12 ]
compiler: [ g++-13 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: '0'
- name: update-tools
run: brew install gcc@12
- name: macos-native
run: brew reinstall gcc
- name: brew-installed-gcc-path
run: |
PATH="/usr/local/Cellar/gcc/13.1.0/bin:$PATH"
- name: g++-version
run: |
echo ""
echo Query the g++ version
${{ matrix.compiler }} -v
echo ""
${{ matrix.compiler }} -xf77 -O2 gamma.f -lgfortran -lquadmath -o gamma.exe
- name: macos-native
run: |
${{ matrix.compiler }} -x f77 -O2 gamma.f -lgfortran -lquadmath -o gamma.exe
ls -la gamma.exe
./gamma.exe | grep '0.947395504039301942134227647281424E+00'
./gamma.exe | grep '0.110784755653406415338349971053114E+01'
Expand Down
21 changes: 13 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ In this repository, the series calculation has been
expanded to $48$ terms having decimal precision of $51$ decimal digits
in order to reach quadruple precision (`REAL*16`).
For a list of coefficients, see the table-variable `G` in the
source code [gamma.f](./gamma.f).
source code [gamma.f](https://github.com/ckormanyos/gamma_f77/blob/main/gamma.f).

See also
[Wolfram Alpha(R)](https://www.wolframalpha.com/input?i=Series%5B1%2FGamma%5Bz%5D%2C+%7Bz%2C+0%2C+3%7D%5D)
Expand All @@ -71,24 +71,29 @@ Negative reflection is tested at

$$x=-4.56\text{.}$$

Integral-valued argument is checked for $\Gamma[18]$,
the result of which is expected to be equivalent
to the factorial $17!$.
Integral-valued argument is checked for

The program can also be compiled and executed at this
[short link](https://godbolt.org/z/Y3zdd6zd6)
to [godbolt](https://godbolt.org).
$$x=18\text{.}$$

in order to compute $\Gamma[18]$, the result of which
is expected to be equivalent to the integral factorial

$$17 ! = 355,687,428,096,000 \text{.}$$

CI runs on Ubuntu and MacOS using `g++`.
On these runners, the correct numerical results
are verified on OS-level to full $33$ decimal digit precision
using the program `grep`.

The program can also be compiled and executed at this
[short link](https://godbolt.org/z/Y3zdd6zd6)
to [godbolt](https://godbolt.org).

## Licensing and Original Implementation

The original Fortran77 version of this routine is copyrighted by
Shanjie Zhang and Jianming Jin. See also the subroutine `GAMMA`
in Section 3.1.5 pages 49-50 of [1].
in Section 3.1.5 on pages 49-50 of [1].

The program has been modified for this repository.
- Use the `gfortran` dialect that is available in `g++`.
Expand Down

0 comments on commit 94f25a4

Please sign in to comment.