Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

Problem hidden on 2014-03-19 16:05:19 by Francky

PIHEX - Hexadecimal value of Pi (challenge)

no tags 

PIHEX

All people use decimal system every day. For all of us the value of Pi is 3.141592653589793238462643383279....

But there is common to use hexadecimal system in programming. The hexadecimal value of Pi is 3.243F6A8885A308D313198A2E037073....

In this problem there is no input and You have to output as many hexadecimal digits of Pi as You can (use capital letters A-F). The score is the number of correct digits after comma.

Example

Output 1:

3.243F6012345

The score is 5, because 6th digit after comma is wrong.

Output 2:

3.243F6A8885A308D313198A2E037073

The score is 30 (all digits are OK).


hide comments
miodziu: 2014-03-20 07:20:31

@Francky: No problem, I expected it. But it was worth to try ;-)

Francky: 2014-03-19 16:04:45

I've set another task, and I hope it's an interesting one.
@miodziu : Sorry for PIHEX, it is hidden.

Robert Gerbicz: 2014-03-19 15:45:45

@ Francky: No, I don't want to setup.

"I think such a new challenge should be set by someone who is well placed in rank list in PIVAL or other like problem."

You can also setup! There are different ways/formulas to get these (different) constants. In general a fast code on these constants wouldn't give immediately the best/fastest code for pi/e/golden ratio/sqrt 2. (((what was not true for pival and pihex))).

Francky: 2014-03-19 14:35:19

I think such a new challenge should be set by someone who is well placed in rank list in PIVAL or other like problem. My 2c opinion.
@all : what about that ?
@Robert : Do you want to set such a new challenge ?

Robert Gerbicz: 2014-03-19 14:20:05

Yes, it is too similar to PIVAL. One advantage here is that you need to print the answer in hexadecimal, that makes to output faster since you don't need a cotsly base conversion in print/write (from base 2^32 or 2^64 to 10).

What would be interesting: the same problem, but with different constant,see http://numbers.computation.free.fr/Constants/Miscellaneous/Records.html
Skipping the too slow and known constants from challenging section leaves:

gamma(1/4)
gamma(1/3)
Euler's constant
Catalan's constant
zeta(3), this is Apery's constant
log(2)

Last edit: 2014-03-19 14:22:18
Mitch Schwartz: 2014-03-19 12:49:01

I suspect this isn't sufficiently different from PIVAL to justify it being in challenge section, but we can wait for Robert Gerbicz to make a comment about it. (Additionally, a limit should be mentioned because of SIGXFSZ, regardless of whether the limit is considered reachable.)

EDIT (miodziu): At the moment test case contains only about 440000 digits, but I'm going to add more. I hope it's difficult to generate more digits in given time limit, but I can be wrong. I think SIGXFSZ shouldn't appear, but if it happens, I'll consider changing the limit.
About comparison with PIVAL - I'm waiting for comments. If You think the problem is very similar - I'll hide it...

Last edit: 2014-03-19 13:19:44

Added by:miodziu
Date:2014-03-19
Time limit:25s
Source limit:4096B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ASM64