Im so slow....

Status
Not open for further replies.

AtomSoft

Well-Known Member
What is the world does this mean ?

2**wordPower

I know wordPower is 5 so what would be the answer and how ?

This is from HDL code... thanks in advance
 
I don't know HDL, but in many programming languages (e.g., FORTRAN, Python) a**b means to raise a to the power b, usually with floating point arithmetic.
 
Hi,

Geeze, i havent seen that notation for years now. That was one of the first symbols for 'raise to the power of' that was ever used. Today we use the carat symbol like:
2^32
 
Remember "FORTRAN"? I can't remember if Keypunch machines had the ^ symbol. I did use one. Yuk. That may be the reason for the double stars.
 
It may well be C that changed the ** as its acts as a double pointer in C as opposed to raise to the power... (I never used Fortran, C got in the way)
 
Note there is no standard, so you have to know what's going on in the environment you're working in. For example, in C, the pow() function in the standard library is used, as there is no operator built into the language for exponentiation (and ^ in C always has meant integer XOR). In FORTRAN, the ** meant exponentiation; it also does so in some modern languages like python. I'm with Mr Al in that I prefer to use the carat for exponentiation -- but I get myself into syntax trouble in some programming languages when I forget...
 
Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…