in reply to Small Calculator!
A golf calculator? 29.
C:\test>perl -le"print eval while<>;" 2+2 4 3*5 15 $a=3**2+4 13 $a/2 6.5 (1+(2*3)+4)/($a%3) 11 ^Z C:\test>
Or with a Log10 function: 53. (Note: capital L)
C:\test>perl -le"sub Log{log(pop)/log(10)}print eval while<>;" Log(100) 2 10**2 100 Log(30)+log(40) 5.1660007088336 10**(Log(30)+Log(40)) 1200 exp(log(30)+log(40)) 1200
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Small Calculator!
by John M. Dlugosz (Monsignor) on Oct 04, 2002 at 21:07 UTC | |
by sauoq (Abbot) on Oct 05, 2002 at 07:46 UTC | |
by John M. Dlugosz (Monsignor) on Oct 07, 2002 at 14:48 UTC | |
by sauoq (Abbot) on Oct 07, 2002 at 19:41 UTC | |
by John M. Dlugosz (Monsignor) on Oct 07, 2002 at 20:09 UTC |