Bitcointalk Mobile
Bitcointalk Mobile
Bitcointalk Mobile
IRLBTC™
Preecs
Bitcoin Main
Support
Marketplace
Goods
Services
Service Ann.
Service Dis.
Exchange
Gambling
Lending
Securities
Auctions
Dev & Tech
Ecomomics
Trading
Mining
Project Dev
Meta
Digital Goods
Collectibles
Politics
Beginner Help
Off-topics
Serious
Archival
Altcoin Dis.
Altcoin Ann.
Mining Alt.
Alt Market
Speculation
العربية (Arabic)
Bahasa Indonesia
Español (Spanish)
中文 (Chinese)
Hrvatski (Croatian)
Deutsch (German)
Ελληνικά (Greek)
עברית (Hebrew)
Français
India
Italiano (Italian)
日本語 (Japanese)
Nederlands (Dutch)
Nigeria (Naija)
한국어 (Korean)
Pilipinas
Polski
Português (Portuguese)
Русский (Russian)
Română (Romanian)
Skandinavisk
Türkçe (Turkish)
Other languages
Go
>>
(p.1)
Author
Topic: Calculate total coins at height (Read 1134 times)
tcatm
(OP)
Sr. Member
Offline
Activity: 337
Merit: 285
Calculate total coins at height
April 05, 2011, 07:41:50 PM
Last edit: April 05, 2011, 11:30:25 PM by tcatm
#1
Hey,
here's some code that calculates the total number of bitcoins generated at a certain height:
Code:
def t(h):
return (sum([21e4*int(50e8/2**k) for k in xrange(int((h+1)/21e4))])+int(50e8/2**(int((h+1)/21e4)))*((h+1)-(int((h+1)/21e4))*21e4))/1e8
FatherMcGruder
Sr. Member
Offline
Activity: 322
Merit: 250
Re: Calculate total coins at height
April 05, 2011, 07:47:20 PM
#2
Use my
Trade Hill
referral code: TH-R11519
Check out
bitcoinity.org
and
Ripple
.
Shameless display of my bitcoin address:
1Hio4bqPUZnhr2SWi4WgsnVU1ph3EkusvH
ryepdx
Hero Member
Offline
Activity: 714
Merit: 500
Re: Calculate total coins at height
April 05, 2011, 08:41:12 PM
#3
Quote from: tcatm on April 05, 2011, 07:41:50 PM
Hey,
here's some code that calculates the total number of bitcoins generated at a certain height:
Code:
def t(h):
return sum([21e4*int(50e8/2**k) for k in xrange(int((h+1)/21e4))])+int(50e8/2**(int((h+1)/21e4)))*((h+1)-(int((h+1)/21e4))*21e4)/1e8
Very clever...
Pages: [
1
]
Print
Page 1
Viewing Page: 1
IRLBTC™ © 2025 IRLBTC.com