Author

Topic: Decimal Places in Bitcoin? (Read 1803 times)

staff
Activity: 4284
Merit: 8808
December 05, 2014, 02:24:22 PM
#8
There are other ways to check the sanity of your operations... In monero, uint64 is used for coin units instead.
It's it's possible to do this, but it becomes much harder to make correct, overflow and rounding error free computation of many formula. (e.g. more complexity for users of the system).  In Bitcoin the sum and product of any two values fits, naive comparison is safe, etc.
legendary
Activity: 1484
Merit: 1005
December 03, 2014, 12:15:58 PM
#7
Everything value in the reference client is a 64 bit signed integer, and as such are Satoshis, not Bitcoins. There is no actual thing in the blockchain called a Bitcoin, it's just what we use to represent 1e8 Satoshis.

Why on earth it's signed is beyond me.

It's signed to make it easier to check for the results of a subtraction being less than zero. 

There are other ways to check the sanity of your operations... In monero, uint64 is used for coin units instead.
legendary
Activity: 3472
Merit: 4801
December 03, 2014, 04:06:46 AM
#6
Everything value in the reference client is a 64 bit signed integer, and as such are Satoshis, not Bitcoins. There is no actual thing in the blockchain called a Bitcoin, it's just what we use to represent 1e8 Satoshis.

Why on earth it's signed is beyond me.

It's signed to make it easier to check for the results of a subtraction being less than zero. 

Subtraction?  When is there any subtraction in a bitcoin output value?
legendary
Activity: 924
Merit: 1132
December 02, 2014, 11:37:44 PM
#5
Everything value in the reference client is a 64 bit signed integer, and as such are Satoshis, not Bitcoins. There is no actual thing in the blockchain called a Bitcoin, it's just what we use to represent 1e8 Satoshis.

Why on earth it's signed is beyond me.

It's signed to make it easier to check for the results of a subtraction being less than zero. 
legendary
Activity: 1484
Merit: 1005
November 29, 2014, 05:19:37 PM
#4
Everything value in the reference client is a 64 bit signed integer, and as such are Satoshis, not Bitcoins. There is no actual thing in the blockchain called a Bitcoin, it's just what we use to represent 1e8 Satoshis.

Why on earth it's signed is beyond me.
sr. member
Activity: 406
Merit: 250
November 29, 2014, 05:19:13 PM
#3
I was reading this article here: http://insidebitcoins.com/news/bitcoin-foundation-seeks-standardization-of-the-bitcoin-experience/25414

They had this to say about the standardization for existing financial software:

Quote
Finally, the group hopes to develop ways to offer less confusion for the number of decimal places that are currently allowed in Bitcoin. For the average currency, a user only thinks about two decimal places. $1.52 is one dollar and fifty-two cents. But in Bitcoin, there are eight possible decimal places. Therefore, someone could note a value all the way out to 0.00000001 Bitcoin. That’s one hundred-millionth. For the average person, that is likely to be very confusing. And it’s a nightmare for accountants and financial software.

I was wondering if anyone could please help me understand how decimal places are handled in the Bitcoin source code, with regard to the length of the decimal place?

As far as the article goes .. would a solution be to just chop off anything below 100k satoshi, or would the total coin supply just be changed to 22,000,000,000,000.00 Bitcoins?

I tried reading through the wiki, and I can't really find a good description as to how that's handled.

Is there already a thread talking about this? Sorry if there is, please just point me to the link if you have it Smiley

I have gotten use to 1 satashi and the decimal place it takes up... i know that 100ksatashi is a mBTC and it is just eassy for me to keep up with the places as is already
sr. member
Activity: 349
Merit: 250
November 29, 2014, 05:15:14 PM
#2
In the C++ "satoshi" client the smallest unit of BTC is represented as an integer to avoid problems with floating point. So 1BTC is actually represented an integer with a value of 100 million.
member
Activity: 70
Merit: 10
Activity: 350
November 29, 2014, 04:56:07 PM
#1
I was reading this article here: http://insidebitcoins.com/news/bitcoin-foundation-seeks-standardization-of-the-bitcoin-experience/25414

They had this to say about the standardization for existing financial software:

Quote
Finally, the group hopes to develop ways to offer less confusion for the number of decimal places that are currently allowed in Bitcoin. For the average currency, a user only thinks about two decimal places. $1.52 is one dollar and fifty-two cents. But in Bitcoin, there are eight possible decimal places. Therefore, someone could note a value all the way out to 0.00000001 Bitcoin. That’s one hundred-millionth. For the average person, that is likely to be very confusing. And it’s a nightmare for accountants and financial software.

I was wondering if anyone could please help me understand how decimal places are handled in the Bitcoin source code, with regard to the length of the decimal place?

As far as the article goes .. would a solution be to just chop off anything below 100k satoshi, or would the total coin supply just be changed to 22,000,000,000,000.00 Bitcoins?

I tried reading through the wiki, and I can't really find a good description as to how that's handled.

Is there already a thread talking about this? Sorry if there is, please just point me to the link if you have it Smiley
Jump to: