Add fixed-length floating point number support v0.6.0
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 29 Sep 2023 19:30:49 +0000 (15:30 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 29 Sep 2023 19:38:08 +0000 (15:38 -0400)
commit269f6eb3198e349566cbdd41de264254b90360d9
treeb918f9a5bffe64f648c0b0ba78dfb5192f292d31
parentc2b79cf65845f7358da8cd45803d513934a667ac
Add fixed-length floating point number support

This patch adds support to encode binary32 and binary64 (as per
IEEE 754-2008) floating point numbers, big and little endian.

The Normand form is the same as a fixed-length integer:

    { 32.87 : 32 }

The type of the result of the evaluation determines how to encode it:
integer or floating point number.

Some "fixed-length integer" terms are changed to "fixed-length number"
when they're meant to be general.

With this patch, you may also assign a variable to a floating point
number value. However, the result type of an LEB128 integer or
repetition count expression must still be `int`.

Change-Id: Ic13ed747276a365ed2fd8854545ab2b0e1c343a0
Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
45 files changed:
README.adoc
normand/normand.py
pyproject.toml
tests/fail-fl-float-inval-len.nt [new file with mode: 0644]
tests/fail-fl-int-32b-out-of-range-pos.nt
tests/fail-fl-int-empty-expr.nt [deleted file]
tests/fail-fl-int-eval-type.nt [deleted file]
tests/fail-fl-int-eval.nt [deleted file]
tests/fail-fl-int-inval-len.nt [deleted file]
tests/fail-fl-int-inval-syntax.nt [deleted file]
tests/fail-fl-int-missing-bo.nt [deleted file]
tests/fail-fl-int-missing-len.nt [deleted file]
tests/fail-fl-int-unknown-name-1.nt [deleted file]
tests/fail-fl-int-unknown-name-2.nt [deleted file]
tests/fail-fl-num-empty-expr.nt [new file with mode: 0644]
tests/fail-fl-num-eval-type.nt [new file with mode: 0644]
tests/fail-fl-num-eval.nt [new file with mode: 0644]
tests/fail-fl-num-inval-len.nt [new file with mode: 0644]
tests/fail-fl-num-inval-syntax.nt [new file with mode: 0644]
tests/fail-fl-num-missing-bo.nt [new file with mode: 0644]
tests/fail-fl-num-missing-len.nt [new file with mode: 0644]
tests/fail-fl-num-unknown-name-1.nt [new file with mode: 0644]
tests/fail-fl-num-unknown-name-2.nt [new file with mode: 0644]
tests/fail-rep-eval-type-1.nt [new file with mode: 0644]
tests/fail-rep-eval-type-2.nt [new file with mode: 0644]
tests/fail-rep-eval-type.nt [deleted file]
tests/fail-sleb128-empty-expr.nt
tests/fail-uleb128-empty-expr.nt
tests/fail-uleb128-eval-type-1.nt [new file with mode: 0644]
tests/fail-uleb128-eval-type-2.nt [new file with mode: 0644]
tests/fail-uleb128-eval-type.nt [deleted file]
tests/fail-var-eval-type.nt
tests/fail-var-label-bo-none.nt
tests/pass-fl-float-32b-be.nt [new file with mode: 0644]
tests/pass-fl-float-32b-le.nt [new file with mode: 0644]
tests/pass-fl-float-64b-be.nt [new file with mode: 0644]
tests/pass-fl-float-64b-le.nt [new file with mode: 0644]
tests/pass-readme-intro-fl-num.nt [new file with mode: 0644]
tests/pass-readme-learn-fl-int-1.nt [deleted file]
tests/pass-readme-learn-fl-int-2.nt [deleted file]
tests/pass-readme-learn-fl-int-3.nt [deleted file]
tests/pass-readme-learn-fl-num-1.nt [new file with mode: 0644]
tests/pass-readme-learn-fl-num-2.nt [new file with mode: 0644]
tests/pass-readme-learn-fl-num-3.nt [new file with mode: 0644]
tests/pass-readme-learn-fl-num-4.nt [new file with mode: 0644]
This page took 0.026142 seconds and 4 git commands to generate.