Skip to content

Commit

Permalink
Flesh out algorithms for addition, subtraction, multiplication, divis…
Browse files Browse the repository at this point in the history
…ion, and remainder (#143)

* Add `toFixed`, `toPrecision`, and `toExponential`

* Define AO to massage a potential Decimal128 value to an actual one

* Say that Decimal128 values aren't ECMAScript language values

* Inline AO used only in the constructor

* Fix references to undefined variables and mark an in-progres spot

* Flesh out `round` method

* Fix specification for exponent in `divide`

* Add checks for rounding mode

* Flesh out constructor

* Add brand checks

* Add links

* Add reference for rounding

* Add more IEEE 754 references

* Use "Otherwise"

* Add note about how we convert from Number

relates to #122
  • Loading branch information
jessealama authored May 30, 2024
1 parent dcd7a61 commit 2715d7c
Show file tree
Hide file tree
Showing 4 changed files with 401 additions and 149 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: ensure no line starts with tabs
- run: |
for f in *emu; do
if ! [ grep '^\t' "$f"]; then
if ! [ grep '^\t' "$f" ]; then
echo "$f has lines that begin with a tab";
exit 1;
fi
Expand Down
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

all: index.html

index.html:
npx ecmarkup --lint-spec --strict --load-biblio @tc39/ecma262-biblio --load-biblio @tc39/ecma402-biblio spec.emu $<
index.html: spec.emu intl.emu
npx ecmarkup --lint-spec --strict --load-biblio @tc39/ecma262-biblio --load-biblio @tc39/ecma402-biblio spec.emu $@

clean:
rm -f index.html
Loading

0 comments on commit 2715d7c

Please sign in to comment.