[Jprogramming] Morning Mystery
Rob Hodgkinson
rhodgkin at me.com
Thu Feb 25 11:17:05 UTC 2016
Perhaps Linda needs to clarify if all / any digits need to be used ?
%(+%)/15$1
0.618034
of if we can’t use a digit more than once …
%(+%)/23$1
0.618034
> On 25 Feb 2016, at 9:58 PM, Ric Sherlock <tikkanz at gmail.com> wrote:
>
> Nice!
> Continuing with the assumption that not all digits need to be used, the
> sentence can be further shortened to 17 chars
> %/({:,+/)^:(3*5)1
>
> 0.618034
>
>
>
>
> On Thu, Feb 25, 2016 at 10:25 PM, Ben Gorte - CITG <B.G.H.Gorte at tudelft.nl>
> wrote:
>
>> I noticed a golden ratio.
>>
>> %/({:,+/)^:(3*4*5)[1 2 NB. 6, 7, 8 and 9 not needed
>> 0.618034
>>
>> 22 characters excluding the comment
>> (but then four numbers are missing)
>>
>> Ben
>> ________________________________________
>> From: Programming [programming-bounces at forums.jsoftware.com] on behalf of
>> Linda A Alvord [lindaalvord at verizon.net]
>> Sent: Thursday, February 25, 2016 08:49
>> To: programming at jsoftware.com
>> Subject: [Jprogramming] Morning Mystery
>>
>> Using only the single digit counting numbers:
>>
>>
>>
>>> :i.9
>>
>> 1 2 3 4 5 6 7 8 9
>>
>>
>>
>> write the shortest possible expression to produce:
>>
>>
>>
>> 0.618034
>>
>>
>>
>> Linxa
>>
>>
>>
>> l
>>
>>
>>
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>> ----------------------------------------------------------------------
>> For information about J forums see http://www.jsoftware.com/forums.htm
>>
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
More information about the Programming
mailing list