I was extremely poor at maths as a child - actually, the poorest in the class, while at the same time way ahead of the others in reading and writing. However, as a teenager I did quite well at it. I think it was because I had a great maths teacher in high school who made the subject interesting for me for the first time, and like most people with AS/ADD, whether or not I can complete something depends a whole lot on whether I find it enjoyable or not!
I also found as a kid that being in a quiet environment helped me where maths was concerned. I think that in my case it wasn't so much that I was awful at maths (though it certainly looked and felt that way), but that maths required more concentration from me than other subjects did. Therefore, while I was able to cope in a noisy classroom environment for subjects I found easier, for maths I needed somewhere quiet where my concentration would not be interrupted. That's probably another reason my high school performance was better, as we were mostly graded on homework there.
I do think the environment can have quite an effect on people with ASDs, so check if anything going on around you is affecting your concentration.