The sum of primes < n has been answered (though not asked, some book/paper references of this would be nice too) by @Eric Naslund here: What is the sum of the prime numbers up to a prime number $n$?

as

$$\sum_{p\leq x } \text{li}\left(x^{2}\right)+O\left(x^{2}e^{-c\sqrt{\log x}}\right),$$

I can see that $$\text{li}\left(x^{2}\right)$$ can be approximated using $$\operatorname{li}(x)\sim\frac{x}{\log(x)-1}$$ in which case as $$\ log(x^{2})=2log(x) $$

$$\operatorname{li}(x^{2})\sim\frac{x^{2}}{2log(x)}$$

so I can at least calculate numerically the first part correctly, but I am having difficulty with the big O part.

1) I want to calculate the big O numerically but,

2) I don't know what the c is or what to numerically put there.

3) Is the big O the maximum error (absolute) as the sum goes to infinity? or the growth rate of the error?

4) How would it calculate for me the error at say n=1000?