(I realised this is also incorrect: it needs to be `if x != 0.0 { modifications.push(x) }` rather than the unguarded `.push`.)