From dc1b0ac54d671d4bf5759daa25c09d0d50db424b Mon Sep 17 00:00:00 2001 From: Tony Garnock-Jones Date: Sat, 27 Jan 2024 11:34:51 +0100 Subject: [PATCH] Remove single-precision floats from the specs --- TUTORIAL.md | 5 +---- _includes/cheatsheet-binary-plaintext.md | 4 +--- _includes/cheatsheet-binary.md | 8 +++----- _includes/cheatsheet-text-plaintext.md | 3 +-- _includes/cheatsheet-text.md | 3 +-- _includes/python-representation.md | 2 +- _includes/text-examples.md | 1 - _includes/value-grammar.md | 1 - canonical-binary.md | 2 +- conventions.md | 4 ++-- .../doc/cheatsheet-binary-plaintext.md | 4 +--- .../doc/cheatsheet-text-plaintext.md | 3 +-- .../rust/preserves/doc/value-grammar.md | 1 - preserves-binary.md | 11 +++++------ preserves-path.md | 11 +++++------ preserves-schema.md | 8 ++------ preserves-text.md | 18 +++++++----------- preserves.md | 19 +++++++++++-------- questions.md | 9 ++------- representations.md | 10 ++++------ 20 files changed, 49 insertions(+), 78 deletions(-) diff --git a/TUTORIAL.md b/TUTORIAL.md index afe93e2..98c6ce4 100644 --- a/TUTORIAL.md +++ b/TUTORIAL.md @@ -105,7 +105,7 @@ A few more interesting differences: {"dictionaries": "as keys???"}: "well, why not?"} ``` -Preserves technically provides a few types of numbers: +Preserves technically provides various types of numbers: ``` # Signed Integers @@ -114,9 +114,6 @@ Preserves technically provides a few types of numbers: 5907212309572059846509324862304968273468909473609826340 -5907212309572059846509324862304968273468909473609826340 - # Floats (Single-precision IEEE floats) (notice the trailing f) - 3.1415927f - # Doubles (Double-precision IEEE floats) 3.141592653589793 ``` diff --git a/_includes/cheatsheet-binary-plaintext.md b/_includes/cheatsheet-binary-plaintext.md index a90cda0..3b31abe 100644 --- a/_includes/cheatsheet-binary-plaintext.md +++ b/_includes/cheatsheet-binary-plaintext.md @@ -7,7 +7,6 @@ For a value `V`, we write `«V»` for the binary encoding of `V`. «@W V» = [0x85] ++ «W» ++ «V» «#!V» = [0x86] ++ «V» - «V» if V ∈ Float = [0x87, 0x04] ++ binary32(V) «V» if V ∈ Double = [0x87, 0x08] ++ binary64(V) «V» if V ∈ SignedInteger = [0xB0] ++ varint(|intbytes(V)|) ++ intbytes(V) @@ -29,5 +28,4 @@ For a value `V`, we write `«V»` for the binary encoding of `V`. signedBigEndian(n >> 8) ++ [n & 255] otherwise ``` -The functions `binary32(F)` and `binary64(D)` yield big-endian 4- and -8-byte IEEE 754 binary representations of `F` and `D`, respectively. +The function `binary64(D)` yields the big-endian 8-byte IEEE 754 binary representation of `D`. diff --git a/_includes/cheatsheet-binary.md b/_includes/cheatsheet-binary.md index 876a0b9..35db691 100644 --- a/_includes/cheatsheet-binary.md +++ b/_includes/cheatsheet-binary.md @@ -11,7 +11,6 @@ class="postcard-grammar binarysyntax">*V*. «`#!`*V*» | = | `86` «*V*» {:.postcard-grammar.binarysyntax} -«*V*» | = | `87``04` **binary32**(*V*) | if *V* ∈ Float «*V*» | = | `87``08` **binary64**(*V*) | if *V* ∈ Double {:.postcard-grammar.binarysyntax} @@ -37,10 +36,9 @@ class="postcard-grammar binarysyntax">*V*. **signedBigEndian**(*n*) | = | *n* & 255 | if −128 ≤ *n* ≤ 127 | | **signedBigEndian**(*n* >> 8) *n* & 255 | otherwise -The functions **binary32**(*F*) and **binary64**(*D*) yield big-endian 4- and 8-byte -IEEE 754 binary representations of *F* and -*D*, respectively. +The function **binary64**(*D*) yields the +big-endian 8-byte IEEE 754 binary representation of *D*.