# pow(x,y)



## aj47 (Apr 1, 2015)

_#16. Grab the nearest book to you and turn to page 129. Use the last word of the fourth paragraph as the title of your poem.

I grabbed my C++ textbook._

pow(x,y)

You can create a function to relate
the value of x raised to power y.
One clever way to exponentiate
is to repeat a simple multiply.

If y is zero, just return a one--
for ev'ry number, that will be the case.
And when y equals one, your work is done--
the answer will be x, your starting base.

For ev'ry other value y can be,
just multiply by x, recursively.





​


----------



## RhythmOvPain (Apr 1, 2015)

I really like the way this is written.

A lot.


----------



## aj47 (Apr 1, 2015)

Phil Istine said:


> O dear.  Just noticed it should have been the LAST word.  Ho-hum.


It's the poem-a-day aspect that counts.


----------



## Thaumiel (Apr 1, 2015)

As much as I don't get along with C, I liked this a lot. If only my lecturer taught it like this


----------



## InstituteMan (Apr 3, 2015)

I love it: math geekery+programming geekery+poetry=win!

PS: Page 129, paragraph 4, last word gave me "water." Your word choice is better.


----------



## am_hammy (Apr 3, 2015)

I don't even like math and this is brilliant. I'd learn math if it was written in poetry form.

Lovely poem!!


----------



## dday9 (Jun 16, 2016)

I got a pretty big grin whenever I read this! My favorite piece of the poem is when you rhyme with the letter "y" by explaining an alternative to using the exponent operator, that was awesome!


----------



## lightInTheDark (Sep 27, 2016)

This made me smile


----------



## escorial (Sep 28, 2016)

dynamic as always..cool


----------



## polaroidcaesar (May 13, 2017)

Love it! I'm horrible at math but this really cool and inventive. Good job


----------

