It is VERY common for an INFP to test INTP. Many MBTI tests have a bias towards Extroverted Feeling (Fe) in the questions which determine T/F, so INFPs may end up choosing the T answers. Look into the cognitive functions. INFPs use Fi (Introverted Feeling) as their dominant function and INTPs use Ti (Introverted Thinking). We both use Ne (Extroverted Intuition), which is where much of our similarity lies.
As you learn about the functions, you will also see that both Feeling functions (Fe & Fi) are RATIONAL. Feeling is a rational thought process that determines value. It is NOT emotion.
BTW, I am great at math and enjoy it. I've heard other INFPs say something similar. There are a lot of statistics which support that INFPs are often very book smart & score high on IQ tests, so being good at math does not seem strange to me.