Two different problems: two different answers
The first lists numbers <35 but includes 0  (which doesn't affect the sum)
The second gets rid of the initial  0 but includes non -zero numbers <=35
so adds 35 to the sum.
They should agree for 34

Don Kelly

On 09/04/2014 8:56 PM, Linda Alvord wrote:
Some subtle differences.

     I.+./0=3 5 |/i.35
0 3 5 6 9 10 12 15 18 20 21 24 25 27 30 33
(1+i.35)#~+./0=3 5 |/1+i.35
3 5 6 9 10 12 15 18 20 21 24 25 27 30 33 35
+/I.+./0=3 5 |/i.35
258
+/(1+i.35)#~+./0=3 5 |/1+ i.35
293
+/I.+./0=3 5 |/ i.1000000x
2.33333e11
+/(1+i.1000000x)#~+./0x=3 5 |/1 + i.1000000x
233334166668

Linda
-----Original Message-----
From: [email protected]
[mailto:[email protected]] On Behalf Of Don Kelly
Sent: Wednesday, April 09, 2014 7:00 PM
To: [email protected]
Subject: Re: [Jprogramming] Euler Project Problem 1

Nice! I missed the summation part but overall this is much better.

Don Kelly
On 09/04/2014 5:06 AM, Nimp O wrote:
+./0=3 5 |/ i.1e3
----------------------------------------------------------------------
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

Reply via email to