Computing for research.
WHAT DISTINGUISHES IT
Correctness matters more than elegance Results must be reproducible Code frequently outlives its author's involvement Numerical accuracy is a first-class concern
WHAT FLOATING POINT MEANS
Numbers represented approximately, with finite precision.
WHAT THAT CAUSES
Results depending on operation order Accumulated error over many operations Catastrophic loss of precision when subtracting near-equal values
WHAT TO NEVER DO
Compare floating point values for exact equality.
WHAT TO USE INSTEAD
A tolerance appropriate to the magnitudes involved.
WHAT TO USE FOR NUMERICAL WORK
Established libraries, which handle these issues.
WHY
Naive implementations of standard algorithms are frequently numerically unstable.
WHAT REPRODUCIBILITY REQUIRES
Version-controlled code Pinned dependency versions Recorded parameters and random seeds Documented data provenance
WHAT TO AUTOMATE
The path from raw data to published figures.
WHY
So a correction regenerates everything correctly.
WHAT TO TEST
Against analytical solutions where they exist Against known results Conservation properties the physics requires
WHAT TO PUBLISH ALONGSIDE RESULTS
The code and the data, where permitted.