- I place Logic within Mathematics and modal logic is a field of Logic,
and so of mathematics. You will find that modal logic comes up a lot
working with machines, programs, and all state based systems.
Just by way of personal orientation, I tend to follow Peirce and assorted classical sources in viewing logic as a normative science whereas mathematics is a hypothetical descriptive science. That gives a picture of their relationship like the one I drew in the following post.
Normative science rests largely on phenomenology and on mathematics;
metaphysics on phenomenology and on normative science.
❧ Charles Sanders Peirce • Collected Papers, CP 1.186 (1903)
Syllabus • Classification of Sciences (CP 1.180–202, G-1903-2b)
The way I see it, then, logic is more an application of mathematics than a subfield of it.