• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

source-academy / pynter / 29813236467
47%

Build:
DEFAULT BRANCH: master
Ran 21 Jul 2026 08:10AM UTC
Jobs 1
Files 16
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

21 Jul 2026 08:10AM UTC coverage: 47.41% (-27.5%) from 74.914%
29813236467

push

github

web-flow
Math builtin parity + list indexing/multiplication (py-slang #299) (#22)

* Implement missing math builtins, add domain-error checks, fix list indexing/multiplication

py-slang's parity test suite (yarn pynter:report) surfaced two categories of
gaps against py-slang's Python semantics:

1. Math builtins: py-slang's math_* stdlib additions (comb, factorial, gcd,
   isqrt, lcm, perm, fabs, fma, fmod, remainder, copysign, isfinite, isinf,
   isnan, ldexp, exp2, gamma, lgamma, radians, degrees, erf, erfc) had never
   been given a native primitive here, sitting at sivmfn_prim_unimpl stubs.
   Implemented all of them (float32/libm-backed, matching py-slang's own
   math.ts semantics for arg counts and int-vs-float type rejection).

   Separately, the math functions already implemented here (acos, acosh,
   asin, atanh, log, log1p, log2, log10, sqrt) never checked CPython's
   domain restrictions -- e.g. sqrtf(-1) silently returned NaN instead of
   raising. Added domain checks (careful to stay NaN-safe: a reject-style
   check like `x < 0.0f` is false for NaN, correctly leaving math.sqrt(nan)
   as nan rather than wrongly raising). Also added math_log's optional
   `base` argument, matching Python's two-arg math.log(x, base) form.

   New pynter_fault_value_error fault kind added for these (Python
   ValueError), mirroring the existing pynter_fault_type (TypeError) split.

2. List indexing/multiplication (py-slang issue #299): negative-index
   wraparound, out-of-range bounds checking, and bool/float index rejection
   were all missing from LDAG/STAG (pop_array_args in vm.c) -- a bool or
   float index was silently accepted, and out-of-range reads/writes neither
   raised nor auto-extended correctly. `list * int`/`int * list` had no
   implementation at all in op_mul_g/op_mul_f.

   The underlying blocker: STAG (array store) is used both for building
   list literals (relying on auto-grow from an empty array) and for real
   user subscript assignment (whic... (continued)

820 of 2027 branches covered (40.45%)

Branch coverage included in aggregate %.

23 of 211 new or added lines in 2 files covered. (10.9%)

720 existing lines in 10 files now uncovered.

1450 of 2761 relevant lines covered (52.52%)

4846989.77 hits per line

Uncovered Changes

Lines Coverage ∆ File
163
24.82
-55.35% vm/src/primitives.c
25
52.53
-8.03% vm/src/vm.c

Coverage Regressions

Lines Coverage ∆ File
623
24.82
-55.35% vm/src/primitives.c
36
52.53
-8.03% vm/src/vm.c
23
58.82
-13.87% vm/src/memory.c
9
73.6
-8.99% vm/include/pynter/heap_obj.h
8
81.94
-3.87% vm/include/pynter/heap.h
8
36.59
-34.15% vm/include/pynter/vm.h
7
67.02
-9.57% vm/src/main.c
2
83.15
-3.37% runner/src/runner.c
2
74.36
-3.42% vm/include/pynter/display.h
2
82.14
-5.36% vm/include/pynter/stack.h
Jobs
ID Job ID Ran Files Coverage
1 29813236467.1 21 Jul 2026 08:10AM UTC 16
47.41
GitHub Action Run
Source Files on build 29813236467
  • Tree
  • List 16
  • Changed 10
  • Source Changed 3
  • Coverage Changed 10
Coverage ∆ File Lines Relevant Covered Missed Hits/Line Branch Hits Branch Misses
  • Back to Repo
  • Github Actions Build #29813236467
  • 75623d48 on github
  • Prev Build on master (#29790333952)
  • Next Build on master (#29814033838)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc