I can think of 2 ways to do this, both are quite mathmatically simple.

First option is to add a random number to your target value.

target + (random(1) - 0.5) * (100 - precision)

For the above it assumes precision is in the range 0 to 100, and gives an output between target ± 100 and target ± 0. If you want 100% precision to not match exactly then you can do

I can think of 2 ways to do this, both are quite mathmatically simple.

First option is to add a random number to your target value.

target + (random(1) - 0.5) * (100 - precision)

For the above it assumes precision is in the range 0 to 100, and gives an output between target ± 100 and target ± 0. If you want 100% precision to not match exactly then you can do