How do you deal with numbers? Javascript doesn't do 64-bit numbers and naively multiplying 32-bit numbers can loose lower bits. If I remember right GWT used two numbers to represent 64-bit and ignored the 32-bit issue.
BigInts are the current solution. There are other solutions as well.