Skip to content

v0.1.0

Choose a tag to compare

@rizukirr rizukirr released this 18 Aug 10:16
· 67 commits to main since this release
f3d30a7

First tagged release of libmuslim.

Three dependency-free single-header C libraries. Drop a file in, define one macro in one translation unit, done. No build system, no package manager, no runtime dependency beyond libm.

hijri.h        astronomical Hijri calendar, crescent visibility predicates
prayertimes.h  daily prayer times, 22 calculation methods
timezone.h     optional DST-aware offset resolution from the host tzdb

MIT licensed. Free for commercial use, with no further permission to seek from anyone.

Why 0.1.0 and not 1.0.0

Because nothing has ever been published, so 0.x is free to claim now and expensive later.

Under semver, 0.x means anything may change, and that is the accurate description of a library whose supported date range is not yet documented and whose authority policy layer does not exist. Removing hijri_find_conjunction() was free precisely because of the pre-1.0 window, and there is more API-shaped work queued behind it.

Tracked in #27, which also records what a real 1.0.0 would require.

What is actually validated

Every number below is measured and reproducible with make check, not asserted.

test_hijri                2503 checks    tabular roundtrip over 3,897,679 days
test_ephemeris_oracle     1157 checks    Moon lon 0.0051 deg, lat 0.0006 deg, dist 41.9 km
test_yallop_tn69           555 checks    271 real crescent observations
test_prayertimes           910 checks    published schedules, uniform 2 minute tolerance
test_prayertimes_oracle  14236 checks    max 6.5966 s against a DE440 validated solver
test_timezone              209 checks

The lunar and solar ephemerides are cross-checked against two independent oracles, JPL Horizons and Skyfield on JPL DE440, which agree with each other to 0.0000668 deg before any library figure is read from them.

Official published calendars are reproduced for:

  • Saudi Arabia, Umm al-Qura, 198 of 198 month starts
  • Indonesia, Kemenag MABIMS 2021, 33 of 37, never early
  • Indonesia, Muhammadiyah Wujudul Hilal, 12 of 12, for 1443 to 1446 H

Yallop's TN69 is validated against all 271 evening observations in Table 4, with a maximum q residual of 0.053577.

What is not

Stated plainly because a calculated result is not an observation.

  • Malaysia, Brunei and Singapore use the same MABIMS 2021 criterion but have no fixture behind them. Candidate fixtures were rejected for lack of a citable primary source.
  • Umm al-Qura reproduces by shipping the published table, not by computing it. Astronomical reconstruction reached 183 of 198, and 198 of 198 was proven unreachable from the published rule.
  • Muhammadiyah coverage stops at 1446 H. They moved to KHGT from 1447 H, which is a different criterion and is not implemented.
  • There is no authority policy layer. The library evaluates a criterion at one observer location. It does not aggregate across a nation, model itsbat, or weigh sighting testimony.
  • Egypt, Turkey, ECFR and FCNA/ISNA are research candidates, not planned APIs, pending primary specifications.
  • The supported date range is undocumented. The only range in the header is the span the ephemeris oracle covered.

Known issues

  • #51 dhuha returns NaN above roughly 62.5 degrees of latitude on days the Sun never reaches that altitude, with no error and no sentinel. Sunrise and dhuhr solve normally on those same days.
  • #52 Fajr and isha were refined without an oracle behind them. Isha moves up to 16 minutes at high latitude.
  • #47 Odeh has no observation-level validation, because Table VI is image-only.

Verification

make check exits 0 under gcc and clang at f3d30a7. It builds every header, test and example as strict C11 with -Wall -Wextra -Wpedantic, compiles all three headers as C++17, and regenerates the research baseline CSV and byte-compares it against the committed copy, so numerical drift fails the build.

Consumers