Bitcoin Forum
March 02, 2024, 02:20:43 PM *
News: Latest Bitcoin Core release: 26.0 [Torrent]
 
   Home   Help Search Login Register More  
Pages: [1]
  Print  
Author Topic: Decimal Places in Bitcoin?  (Read 1779 times)
BanditryAndLoot (OP)
Member
**
Offline Offline

Activity: 70
Merit: 10

Activity: 350


View Profile
November 29, 2014, 09: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

And it's only at the end of fall, that we discover it was naught but the wind that knew when one particular leaf was to fall from one particular tree, only to land in one distinct spot .. to be left for an eternity, and waste its time in a wait sublime. C0A2A1C4
1709389243
Hero Member
*
Offline Offline

Posts: 1709389243

View Profile Personal Message (Offline)

Ignore
1709389243
Reply with quote  #2

1709389243
Report to moderator
1709389243
Hero Member
*
Offline Offline

Posts: 1709389243

View Profile Personal Message (Offline)

Ignore
1709389243
Reply with quote  #2

1709389243
Report to moderator
1709389243
Hero Member
*
Offline Offline

Posts: 1709389243

View Profile Personal Message (Offline)

Ignore
1709389243
Reply with quote  #2

1709389243
Report to moderator
There are several different types of Bitcoin clients. The most secure are full nodes like Bitcoin Core, but full nodes are more resource-heavy, and they must do a lengthy initial syncing process. As a result, lightweight clients with somewhat less security are commonly used.
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction.
1709389243
Hero Member
*
Offline Offline

Posts: 1709389243

View Profile Personal Message (Offline)

Ignore
1709389243
Reply with quote  #2

1709389243
Report to moderator
1709389243
Hero Member
*
Offline Offline

Posts: 1709389243

View Profile Personal Message (Offline)

Ignore
1709389243
Reply with quote  #2

1709389243
Report to moderator
doge94
Sr. Member
****
Offline Offline

Activity: 349
Merit: 250


View Profile
November 29, 2014, 10: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.
JLynn171
Sr. Member
****
Offline Offline

Activity: 406
Merit: 250



View Profile
November 29, 2014, 10: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
tacotime
Legendary
*
Offline Offline

Activity: 1484
Merit: 1005



View Profile
November 29, 2014, 10: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.

Code:
XMR: 44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns
Cryddit
Legendary
*
Offline Offline

Activity: 924
Merit: 1111


View Profile
December 03, 2014, 04:37:44 AM
 #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. 
DannyHamilton
Legendary
*
Offline Offline

Activity: 3318
Merit: 4407



View Profile
December 03, 2014, 09: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?
tacotime
Legendary
*
Offline Offline

Activity: 1484
Merit: 1005



View Profile
December 03, 2014, 05: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.

Code:
XMR: 44GBHzv6ZyQdJkjqZje6KLZ3xSyN1hBSFAnLP6EAqJtCRVzMzZmeXTC2AHKDS9aEDTRKmo6a6o9r9j86pYfhCWDkKjbtcns
gmaxwell
Moderator
Legendary
*
expert
Offline Offline

Activity: 4144
Merit: 8335



View Profile WWW
December 05, 2014, 07: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.
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!