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

Issue 176064: code review 176064: Make math.Pow() more robust. (Closed)

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

Description

Make math.Pow() more robust. Added NaNs, +/-Infs and special cases.

Patch Set 1 #

Patch Set 2 : code review 176064: Make math.Pow() more robust. #

Total comments: 2

Patch Set 3 : code review 176064: Make math.Pow() more robust. #

Patch Set 4 : code review 176064: Make math.Pow() more robust. #

Patch Set 5 : code review 176064: Make math.Pow() more robust. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+202 lines, -5 lines) Patch
M src/pkg/math/all_test.go View 1 2 3 4 4 chunks +152 lines, -0 lines 0 comments Download
M src/pkg/math/pow.go View 1 2 3 4 1 chunk +50 lines, -5 lines 0 comments Download

Messages

Total messages: 9
Charlie Dorian
Hello golang-dev@googlegroups.com (cc: rsc), I'd like you to review the following change.
15 years, 7 months ago (2009-12-13 07:28:17 UTC) #1
rsc
Thanks. http://codereview.appspot.com/176064/diff/4/6 File src/pkg/math/pow.go (right): http://codereview.appspot.com/176064/diff/4/6#newcode20 src/pkg/math/pow.go:20: case x == 1: I don't believe this ...
15 years, 7 months ago (2009-12-13 19:30:45 UTC) #2
Charlie Dorian
Hello Russ -- http://codereview.appspot.com/176064/diff/4/6#newcode20 > src/pkg/math/pow.go:20: case x == 1: > I don't believe this ...
15 years, 7 months ago (2009-12-13 21:12:14 UTC) #3
Charlie Dorian
Hello Russ -- You pointed me to http://code.swtch.com/vx32/src/tip/src/libvxc/msun/e_pow.c#cl-28. It says for pow(), (anything) ** NAN ...
15 years, 7 months ago (2009-12-13 22:58:52 UTC) #4
rsc
Your new code looks pretty good. Please add to all.bash something like func BenchmarkPowInt(b *testing.B) ...
15 years, 7 months ago (2009-12-15 01:09:02 UTC) #5
r2
by all.bash he means all_test.go On Dec 15, 2009, at 12:09 PM, rsc@golang.org wrote: > ...
15 years, 7 months ago (2009-12-15 01:14:10 UTC) #6
Charlie Dorian
The changes are made to pow.go and all_test.go (I think that's what you intended). Thanks ...
15 years, 7 months ago (2009-12-15 02:31:40 UTC) #7
rsc
On Mon, Dec 14, 2009 at 18:31, Charles Dorian <cldorian@gmail.com> wrote: > The changes are ...
15 years, 7 months ago (2009-12-15 02:40:11 UTC) #8
rsc
15 years, 7 months ago (2009-12-16 04:43:14 UTC) #9
*** Submitted as http://code.google.com/p/go/source/detail?r=a3da2e2276c5 ***

math: special cases for Pow

R=rsc
CC=golang-dev
http://codereview.appspot.com/176064

Committer: Russ Cox <rsc@golang.org>
Sign in to reply to this message.

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