Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(8)

Issue 186118: code review 186118: math: special cases for Hypot (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
15 years, 3 months ago by Charlie Dorian
Modified:
15 years, 3 months ago
Reviewers:
CC:
rsc, golang-dev
Visibility:
Public.

Description

math: special cases for Hypot Added special case tests to all_test.go. Added tests to hypot.go, otherwise hangs.

Patch Set 1 #

Patch Set 2 : code review 186118: math: special cases for Hypot #

Total comments: 2

Patch Set 3 : code review 186118: math: special cases for Hypot #

Patch Set 4 : code review 186118: math: special cases for Hypot #

Patch Set 5 : code review 186118: math: special cases for Hypot #

Unified diffs Side-by-side diffs Delta from patch set Stats (+97 lines, -26 lines) Patch
M src/pkg/math/all_test.go View 1 2 3 4 8 chunks +83 lines, -25 lines 0 comments Download
M src/pkg/math/hypot.go View 1 2 3 2 chunks +14 lines, -1 line 0 comments Download

Messages

Total messages: 10
Charlie Dorian
Hello rsc (cc: golang-dev@googlegroups.com), I'd like you to review this change.
15 years, 3 months ago (2010-01-13 04:02:35 UTC) #1
rsc
http://codereview.appspot.com/186118/diff/6/7 File src/pkg/math/all_test.go (right): http://codereview.appspot.com/186118/diff/6/7#newcode563 src/pkg/math/all_test.go:563: t.Errorf("Fmod(10, %.17g) = %.17g, want %.17g\n", vf[i], f, fmod[i]) ...
15 years, 3 months ago (2010-01-14 01:44:41 UTC) #2
Charlie Dorian
Thanks. On Wed, Jan 13, 2010 at 8:44 PM, <rsc@golang.org> wrote: > > http://codereview.appspot.com/186118/diff/6/7 > ...
15 years, 3 months ago (2010-01-14 01:57:16 UTC) #3
Charlie Dorian
Sorry, missed correction of Inf replaced by infinite. Done now. On Wed, Jan 13, 2010 ...
15 years, 3 months ago (2010-01-14 02:22:17 UTC) #4
Charlie Dorian
Doubt made me check and add special case tests to Sqrt in all_test.go. On Wed, ...
15 years, 3 months ago (2010-01-14 03:52:53 UTC) #5
rsc
LGTM I still think the special case is wrong but I will defer to the ...
15 years, 3 months ago (2010-01-15 21:19:04 UTC) #6
rsc
*** Submitted as http://code.google.com/p/go/source/detail?r=095b2847e231 *** math: special cases for Hypot Added special case tests to ...
15 years, 3 months ago (2010-01-15 21:21:50 UTC) #7
Charlie Dorian
Another friendly IEEE 754 reference: http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Math.html#hypot%28double,%20double%29 Same special case. Believe me, I rechecked because I ...
15 years, 3 months ago (2010-01-15 22:06:48 UTC) #8
Charlie Dorian
Paraphrasing the explanation at http://www.savrola.com/resources/NaN.html, a NaN results from any operation having one or more ...
15 years, 3 months ago (2010-01-15 22:41:44 UTC) #9
rsc
15 years, 3 months ago (2010-01-15 23:04:44 UTC) #10
On Fri, Jan 15, 2010 at 14:41, Charles Dorian <cldorian@gmail.com> wrote:
> Paraphrasing the explanation at http://www.savrola.com/resources/NaN.html, a
> NaN results from any operation having one or more NaNs as input values
> unless the operation has a single defined value if all of the input NaNs are
> replaced by any possible finite or infinite value.  They use hypot(Inf, NaN)
> as an example.

Aha!

Thanks.
Russ
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b