The full name of pow is blockchain
what is Ethereum:
Ethereum is an innovation based on the application of technologies and concepts in bitcoin to computers. Ethereum itself imitates a lot of bitcoin technology to maintain the computer platform. blockchain technology is one of them
Ethereum platform can safely run any program users want
advantages of Ethereum over other competitive currencies before Ethereum appeared, some digital currencies imitated bitcoin. However, these projects have their own shortcomings, they can only support one or several specific applications at the same time< However, the reason why Ethereum can surpass the limitations of these projects in the past is because of the core idea of Ethereum
what Ethereum wants to implement is a blockchain protocol with built-in programming language. Since it supports programming language, in theory, any blockchain application can be defined with this language, and then run on Ethereum's blockchain protocol as an application
The design of Ethereum is very flexible and adaptable
Ethereum target sets the advantages of blockchain technology, in order to add the advantages of blockchain, such as decentralization, openness and security, to almost all computing fields
blockchain applications of Ethereum
Ethereum has many blockchain applications, such as digital applications of gold and stocks, financial derivatives applications, DNS and digital authentication, etc
Ethereum has achieved more than 100 blockchain applications by many start-ups
Ethereum has also been closely watched by some financial institutions, banking consortia (such as R3), as well as large companies like Samsung, Deloitte, RWE and IBM. As a result, a number of blockchain applications such as simplified and automated financial transactions, merchant loyalty index tracking, and gift cards designed to achieve decentralization of electronic transactions have emerged
the relationship between Ethereum and blockchain:
Ethereum is a programmable blockchain
Ethereum does not give users a series of preset operations (such as bitcoin transaction), but allows users to create complex operations according to their own wishes
in this way, Ethereum can be used as a platform for various types of decentralized blockchain applications, including but not limited to cryptocurrency
like other blockchains, Ethereum also has a peer-to-peer network protocol. Ethereum blockchain database is maintained and updated by many nodes connected to the network. Each network node runs the Ethereum simulator and executes the same instructions. Therefore, people sometimes call Ethereum "world computer"
POW: full name of proof of work
pos: proof of stake
both of them are the consensus mechanism of blockchain and the bookkeeping method of digital currency
the difference is:
1. POW mechanism: workload proof mechanism, that is, the proof of workload, is the requirement that must be met when generating a new transaction information (that is, a new block) to be added to the blockchain. In the blockchain network based on workload proof mechanism, the ability of nodes to obtain the correct numerical solution to generate blocks by calculating the numerical solution of random hash hash is the specific performance of node computing power
POS mechanism: the proof of rights and interests requires the certifier to provide a certain amount of ownership of cryptocurrency. The operation mode of the proof of rights and interests mechanism is that when creating a new block, the miners need to create a "currency right" transaction, and the transaction will send some coins to the miners themselves according to the preset proportion. According to the proportion and time of token owned by each node, the equity proof mechanism reces the mining difficulty of nodes proportionally according to the algorithm, so as to speed up the speed of searching for random numbersextended materials:
the concept of bitcoin was first proposed by Nakamoto in 2009. According to Nakamoto's ideas, the open source software and the P2P network on it were designed and released. Bitcoin is a kind of P2P digital currency. Point to point transmission means a decentralized payment system
unlike most currencies, bitcoin does not rely on specific currency institutions. It is generated by a large number of calculations based on specific algorithms. Bitcoin economy uses the distributed database composed of many nodes in the whole P2P network to confirm and record all transactions, and uses the design of cryptography to ensure the security of all aspects of currency circulation. The decentralized nature and algorithm of P2P can ensure that it is impossible to artificially manipulate the value of bitcoin through mass proction
What does this mean? That is to say, how much money you get depends on the effective work you contribute to mining. In other words, the better the performance of your computer, the more money you will be allocated. This is to allocate money according to your work certificate. Most virtual currencies, such as bitcoin, Leyte and Ruitai, are based on the pow mode (the higher the computing power and the longer the mining time, the more money you get)
pos: proof of stake
What does that mean? In short, it is a system to pay you interest according to the amount and time of currency you hold. In the POS mode of certificate of equity, there is a term called currency age. Each currency has one currency age every day. For example, if you hold 100 currencies for 30 days, then your currency age is 3000. At this time, if you find a POS block, Your currency age will be cleared to 0. Every time you are cleared 365 coins, you will get interest of 0.05 coins from the block (which can be understood as 5% annual interest rate). In this case, interest = 3000 * 5% / 365 = 0.41 coins, which is very interesting. Holding coins has interest, very good!
function prototype is double pow (double a, double B)
the math.h header should be included when using<
1, mathematical function editing in C / C + +
prototype: in TC2.0, the prototype is external float pow (float x, float y), In VC6.0, the prototype is double pow (double x, double y)
header file: math.h/cmath (in C + +)
function: calculate the Y power of X
return value: if x cannot be negative and Y is a decimal, or if x is 0 and Y is less than or equal to 0, the result of power exponent is returned
return type: double, int, float will give warning<
2, overload editing of pow functions
C + + provides the following overload forms of pow functions:
double pow (double x, int y)< br />float pow(float X,float Y);< br />float pow(float X,int Y);< br />long double pow(long double X,long double Y);< br />long double pow(long double X,int Y);
the parameter type should be set reasonably when using to avoid multiple "pow" instances matching the parameter list
among them, overloading is more likely to occur when using shapes such as:
int, x, y< br />int num=pow(X,Y);
this is a commonly used function, but the compiler will remind that there are multiple "pow" instances matching the parameter list
casts can be used to solve this problem: num = pow ((float) x, y);