Cody

John D'Errico

424
Rank
6
Badges
1545
Score

Activities

1 – 50 of 268

John D'Errico submitted a Comment to Problem 43642. Euclidean distance from a point to a polynomial

I'm enjoying these creative solutions.

on 4 May 2018

John D'Errico submitted a Comment to Problem 1428. Find the optimal shape to bring the maximum product by a given perimeter

I updated the problem explanation to be a bit more clear. I also repaired the checks for a valid solution to use a relative test, mainly valuable for one of the cases where an absolute test on the error was a poor choice.

on 26 Mar 2018

John D'Errico submitted a Comment to Problem 1428. Find the optimal shape to bring the maximum product by a given perimeter

I took a look at the test cases. The 4th test has a result that is expected to be on the order of 1e40. Then it compares that to the solution returned, and tests to see if the absolute difference is less then 1e-4? eps(1e40) is roughly 1e24. So the difference between two numbers of size 1e40 will never be less than 1e-4, unless they are IDENTICAL. Far better would be to test if the relative difference is small.

on 26 Mar 2018

John D'Errico submitted a Comment to Problem 1442. Volume of a Simplex

Good problem, in the sense that it disallows many of the hacks used to cook a problem.

on 22 Feb 2018

John D'Errico submitted a Comment to Problem 525. Mersenne Primes

No. 2047 is not a Mersenne prime. 2047=23*89, even though it is true that 2047=2^11-1.

on 22 Feb 2018

John D'Errico submitted a Comment to Problem 981. Find nearest prime number less than input number

I removed the test case where n==2, since 1 is indeed not a prime number. I also added a random test case, so the problem is not so easily cooked by knowing all the test cases.

on 22 Feb 2018

John D'Errico submitted a Comment to Problem 1119. sum of non-primes

I've now fixed the problem statement to be consistent.

on 22 Feb 2018

John D'Errico submitted a Comment to Problem 241. Project Euler: Problem 7, Nth prime

Sadly, I see there are too few test cases, and the problem is too easy to cook.

on 22 Feb 2018

John D'Errico submitted a Comment to Problem 241. Project Euler: Problem 7, Nth prime

Aw drat. I was going to submit the n'th prime problem until I saw this.

on 22 Feb 2018

John D'Errico submitted a Comment to Solution 1278460

Tabulate could probably be made to work here, but I recall that Cody does not allow toolbox functions, and tabulate lives in the stats toolbox. I'd guess the logic is that not everyone has all toolboxes, so a solution that uses some tool that others cannot use would not be fair to those others.

on 21 Feb 2018

John D'Errico submitted a Comment to Problem 43564. Calculate sin(x) without sin(x)

You could at least bother to write a reference solution.

on 17 Oct 2016

John D'Errico submitted a Comment to Problem 43567. i forgot to use capital I

No reference solution provided.

on 17 Oct 2016

John D'Errico submitted a Comment to Solution 553580

A very good reason why it would NOT work. You returned a double precision number. But a double can only store integers correctly as large as 2^53-1.

on 13 Oct 2016

John D'Errico submitted a Comment to Problem 43329. Solve expression II

Note that this problem uses the word solve when it needs to say EVALUATE.

on 13 Oct 2016

John D'Errico submitted a Comment to Problem 43326. Solve expression I

Note that this problem uses the word solve when it needs to say EVALUATE.

on 13 Oct 2016

John D'Errico submitted a Comment to Problem 43330. Solve expression III

Note that this problem uses the word solve when it needs to say EVALUATE.

on 13 Oct 2016

John D'Errico received Promoter badge for Problem 43494. Weighted Convolution

on 13 Oct 2016

John D'Errico submitted a Comment to Problem 43166. Probabilities - Balls and urns - 02

Poorly stated question, as it is ambiguous as to whether it is asking for the number of red balls that have been observed or the number that remain in the urn. Oh, "discarded" is spelled with a d. That much I can fix.

on 7 Oct 2016

John D'Errico submitted a Comment to Solution 989507

nice

on 2 Oct 2016

1 – 50 of 268