user323: I am currently working with a number of altcoins and and I need to support deposits and withdrawals in currencies with very large coin number cap like Dogecoin. I am wondering whether the Bitcoin Core client that is the basis for such altcoin clients supports such high denomination currencies internally and in its API (for example, when calling getbalance can it display balances of 10^12 coins with a precision of 1 satoshi?), or is there a limit to the precision used?

user15779: As Gracchus said, Bitcoin internally uses 64bit integers. Bitcoin's JSON interface on the other hand uses doubles, which give only 52 bit precision. Both types are big enough for bitcoin (double only for data exchange, the precision of doubles is not enough for actual calculations).
In the specific case of Dogecoin, the precision of the JSON interface (and parts of the GUI) is a known problem which we hope to fix in the future. Handling values in the range of hundreeds of million of dogecoin suffers from this currently.
The internally used 64bit integers are also a problem for Dogecoin which is being tracked. This is mostly a problem if anyone ever accumulates at leastn 2^64 Koinu (Satoshi) in a single wallet. This problem should be limited to the wallet, on the protocol level the size of transactions is limited to 10 billion doge.
I don't know how other coins handle this. There's at least one coin out there which supports arbitrary precision, but I forgot its name.

user-1: It appears as if the official client is using qint64, so there will be no resolution past the decimal point.  The max value is bigger than Bitcoin's expected max.
Just use the same data types as the coins in question, and you should be ok.
You could use arbitrary precision for microbalances in your own app, but you won't be able to transfer them on the official blockchain.  Others might support arbitrary precision, but I haven't seen one yet that does.

323: <p>I am currently working with a number of altcoins and and I need to support deposits and withdrawals in currencies with very large coin number cap like Dogecoin. I am wondering whether the Bitcoin Core client that is the basis for such altcoin clients supports such high denomination currencies internally and in its API (for example, when calling <code>getbalance</code> can it display balances of 10^12 coins with a precision of 1 satoshi?), or is there a limit to the precision used?</p>
 15779: <p>As Gracchus said, Bitcoin internally uses 64bit integers. Bitcoin's JSON interface on the other hand uses doubles, which give only 52 bit precision. Both types are big enough for bitcoin (double only for data exchange, the precision of doubles is not enough for actual calculations).</p>

<p>In the specific case of Dogecoin, the precision of the JSON interface (and parts of the GUI) is a known problem which we hope to fix in the future. Handling values in the range of hundreeds of million of dogecoin suffers from this currently.</p>

<p>The internally used 64bit integers are also a problem for Dogecoin which is being tracked. This is mostly a problem if anyone ever accumulates at leastn 2^64 Koinu (Satoshi) in a single wallet. This problem should be limited to the wallet, on the protocol level the size of transactions is limited to 10 billion doge.</p>

<p>I don't know how other coins handle this. There's at least one coin out there which supports arbitrary precision, but I forgot its name.</p>
 -1: <p>It <a href="https://github.com/bitcoin/bitcoin/search?q=balance&amp;type=Code" rel="nofollow">appears</a> as if the official client is using <code>qint64</code>, so there will be no resolution past the decimal point.  <a href="http://www.qtcentre.org/threads/33547-Max-and-Min-Values-for-qint64" rel="nofollow">The max value</a> is bigger than Bitcoin's expected max.</p>

<p>Just use the same data types as the coins in question, and you should be ok.</p>

<p>You could use arbitrary precision for microbalances in your own app, but you won't be able to transfer them on the official blockchain.  Others might support arbitrary precision, but I haven't seen one yet that does.</p>
