Cody

John D'Errico

316
Rank
6
Badges
1495
Score

Activities

1 – 50 of 246

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

I'm enjoying these creative solutions.

on 30 Oct 2016

John D'Errico submitted a Comment to Problem 43636. Get linearly independent vectors of given matrix.

I've unpublished the problem, as it has too many flaws to be mathematically acceptable. In fact, the second test case is technically incorrect, as your correct solution has a zero row in it. A linearly independent set of vectors has the property that no non-zero linear combination of the vectors has a zero result. A zero vector in there makes the result invalid. The first test case is also technically incorrect, since there are infinitely many sets of linearly independent vectors that satisfy the goal,yet you also accept only one solution.

on 27 Oct 2016

John D'Errico submitted a Comment to Problem 43636. Get linearly independent vectors of given matrix.

This problem has serious flaws. As posed, there are infinitely many valid solutions, but the tests accept only one solution, that returned by a tool of the author's choice. As such, this problem teaches the wrong thing to someone who does not understand the issues.

on 27 Oct 2016

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

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

Thanks for the problem links. I'll forward that idea about editing comments to the site developers.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42996. what can you get for exactly amount of money

A good problem, but it desperately needs more test cases. Sadly, intlinprog is not an acceptable solution method.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42987. Roots of a quadratic equation.

Applied a tolerance, which is crucial, since tiny variations in the least significant bits due to floating point arithmetic can cause a valid solution to fail.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42988. Linear system of equations

The tests cases used an exact test for equality. In terms of floating point numbers, this is incorrect as a test, because it can fail to recognize entirely valid solutions, and there are many ways to validly solve this problem. As such, I modified the test cases to use a tolerance on the result.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

I've asked Ned how to create a new problem group first. (I don't think if I have that privilege.) Then I plan to establish a few new problem groups for problems like this. Perhaps a numerical methods group, a computational geometry group, others? I hope there will also be some existing problems I can then include in addition to those I will write.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

If this problem gains some interest, I'll start trying to post additional problems. My idea is to build a new problem set, for general numerical methods like this.

on 1 Oct 2016

John D'Errico submitted a Comment to Problem 156. Parasitic numbers

I've added some test cases, that will make it a bit more difficult to game this problem.

on 30 Sep 2016

John D'Errico submitted a Comment to Problem 156. Parasitic numbers

Far too few test cases. In fact, a serious issue with this problem is that there are too few parasitic numbers that will fit into even 64 bits for most values of n.

on 30 Sep 2016

John D'Errico submitted a Comment to Problem 42935. Sums of cubes and squares of sums

I did not originally look to see exactly how far one could go. It looks like, IF one is careful in the important expression, you should be able to get to 3329020. I'd expect that the code I'd write that would solve this to go as far as 3329020 would employ an initial test to know if n is even or odd, changing the expression I'd write depending on the parity of n. Of course that branch would also increase the complexity, so raising the Cody score.

on 29 Aug 2016

John D'Errico received Speed Demon badge for Solution 944700

on 28 Aug 2016

John D'Errico submitted a Comment to Problem 240. Project Euler: Problem 6, Natural numbers, squares and sums.

A problem where one must be at least a little careful about floating point arithmetic. It might have been interesting if one of the test cases were x=1e5 or larger. Even more interesting if the execution time were a factor in the "score". These factors might impact how the problem would be best solved.

on 28 Aug 2016

1 – 50 of 246