rustymath 0.1.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. rustymath-0.1.4/.cargo/config.toml +3 -0
  2. rustymath-0.1.4/.github/workflows/ci.yml +92 -0
  3. rustymath-0.1.4/.github/workflows/docs.yml +14 -0
  4. rustymath-0.1.4/.gitignore +19 -0
  5. rustymath-0.1.4/Cargo.lock +948 -0
  6. rustymath-0.1.4/Cargo.toml +59 -0
  7. rustymath-0.1.4/DEV.md +66 -0
  8. rustymath-0.1.4/LICENSE +202 -0
  9. rustymath-0.1.4/PKG-INFO +212 -0
  10. rustymath-0.1.4/README.md +188 -0
  11. rustymath-0.1.4/THIRD-PARTY.md +56 -0
  12. rustymath-0.1.4/nbs/_quarto.yml +27 -0
  13. rustymath-0.1.4/nbs/index.ipynb +282 -0
  14. rustymath-0.1.4/nbs/nbdev.yml +14 -0
  15. rustymath-0.1.4/nbs/sidebar.yml +4 -0
  16. rustymath-0.1.4/nbs/styles.css +26 -0
  17. rustymath-0.1.4/py/Cargo.toml +21 -0
  18. rustymath-0.1.4/py/build.rs +1 -0
  19. rustymath-0.1.4/py/src/distribution.rs +91 -0
  20. rustymath-0.1.4/py/src/lib.rs +180 -0
  21. rustymath-0.1.4/py/src/number_theory.rs +66 -0
  22. rustymath-0.1.4/py/src/polynomial.rs +62 -0
  23. rustymath-0.1.4/py/src/search.rs +45 -0
  24. rustymath-0.1.4/pyproject.toml +41 -0
  25. rustymath-0.1.4/python/rustymath/__init__.py +107 -0
  26. rustymath-0.1.4/python/rustymath/_modidx.py +8 -0
  27. rustymath-0.1.4/python/rustymath/polynomial.py +65 -0
  28. rustymath-0.1.4/src/accuracy.rs +470 -0
  29. rustymath-0.1.4/src/arc.rs +91 -0
  30. rustymath-0.1.4/src/dd.rs +58 -0
  31. rustymath-0.1.4/src/distribution.rs +786 -0
  32. rustymath-0.1.4/src/exp.rs +101 -0
  33. rustymath-0.1.4/src/float.rs +197 -0
  34. rustymath-0.1.4/src/hyperbolic.rs +81 -0
  35. rustymath-0.1.4/src/lib.md +94 -0
  36. rustymath-0.1.4/src/lib.rs +167 -0
  37. rustymath-0.1.4/src/ln.rs +124 -0
  38. rustymath-0.1.4/src/number_theory.rs +742 -0
  39. rustymath-0.1.4/src/polynomial.rs +145 -0
  40. rustymath-0.1.4/src/pow.rs +152 -0
  41. rustymath-0.1.4/src/search.rs +249 -0
  42. rustymath-0.1.4/src/special.rs +710 -0
  43. rustymath-0.1.4/src/table.rs +333 -0
  44. rustymath-0.1.4/src/tolerant.rs +454 -0
  45. rustymath-0.1.4/src/trig.rs +228 -0
  46. rustymath-0.1.4/testdata/arm.txt +1979 -0
  47. rustymath-0.1.4/testdata/compiler-builtins.txt +38 -0
  48. rustymath-0.1.4/testdata/core-math.txt +33827 -0
  49. rustymath-0.1.4/testdata/libc-test.txt +1076 -0
  50. rustymath-0.1.4/testdata/mpmath.txt +16759 -0
  51. rustymath-0.1.4/testdata/reduction.txt +113 -0
  52. rustymath-0.1.4/testdata/references.py +136 -0
  53. rustymath-0.1.4/tests/speed.rs +179 -0
  54. rustymath-0.1.4/tests/test_basic.py +82 -0
@@ -0,0 +1,3 @@
1
+ # Target AVX2-class x86-64 CPUs for vectorized maths kernels.
2
+ [target.'cfg(target_arch = "x86_64")']
3
+ rustflags = ["-C", "target-cpu=x86-64-v3"]
@@ -0,0 +1,92 @@
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ tags: ['v*']
7
+ pull_request:
8
+
9
+ permissions:
10
+ contents: read
11
+
12
+ jobs:
13
+ test-rust:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v7
17
+ - uses: dtolnay/rust-toolchain@stable
18
+ # The repository has no `Cargo.lock`. Creating one first makes rust-cache's key change when a dependency publishes a new version.
19
+ - run: cargo generate-lockfile
20
+ - uses: Swatinem/rust-cache@v2
21
+ - run: cargo test
22
+
23
+ test-python:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v7
27
+ - uses: dtolnay/rust-toolchain@stable
28
+ # The repository has no `Cargo.lock`. Creating one first makes rust-cache's key change when a dependency publishes a new version.
29
+ - run: cargo generate-lockfile
30
+ - uses: Swatinem/rust-cache@v2
31
+ - uses: actions/setup-python@v7
32
+ with:
33
+ python-version: '3.12'
34
+ - run: pip install -e '.[dev]'
35
+ - run: pytest -q
36
+ - run: nbdev-test
37
+
38
+ build:
39
+ needs: [test-rust, test-python]
40
+ strategy:
41
+ matrix:
42
+ os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
43
+ runs-on: ${{ matrix.os }}
44
+ steps:
45
+ - uses: actions/checkout@v7
46
+ - uses: PyO3/maturin-action@v1
47
+ with:
48
+ args: --profile dist --out dist -i python3.10 -i python3.11 -i python3.12 -i python3.13
49
+ manylinux: auto
50
+ - uses: actions/upload-artifact@v7
51
+ with:
52
+ name: wheels-${{ matrix.os }}
53
+ path: dist
54
+
55
+ sdist:
56
+ runs-on: ubuntu-latest
57
+ steps:
58
+ - uses: actions/checkout@v7
59
+ - uses: PyO3/maturin-action@v1
60
+ with:
61
+ command: sdist
62
+ args: -o dist
63
+ - uses: actions/upload-artifact@v7
64
+ with:
65
+ name: wheels-sdist
66
+ path: dist
67
+
68
+ publish:
69
+ if: startsWith(github.ref, 'refs/tags/v')
70
+ needs: [build, sdist]
71
+ runs-on: ubuntu-latest
72
+ permissions:
73
+ contents: write
74
+ id-token: write
75
+ steps:
76
+ - uses: actions/checkout@v7
77
+ - uses: dtolnay/rust-toolchain@stable
78
+ - id: auth
79
+ uses: rust-lang/crates-io-auth-action@v1
80
+ - run: cargo publish -p rustymath --no-verify
81
+ env:
82
+ CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
83
+ - uses: actions/download-artifact@v8
84
+ with:
85
+ pattern: wheels-*
86
+ path: dist
87
+ merge-multiple: true
88
+ - uses: softprops/action-gh-release@v3
89
+ with:
90
+ files: dist/*
91
+ generate_release_notes: true
92
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,14 @@
1
+ name: Deploy to GitHub Pages
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ workflow_dispatch:
8
+
9
+ jobs:
10
+ deploy:
11
+ name: Deploy to GitHub Pages
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: AnswerDotAI/workflows/quarto-ghp3@master
@@ -0,0 +1,19 @@
1
+ .last_checked
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.so
5
+ *.egg-info/
6
+ tags
7
+ target/
8
+ dist/
9
+ build/
10
+ .venv/
11
+ venv/
12
+ .env
13
+ .DS_Store
14
+ .ipynb_checkpoints/
15
+ Cargo.lock
16
+ links/
17
+ _proc/
18
+ _docs/
19
+ .quarto/