Yes, I get 32 from my Windows calculator too.
I didn't want to say that XSLT was "wrong" to come up with something else because I remember some complaints from way back when XSLT was first designed. My recollection was that people who tried to write transformers in a language other than
Java claimed they were at a disadvantage because the spec said (essentially) that XSLT had to do arithmetic exactly as Java did it.
But now I can't find any evidence of that on the web. However, I'm pretty sure your theory about why XSLT gets the wrong answer for that calculation is right. Unfortunately I don't have any advice for you about how to get the right answer.