From 16205a3534a2787cef0bd048547211e1de350fef Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Mon, 18 Jan 2010 15:59:14 -0800 Subject: [PATCH] spec: mention Inf and NaN are supported at run time. add hyperlink at mention of package reflect. Fixes #438. R=r CC=golang-dev https://golang.org/cl/190042 --- doc/go_spec.html | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/doc/go_spec.html b/doc/go_spec.html index 5243db37da5..79376dc46d1 100644 --- a/doc/go_spec.html +++ b/doc/go_spec.html @@ -507,6 +507,16 @@ can be given the types float32, float64, or uint not int32 or string.

+

+There are no constants denoting the IEEE-754 infinity and not-a-number values, +but the math package's +Inf, +NaN, +IsInf, and +IsNaN +functions return and test for those values at run time. +

+

Implementation restriction: A compiler may implement numeric constants by choosing an internal representation with at least twice as many bits as any machine type; @@ -4681,7 +4691,7 @@ value and returns both the type and the address of the copy. Unreflect inverts Reflect, creating an interface value from a type and address. -The reflect package built on these primitives +The reflect package built on these primitives provides a safe, more convenient way to inspect interface values.