develooper Front page | perl.fwp | Postings from March 2002

Re: TPR1 post-mortem

Thread Previous | Thread Next
Marcelo E. Magallon
March 8, 2002 18:08
Re: TPR1 post-mortem
Message ID:
>> Adam Spiers <> writes:

 > >     Op(i=1..digits, C(i, digits)*digit[i])

 > "One step" for very unusual bindings of "one" ;-)

 Well, I mean it like:

    1234 -> 1 @ 3*2 @ 3*3 @ 4 -> 1

 where a @ b means the funky operation we all know already and a * b is
 usual multiplication.

 About this operation, I found it amusing that it's defined for all |N,
 it's closed, associative and commutative.  If you take 0 to be the
 identity, then there are no inverses for elements other than 0, if you
 take 9, 0 doesn't have an identity -- weird thing.

 > I'm just gutted that I had considered *1.1 and then rejected it as
 > being too much hassle to remove the two outer digits.  If only I'd
 > realised I could have done that in 3 extra characters!

 Well... you at least considered it.  When I saw that *1.11%10 I went
 "duh!".  I think the marks produced by keys on my forehead are still
 visible :-)


Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About