in reply to Golf: Magic Formula for Roman Numerals
can be improved tosub m1{1+4*y/VLD//.E.ord()x3%75%50%4}
sub m3{5**y/VLD//.E.ord()x3%75%50%4}
This is much longer than yours, but I thought I'd still mention it:
sub b0{(1e3,10,5,1,100,500,50)[ord()%87%7]}
Update: a new one that's only one character too long
sub b1{M1E3D500C100L50X10V5I1=~$_;$'}
|
---|
Replies are listed 'Best First'. | |
---|---|
Re^2: Golf: Magic Formula for Roman Numerals
by eyepopslikeamosquito (Archbishop) on Feb 18, 2007 at 12:29 UTC | |
by ambrus (Abbot) on Feb 18, 2007 at 12:56 UTC |
In Section
Meditations