Skip to content

Commit df8039e

Browse files
committed
Clarify that Float does not include NaN or infinity
Fixes #778. This matches the fact that you cannot represent these values in text as FloatValue, as well as the graphql-js implementation (https://github.com/graphql/graphql-js/blob/16009cbcb0109da03f2157a868817b886801095a/src/type/scalars.js#L108-L112). This was perhaps already implied by the word "fractional", but "finite" seems to be a more standard term for "IEEE 754 floats that are not infinity or NaN".
1 parent d3ea511 commit df8039e

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

spec/Section 3 -- Type System.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,10 +450,11 @@ encoding integer numbers larger than 32-bit.
450450

451451
### Float
452452

453-
The Float scalar type represents signed double-precision fractional values
454-
as specified by [IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point).
455-
Response formats that support an appropriate double-precision number type
456-
should use that type to represent this scalar.
453+
The Float scalar type represents signed double-precision finite (i.e., not {NaN}
454+
or infinity) fractional values as specified by
455+
[IEEE 754](https://en.wikipedia.org/wiki/IEEE_floating_point). Response formats
456+
that support an appropriate double-precision number type should use that type to
457+
represent this scalar.
457458

458459
**Result Coercion**
459460

0 commit comments

Comments
 (0)