#Floating Point
2 articles
Workflow

Silent Video and WAV Match, but MP4 Rounds to Milliseconds
A silent video with 203 frames at 24 fps and a WAV with 406,000 samples at 48 kHz have exactly the same duration, but an MP4 written by ffmpeg with movie timescale 1000 stores its duration in integer milliseconds. I fixed this with timescale 48000 and compared durations using Fraction before handing over the files.

Porting Excel Formulas to the Web: Floating-Point Traps
Porting engineering formulas from an Excel file to a web calculator produced differences around 1e-13 — not a math bug, but differences in how JS and Excel evaluate floating-point powers and multiplication order, with a method for reading formulas and values separately using openpyxl and building fixtures that actually catch regressions.