Problem 235

A place to air possible concerns or difficulties in understanding ProjectEuler problems. This forum is not meant to publish solutions. This forum is NOT meant to discuss solution methods or giving hints how a problem can be solved.
Forum rules
As your posts will be visible to the general public you are requested to be thoughtful in not posting anything that might explicitly give away how to solve a particular problem.

This forum is NOT meant to discuss solution methods for a problem.

In particular don't post any code fragments or results.

Don't start begging others to give partial answers to problems

Don't ask for hints how to solve a problem

Don't start a new topic for a problem if there already exists one


See also the topics:
Don't post any spoilers
Comments, questions and clarifications about PE problems.
Post Reply
suspect42
Posts: 2
Joined: Tue Mar 10, 2009 9:57 am

Problem 235

Post by suspect42 »

I found a closed-form for the sum, and tried to solve the equation that results for r. Using a few different solvers (Maxima and a hand-coded Newton-method), I get the same result, but it seems not to be the correct answer.
Expand
I get r = 1.000000024997936816240
Is this close to the correct answer?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 235

Post by TripleM »

No.
suspect42
Posts: 2
Joined: Tue Mar 10, 2009 9:57 am

Re: Problem 235

Post by suspect42 »

Thanks for replying!

Got the answer. I'd made a mistake copying the expression from notebook to program.

Very embarrassing :)
Smaug
Posts: 15
Joined: Thu Aug 06, 2009 5:08 pm

Re: Problem 235

Post by Smaug »

I have a result to 12 decimal places, but it's not accepted. It's definitely right, as well, says Mathematica when I substitute the result back in. It's a little greater than 1.00. Does this sound roughly right?
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 235

Post by TripleM »

Yes, but if Project Euler says wrong answer then it is definitely the wrong answer ;) If you want to PM me the value you come up with I can tell you how many decimal places it is correct to (but it won't be 12).
maomaoloverose
Posts: 4
Joined: Thu Feb 24, 2011 9:23 am

Re: Problem 235

Post by maomaoloverose »

I have a result. it's a little greater than 1.001, and Abs(s(5000) - (-600000000000)) < 0.000000046, but it's not accepted. :(


i made a stupid mistake! :( :(
Last edited by maomaoloverose on Fri Mar 04, 2011 3:06 am, edited 1 time in total.
Image
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 235

Post by TripleM »

That's because it's wrong :) The correct answer doesn't begin with 1.001.. if that's what you were implying by 'a little more'.
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 235

Post by mdean »

Before I get started on this, is it fair to ask if this number to that many decimal places will fit in a C++ long double? Somehow I get the horrible feeling even if it fits, the limit of its precision is going to be seriously pushed...
Image
thundre
Posts: 356
Joined: Sun Mar 27, 2011 10:01 am

Re: Problem 235

Post by thundre »

mdean wrote:Before I get started on this, is it fair to ask if this number to that many decimal places will fit in a C++ long double? Somehow I get the horrible feeling even if it fits, the limit of its precision is going to be seriously pushed...
The result fits in a Java double, which is smaller than a C++ long double.
Image
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 235

Post by mdean »

Ah. Good to know that shouldn't be a problem then. Thanks.
Image
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 235

Post by mdean »

How many roots are there? I get one around -1 that isn't being accepted.
Image
TripleM
Posts: 384
Joined: Fri Sep 12, 2008 3:31 am

Re: Problem 235

Post by TripleM »

Your answer is incorrect :) (You may want to re-read the problem in case you missed something.)
mdean
Posts: 206
Joined: Tue Aug 02, 2011 2:05 am

Re: Problem 235

Post by mdean »

Nope. Didn't miss anything, just reversed a sign. :) I saw 2 roots before the change. Right now, I just see one obvious one.
Image
enderw88
Posts: 9
Joined: Tue Feb 07, 2012 4:18 am

Re: Problem 235

Post by enderw88 »

Driving me crazy. I have the same answer to 14 significant figures from two separate sources (Mathematica and some custom Lisp) At 12 significant figures I can't get |600,000,000 + s(r)|< 1.03

At 14 significant figures I can drive the difference to below 1x10^-4. I must be making the same mistake twice...The answer is of the form 1.abc def ghi jkl correct?
Image
User avatar
jaap
Posts: 588
Joined: Tue Mar 25, 2008 3:57 pm
Contact:

Re: Problem 235

Post by jaap »

enderw88 wrote:600,000,000
Count the zeroes in that number.
enderw88
Posts: 9
Joined: Tue Feb 07, 2012 4:18 am

Re: Problem 235

Post by enderw88 »

jaap wrote:
enderw88 wrote:600,000,000
Count the zeroes in that number.
Thank you. That's what I get for doing a problem on a trans-atlantic flight...
Image
Post Reply