Skip to content

Define CS/applied-math feature track (excluding #1/#4) #3

Description

@sacchen

Define a focused CS/applied-math feature track for phil that strengthens terminal workflows without turning the project into a simulator platform.

Scope Boundary

This issue is for CS-facing math workflows outside dedicated number-theory and stats tracks.

Goal

Make phil a first-stop math tool for CS practitioners while preserving exactness, safety, and scriptability.

Proposed Scope (phased)

Phase 1 (high value)

  • Bit/number helpers: base conversion ergonomics, popcount/parity helpers.
  • Performance/back-of-envelope helpers suitable for terminal use.
  • Lightweight graph/discrete helpers for small examples.

Phase 2 (targeted depth)

  • Information theory basics (entropy/KL for discrete distributions).
  • Additional CS workflow helpers validated by user observations.

Product Constraints

  • Exact-first behavior where possible.
  • Explicit hint when numeric approximation is used.
  • Deterministic, pipe-friendly output.
  • No hidden semantics changes.

Acceptance Criteria

  • Initial CS helper set is documented and reachable from help commands.
  • High-value workflows have examples in one-shot and REPL contexts.
  • Errors retain actionable E: + hint: quality.
  • Tests cover behavior and output stability.

Non-Goals

  • No full algorithm/data-structure simulation engine.
  • No DB/OS emulation layer.
  • No graphing UI.

Test Gate

  • uv run --group dev pytest
  • uv run --group dev pytest --cov=calc --cov-report=term-missing --cov-fail-under=90

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions