The total oscillator energy is fixed by k and amplitude. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
Amplitude sets the total energy
With spring constant 2 newtons per metre and amplitude 4 metres, the checked total energy is 16 joules.
E=21kA2=21⋅2⋅42=16J
At the endpoint, the energy is stored in the spring
At position 4 metres, spring energy is 16 joules and kinetic energy is zero.