Skip to content

Pedagogy: reframe 00_introduction to motivation + floating-point hook #396

@kwlee2025cpp

Description

@kwlee2025cpp

Goal

Today 00_introduction/00_introduction.ipynb jumps straight into matplotlib plotting (sine wave) without explaining why learners would use computers to solve mathematical problems. As 06_python_advanced/ takes over the role of teaching libraries (numpy, matplotlib, pandas — see the meta restructure issue), 00_introduction becomes free to focus on motivation.

Scope — 00_introduction/00_introduction.ipynb

Rewrite as a motivational chapter:

  • Why use computers to solve math problems?
    • Repeatability and traceability of arithmetic
    • Scale (handle 10⁶ equations or 10⁹ data points; humans can't)
    • Iteration and parameter sweeps that would be impossible by hand
    • Visualization as a thinking tool, not just output
  • Brief tour of what nmisp covers (root finding → optimization → integration → ODE → linear algebra)
  • A small "hello world" scientific computation that's about the idea, not the syntax — e.g. show how an iterative algorithm converges, with the focus on the convergence story, not the matplotlib API

Scope — 00_introduction/10_floating_point.ipynb (lead-in update)

Lead with the killer motivating example:

2^64 - 1 ≈ 1.8 × 10^19 distinct values can be represented in 64 bits. The number of real numbers in [0, 1] is uncountably infinite. Therefore no finite encoding — including float64 — can represent all reals; what we get is a discrete, finite approximation. This is why 0.1 + 0.2 ≠ 0.3 is normal, not a bug.

The rest of 10_floating_point.ipynb (binary, two's complement, IEEE 754 layout, precision examples) flows naturally from there. No content removal — only re-ordering and an opening hook.

Why

  • Anchors the entire course in purpose rather than syntax.
  • The reals-are-uncountable hook gives a profound, memorable reason to be careful with floats — independent of any specific gotcha.
  • Frees 00_introduction from being a Python tutorial; that role moves to 03_python_basics and 06_python_advanced.

Out of scope

Acceptance

Metadata

Metadata

Assignees

No one assigned

    Labels

    pedagogyNotebook content / teaching changes

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions