PHIVAL - Digits of Phi (Golden Ratio)

Calculate as many digits of the Golden Ratio φ ((1+5^0.5)/2) as possible but at least 1000 after the decimal point. More then 1000000 digits won't enhance the score. In addition try to shorten your code.

Input

None

Output

1.61803398874989484...

Score

Speed and code length should be rated similarly. Though it must be difficult that's an attempt:
Score = min(1000000, (number of correct digits)) + 15000000 / (source length)


Added by:HWK
Date:2011-03-30
Time limit:2.098s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64

hide comments
2015-08-24 23:08:37
The scoring seems unbalanced. I improved my code to get 5x the number of digits, but only doubled my score, because the source file was just 60 bytes larger. I feel it would have been better to simply put a smaller cap on the code size and report the number of digits - as in other challenges.

Last edit: 2015-08-24 23:10:15
2014-12-06 00:41:40 Mitch Schwartz
See also PHI_VAL on the CONSTANT contest.
2013-04-07 19:56:04 Francky
numerix is THE python master, and A master amongst few some. Here numerix didn't used Py2.7, rather an old version, and there's some delicate differences...

Last edit: 2013-04-07 21:35:30
2013-04-07 19:41:09 (Tjandra Satria Gunawan)(曾毅昆)
I wonder how can numerix get 307962 points using python 2.7, moreover the running time is only 6.71s + 3.8M of memory, wow! :-O It's very insane... My best is ~292000 and now I'm out of idea...
2012-12-01 17:33:21 Francky
@Charlie Yu: It's possible you have trailing spaces at the end of your code, they are add when you edit one submitted code to run it again. Here the score is changed with more spaces ! (It's my only idea for your problem)

Last edit: 2012-12-01 17:33:53
2012-12-01 16:37:44 Charlie Yu
Why do I get different scores even for same code?
2012-10-07 15:27:38 a b
runs absolutely fine on ideone and yet runtime error (id=7804258)(python).... :)
2011-04-01 21:28:21 HWK
@Ruslan Sennov: Shorten your code. It will increase your score.
@HWK: I know :-)

Last edit: 2011-04-02 16:52:04
2011-03-31 16:44:44 HWK
You're right! I had planned it so. Don't know why it appeared in classical.
2011-03-31 16:42:35 :D
You should move it challenge.
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.