I'm using the code below to generate a new variable that is the unique id multiplies by 100. However, the result is not the correct value.

Code:
gen entryid=.
format entryid %12.0g
replace entryid=(ExternalReference * 100)
For instance ExternalReference 1000863 does not end up as 100086300, but rather 100086304

Does anyone know what could cause this?

Chris