Exact numerical solution of the dispersion relation in relativistic backward-wave oscillator and relativistic travelling-wave tube filled with plasma