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

mattwparas / steel / 18783850059 / 1
45%
master: 45%

Build:
DEFAULT BRANCH: master
Ran 24 Oct 2025 03:35PM UTC
Files 119
Run time 12s
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

24 Oct 2025 03:06PM UTC coverage: 49.847% (+6.2%) from 43.609%
18783850059.1

push

github

web-flow
implement the r7rs quotient and remainder procedures (#542)

* add <truncate/floor>-<quotient/remainder>

* move quotient and remainder code into the truncate-<op> definitions

while r7rs defines the quotient and remainder proceduers, it says, that
those are only "provided for backward compatibility" with r5rs, so i
think it makes sense to move the code into the canonical procedures.

i have decided against defining those as an actual alias for their
canonical versions, as i think those are the procedures people are more
likely to search for, making it valuable to find documentation
immediately.

* make modulo an alias for floor-remainder

* add the (euclidian-quotient) and (euclidian-remainder) procedures

these procedures are not actually part of the scheme spec, but they are
useful to have, are already provided by rust and the num crates and
there's no harm in adding them.

additionally mit-scheme also implements them.

* remainder/quotient/etc: don't crash on division by zero

before:

```
λ > (quotient 1 0)

thread 'main' (120257) panicked at crates/steel-core/src/primitives/numbers.rs:389:51:
attempt to divide by zero
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
```

after:

```
λ > (quotient 1 0)
error[E11]: Generic
  ┌─ :1:2
  │
1 │ (quotient 1 0)
  │  ^^^^^^^^ truncate-quotient: division by zero
```

* allow bigints in the quotient and remainder procedures

* allow inexact integers in the quotient and remainder procedures

* allow inexact integers in floor-quotient and floor-remainder

a little bit more work, as those are not already pre-defined, so add
those in a separate commit.

* add truncate/, floor/ and euclidean/

* add quotient and remainder tests

* don't panic on overflow in quotient and remainder procedures

before:

```
λ > (truncate-quotient -9223372036854775808 -1)

thread 'main' (250996) panicked at crates/steel-core/src/primitives/numbers.rs:395:51:
attempt to divide with overflow
note: run wit... (continued)

15513 of 31121 relevant lines covered (49.85%)

3388751.84 hits per line

Source Files on job 18783850059.1
  • Tree
  • List 119
  • Changed 91
  • Source Changed 0
  • Coverage Changed 91
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 18783850059
  • dae6f4f0 on github
  • Prev Job for on master (#18483448452.1)
  • Next Job for on master (#18783878359.1)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc