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

Issue 5655049: code review 5655049: spec: clarify implementation restrictions on untyped floats (Closed)

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 3 months ago by iant
Modified:
13 years, 3 months ago
Reviewers:
CC:
r, rsc, r2, gri, ken2, ken3, iant2, golang-dev, remyoudompheng
Visibility:
Public.

Description

spec: clarify implementation restrictions on untyped floats Drop reference to "machine type." Specify that integer overflow must be an error. Drop requirement that exponent must be 128 bits--that's a lot. Clarify that floating point expressions may be rounded, including intermediate values. This is a reworking of http://codereview.appspot.com/5577068/ . Fixes issue 2789.

Patch Set 1 #

Total comments: 7

Patch Set 2 : diff -r 4a1b2d0d8450 https://go.googlecode.com/hg/ #

Total comments: 4

Patch Set 3 : diff -r 4a1b2d0d8450 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 4 : diff -r 4a1b2d0d8450 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 5 : diff -r 5d4cd2971008 https://go.googlecode.com/hg/ #

Total comments: 2

Patch Set 6 : diff -r 310d671f0e10 https://go.googlecode.com/hg/ #

Total comments: 8

Patch Set 7 : diff -r cbee2f341f10 https://go.googlecode.com/hg/ #

Patch Set 8 : diff -r ce731433bb46 https://go.googlecode.com/hg/ #

Unified diffs Side-by-side diffs Delta from patch set Stats (+37 lines, -5 lines) Patch
M doc/go_spec.html View 1 2 3 4 5 6 2 chunks +37 lines, -5 lines 0 comments Download

Messages

Total messages: 35
iant
Hello golang-dev@googlegroups.com (cc: remyoudompheng), I'd like you to review this change to https://go.googlecode.com/hg/
13 years, 3 months ago (2012-02-10 04:38:23 UTC) #1
r
http://codereview.appspot.com/5655049/diff/1/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/1/doc/go_spec.html#newcode598 doc/go_spec.html:598: integer value, it will give an error. If the ...
13 years, 3 months ago (2012-02-10 04:44:48 UTC) #2
rsc
> +<p> > +This rounding may cause a floating-point expression to not convert to > ...
13 years, 3 months ago (2012-02-10 04:45:38 UTC) #3
r2
On Feb 10, 2012, at 3:45 PM, Russ Cox wrote: >> +<p> >> +This rounding ...
13 years, 3 months ago (2012-02-10 04:48:43 UTC) #4
iant
PTAL http://codereview.appspot.com/5655049/diff/1/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/1/doc/go_spec.html#newcode598 doc/go_spec.html:598: integer value, it will give an error. If ...
13 years, 3 months ago (2012-02-10 05:47:33 UTC) #5
rsc
http://codereview.appspot.com/5655049/diff/7001/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/7001/doc/go_spec.html#newcode596 doc/go_spec.html:596: value, with a mantissa of at least 128 bits ...
13 years, 3 months ago (2012-02-10 05:52:43 UTC) #6
iant
http://codereview.appspot.com/5655049/diff/7001/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/7001/doc/go_spec.html#newcode596 doc/go_spec.html:596: value, with a mantissa of at least 128 bits ...
13 years, 3 months ago (2012-02-10 06:08:44 UTC) #7
rsc
LGTM http://codereview.appspot.com/5655049/diff/1002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/1002/doc/go_spec.html#newcode601 doc/go_spec.html:601: floating-point or complex value precisely, it may round ...
13 years, 3 months ago (2012-02-10 06:10:33 UTC) #8
r
LGTM but i would like to hear from ken and gri
13 years, 3 months ago (2012-02-10 06:11:11 UTC) #9
iant
http://codereview.appspot.com/5655049/diff/1002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/1002/doc/go_spec.html#newcode601 doc/go_spec.html:601: floating-point or complex value precisely, it may round the ...
13 years, 3 months ago (2012-02-10 06:21:50 UTC) #10
gri
http://codereview.appspot.com/5655049/diff/4/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/4/doc/go_spec.html#newcode3 doc/go_spec.html:3: "Subtitle": "Version of February 9, 2012" set to current ...
13 years, 3 months ago (2012-02-10 18:37:24 UTC) #11
rsc
> s/128/256/ I disagree. > For one, our own > > math.E = > 2.71828182845904523536028747135266249775724709369995957496696763 ...
13 years, 3 months ago (2012-02-10 18:58:01 UTC) #12
gri
On Fri, Feb 10, 2012 at 10:58 AM, Russ Cox <rsc@golang.org> wrote: >> s/128/256/ > ...
13 years, 3 months ago (2012-02-10 19:15:06 UTC) #13
rsc
On Fri, Feb 10, 2012 at 14:15, Robert Griesemer <gri@golang.org> wrote: > I agree that ...
13 years, 3 months ago (2012-02-10 19:15:52 UTC) #14
iant2
Robert Griesemer <gri@golang.org> writes: >> 128 bits is plenty considering that only 64 bits can ...
13 years, 3 months ago (2012-02-11 05:33:18 UTC) #15
gri
Fine with me. But then perhaps we should indeed say that the exponent must be ...
13 years, 3 months ago (2012-02-11 05:46:44 UTC) #16
ken3
the only reason for significantly more than the native FP is for funny constant expressions ...
13 years, 3 months ago (2012-02-11 20:36:42 UTC) #17
iant
Based on Ken's comment I bumped everything to 256 bits. I didn't see any reason ...
13 years, 3 months ago (2012-02-12 04:44:10 UTC) #18
gri
LGTM
13 years, 3 months ago (2012-02-12 05:33:20 UTC) #19
r
http://codereview.appspot.com/5655049/diff/5002/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/5002/doc/go_spec.html#newcode592 doc/go_spec.html:592: Implementation restriction: A compiler may implement numeric constants Is ...
13 years, 3 months ago (2012-02-12 11:07:16 UTC) #20
iant2
r@golang.org writes: > http://codereview.appspot.com/5655049/diff/5002/doc/go_spec.html > File doc/go_spec.html (right): > > http://codereview.appspot.com/5655049/diff/5002/doc/go_spec.html#newcode592 > doc/go_spec.html:592: Implementation restriction: ...
13 years, 3 months ago (2012-02-12 19:06:30 UTC) #21
r
http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode608 doc/go_spec.html:608: complex value due to overflow.</li> again, underflow? 1e-40000: is ...
13 years, 3 months ago (2012-02-12 20:24:33 UTC) #22
r
http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode598 doc/go_spec.html:598: <li>Represent integer values with at least 256 bits.</li> weird. ...
13 years, 3 months ago (2012-02-12 20:26:57 UTC) #23
iant
http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode598 doc/go_spec.html:598: <li>Represent integer values with at least 256 bits.</li> On ...
13 years, 3 months ago (2012-02-13 01:03:44 UTC) #24
iant
http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode608 doc/go_spec.html:608: complex value due to overflow.</li> On 2012/02/13 01:03:44, iant ...
13 years, 3 months ago (2012-02-13 01:19:59 UTC) #25
r2
On Feb 12, 2012, at 5:03 PM, iant@golang.org wrote: > > http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html > File doc/go_spec.html ...
13 years, 3 months ago (2012-02-13 01:24:51 UTC) #26
rsc
http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode598 doc/go_spec.html:598: <li>Represent integer values with at least 256 bits.</li> > ...
13 years, 3 months ago (2012-02-13 03:42:54 UTC) #27
r2
On Feb 13, 2012, at 2:42 PM, rsc@golang.org wrote: > > s/values/constants/? > > Maybe ...
13 years, 3 months ago (2012-02-13 03:48:51 UTC) #28
iant
Sounds good. PTAL. http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html File doc/go_spec.html (right): http://codereview.appspot.com/5655049/diff/2005/doc/go_spec.html#newcode598 doc/go_spec.html:598: <li>Represent integer values with at least ...
13 years, 3 months ago (2012-02-13 05:53:03 UTC) #29
r
LGTM
13 years, 3 months ago (2012-02-13 05:55:13 UTC) #30
iant
Any last comments from anybody on the current text?
13 years, 3 months ago (2012-02-13 18:10:15 UTC) #31
gri
LGTM On Mon, Feb 13, 2012 at 10:10 AM, <iant@golang.org> wrote: > Any last comments ...
13 years, 3 months ago (2012-02-13 18:12:14 UTC) #32
rsc
LGTM
13 years, 3 months ago (2012-02-13 18:36:08 UTC) #33
ken3
lgtm
13 years, 3 months ago (2012-02-13 19:22:57 UTC) #34
iant
13 years, 3 months ago (2012-02-13 19:26:02 UTC) #35
*** Submitted as http://code.google.com/p/go/source/detail?r=ad50b745d9ae ***

spec: clarify implementation restrictions on untyped floats

Drop reference to "machine type."  Specify that integer
overflow must be an error.  Drop requirement that exponent
must be 128 bits--that's a lot.  Clarify that floating point
expressions may be rounded, including intermediate values.

This is a reworking of http://codereview.appspot.com/5577068/ .

Fixes issue 2789.

R=r, rsc, r, gri, ken, ken, iant
CC=golang-dev, remyoudompheng
http://codereview.appspot.com/5655049
Sign in to reply to this message.

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