What is chain exponentiation in python | Sololearn: Learn to code for FREE!

+1

# What is chain exponentiation in python

7/5/2019 6:49:33 AM

Yogendra Singh

+8

Yogendra Singh Never heard of the term "chain exponentiation". Could you be more specific, provide info and in what context you heard it? But probably you are asking this val = 2 ** 3 ** 4 ** 5 i.e the result of one exponentiation is chained to other to calculate the final value. However remember that the above expression will be evaluated as val = (2 ** (3 ** (4 **5 ) ) ) instead of val = ((( 2 ** 3 ) ** 4) ** 5) due to right to left associativity (grouping) of exponentiation (**) operator

+3

Chain exponentiation examples: 2**3**2 = 2**(3**2) = 2**9 = 512 (2**3)**2 = 8**2 = 64 https://code.sololearn.com/ch5LmwUkqmf3/?ref=app

+2

that actually helped a lot, even if is a year and a couple months old

0

Pure sense says, that it is just 2 or more exponentation operators performed in row. For example: x**y**z 2**2**2**2 = 65536

0

HIGH FIRE hello

-2