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)


hide comments
weathervane: 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
Mitch Schwartz: 2014-12-06 00:41:40

See also PHI_VAL on the CONSTANT contest.

Francky: 2013-04-07 19:56:04

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
(Tjandra Satria Gunawan)(曾毅昆): 2013-04-07 19:41:09

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...

Francky: 2012-12-01 17:33:21

@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
Charlie Yu: 2012-12-01 16:37:44

Why do I get different scores even for same code?

a b : 2012-10-07 15:27:38

runs absolutely fine on ideone and yet runtime error (id=7804258)(python).... :)

HWK: 2011-04-01 21:28:21

@Ruslan Sennov: Shorten your code. It will increase your score.
@HWK: I know :-)

Last edit: 2011-04-02 16:52:04
HWK: 2011-03-31 16:44:44

You're right! I had planned it so. Don't know why it appeared in classical.

:D: 2011-03-31 16:42:35

You should move it challenge.


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