Perl Monk, Perl Meditation | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Well, I was guilty of doing something similar about a year ago. A friend asked one evening if it was possible to calculate the compound rate of interest in perl, and I whipped up a program that output a plausible result after 30 years given a certain rate of interest. (Actually I think it was in reverse, given a certain end sum, but anyway)
I had however never used the exponentiation operator in perl (**) and accidentally used the one in Hypertalk (^). This meant that my program made a bit-wise XOR instead of a rate of interest for each year. It alll become clear when we printed the increase in wealth per annum, which was kind of jerky, to say the least :-) /jeorgen In reply to RE: There's more than one way to do it . . . by accident
by jeorgen
|
|