The short answer: No, sex differences in professions is not a good basis for judging the intelligence of males and females.
This question has already received flags to be closed. However, I think it should be left open particularly because it can be answered and I would like to address some of the assumptions and misconceptions in the question.
First, I would like to deconstruct the question, and then answer it.
Deconstructing the question
One of the earlier titles of the question was "Are men more intelligent than women?". It starts with the observation that there are more males who work in areas related to mathematics and programming, therefore males are more intelligent.
I think this is a common bias in humans. People know a lot about their area of expertise and then judge others by their lack of understanding of what they are experts in. To take a stereotypical example, perhaps a female clinical psychologist, doctor, or lawyer may wonder why so many males are mathematicians and programmers. She might think that this is because they lack the intelligence to function effectively in domains that require strong interpersonal skills. I am not defending this point of view either. I merely intend to highlight that to judge others by your own standards of what represents intelligence is problematic.
Answering the question
Have a read of page 91 of "Intelligence: Knowns and Unknowns", which represents the position of a large reputable APA task force of leading intelligence researchers. Summarising a huge literature, males tend to perform much better on visual-spatial intelligence test items such as mental rotation and tracking moving objects. Females often perform better on verbal abilities such as synonym generation and verbal fluency. Overall, there is minimal difference in full-scale IQ.
You could also have a read of Hide's (2005) summary of meta-analytic sex differences across a wide range of cognitive tests.
Here, the author advances a very different view, the gender
similarities hypothesis, which holds that males and females are
similar on most, but not all, psychological variables.
However, this only addresses mean differences, and there is certainly much greater differences within sexes than between.
- Neisser, U., Boodoo, G., Bouchard Jr, T. J., Boykin, A. W., Brody, N., Ceci, S. J., ... & Urbina, S. (1996). Intelligence: Knowns and unknowns. American psychologist, 51(2), 77. PDF
- Hyde, J. S. (2005). The gender similarities hypothesis. American psychologist, 60(6), 581. PDF