Skip to main content

Timeline for Sandbox for Proposed Challenges

Current License: CC BY-SA 4.0

14 events
when toggle format what by license comment
Jun 17, 2020 at 9:03 history edited CommunityBot
Commonmark migration
Jun 18, 2019 at 11:08 comment added the default. @PeterTaylor I think so. I feel like there actually is a simple and beautiful solution that everyone will have to copy from each other here.
Jun 18, 2019 at 11:03 comment added Peter Taylor So in short, given inputs \$a,b,c\$ find a \$k\$ such that \$a^k + c^k = 2b^k\$ and then find and output a \$d\$ such that \$d^k = 2c^k - b^k\$? There is a significant problem in that \$k=0\$ is always a solution to the first equation, so I think that the geometric mean would have to be tested first as a special case.
Jun 15, 2019 at 3:16 comment added FryAmTheEggman Assuming the languages that people use to answer your challenge will use a reasonable convention is not a particularly good one! I didn't meant arbitrary precision but arbitrarily larger precision based on what you have specified. It is probably fine the way you have it, I just think it is better to think about nonstandard languages when you can. If you put no time limit, some solutions may try to iterate over all floating point numbers of a particular precision, for example. Sorry if this has gotten out of hand, maybe I'm not doing a good job explaining what I mean?
Jun 15, 2019 at 2:46 comment added the default. @FryAmTheEggman double-precision floating points have around 14 digits of precision, and 1e-8 is a perfectly common epsilon for such tasks (and I use 1e-5). And if I assume floating point numbers are arbitrary precision, that implicitly disallows binary/ternary search, as it will never produce the exact answer. And since the only two solutions I know are Mathematica NSolve and alternatives and searching for the order and then for the next number, this disallows all remotely interesting solutions known to me.
Jun 14, 2019 at 18:08 comment added FryAmTheEggman Not every solution will use that, and even if they do they may still run into a problem where they can't get a solution well enough based on their native floating point type and have to do a bunch of extra work. I think it works well as a catch-all that prevents golfers from having to struggle with weird edge cases. But generally I think you are right that just having enough test cases will be good enough (also I didn't get notified by your comment because someone else has commented already, you'd need to use @).
Jun 14, 2019 at 11:19 history edited Mr. Xcoder CC BY-SA 4.0
added 1 character in body
Jun 14, 2019 at 3:58 comment added the default. The time limit only on the test cases thing makes sense to me. What does "not counting floating point issues mean"? I think most solutions will have to use binary or ternary search, and that needs a, uh, stopping precision or a iteration count to be close enough. I think we can remove the need to verify it on all numbers by preparing a lot of test cases!
Jun 13, 2019 at 17:30 comment added FryAmTheEggman I think proving that submissions will always meet your validity criterion will be rather daunting. This will probably further encourage solutions that just try every single floating point number? I'd recommend saying that floating point issues won't be counted against the submission, but you still have a bit of a problem. If you do add a time limit I'd recommend saying that it only need be tested on the cases you provide (and maybe remind users that hardcoding is a loophole ;) )
Jun 13, 2019 at 15:29 history edited the default. CC BY-SA 4.0
added 50 characters in body
Jun 13, 2019 at 15:25 comment added the default. @Jonathan Surely reading three numbers or taking them as function arguments or whatever is your language's alternative is the least thing you have to do here?
Jun 13, 2019 at 15:21 comment added Jonathan Frech I think The task is, given 3 real positive numbers ... is a bit problematic, as receiving them sounds like a daunting task.
Jun 13, 2019 at 13:45 history edited the default. CC BY-SA 4.0
edited body
Jun 13, 2019 at 13:38 history answered the default. CC BY-SA 4.0