Programming and the ECDSA equation
The magic phrase on that page is in a finite field.  Here the finite field is the integers mod p, where p is the number 2256 - 232 - 29 - 28 - 27 - 26 - 24 - 1 (see here).  So all the arithmetic in your equations isn't ordinary arithmetic of integers or real numbers; it needs to be done mod p.   See http://en.wikipedia.org/wiki/Modular_arithmetic.  For addition, subtraction and multiplication, you can use ordinary integer arithmetic and compute the remainder mod p at the end.  For division, you will need something like the extended Euclidean algorithm.  Of course, you will also need to be using arbitrary precision arithmetic if you are not already, since numbers of this size are much too large for standard C++ types like long int and double.