Skip to content

fix(layout): the last two CSS corpus gaps + the WPT corpus is one question - #2918

Merged
MarcosBrendonDePaula merged 2 commits into
mainfrom
ccr-c0b9806e-wzrnjy
Oct 24, 2026
Merged

MarcosBrendonDePaula merged 2 commits into
mainfrom
ccr-c0b9806e-wzrnjy

Conversation

@MarcosBrendonDePaula

Copy link
Copy Markdown
Member

Dois commits. O primeiro fecha as duas últimas fixtures do corpus CSS; o segundo trata dos 50 testes que só uma máquina do mundo conseguia correr, e que o primeiro deixou à vista.

1. 631fe42 — a aresta de um inline não é conteúdo para o trim da linha

As duas fixtures que ainda falhavam de propósito eram uma pergunta feita duas vezes: o que conta como CONTEÚDO numa linha.

  • A borda/padding de um <span> entra na linha como peça com largura (AtomicKind::EdgeStart/EdgeEnd), e isso fazia o espaço colapsável depois da aresta inicial deixar de estar no INÍCIO da linha, e o de antes da aresta final deixar de estar no FIM — nenhum colapsava. <span style="border-right:25px"> X </span> media 51,39 onde o Blink dá 33,8 (CSS Text 3 §4.1.2). Agora uma aresta não consome o espaço pendente nem abre a linha: um aglomerado só de arestas responde como um vazio, e o espaço é atribuído ao primeiro conteúdo real. Se nenhum chegar, a linha acaba e o espaço nunca se realiza — que é o trim.
  • A mesma pergunta com a outra resposta: um inline cujos runs colapsam todos (<span> </span>) não faz line box (§9.4.2) e não ficava dono de peça nenhuma, logo não tinha rect — getBoundingClientRect respondia y=0 onde o Blink dá 0×0 na posição da linha. O marker que só ia ao inline que não gerou run nenhum vai agora a qualquer um que não gerou nada que SOBREVIVA (preserved_spaces::tudo_colapsa).

Rejeitado: aparar o espaço final em cada lines.push. Seriam seis sítios a decidir a mesma coisa, e uma largura já somada em cur_w; não realizar um espaço é mais barato que desrealizá-lo.

Réguas (target/release/examples/run_fixture, esta árvore):

régua antes depois
corpus CSS (fixtures) 168/170 170/170
corpus CSS (medições vs Blink) 4525/4528 4528/4528
tests/css/esperado-a-falhar.txt 2 entradas vazia, pela primeira vez

Os rects do Blink das duas fixtures estão afirmados em Rust, escritos ANTES da correcção e vistos a falhar com exactamente os desvios documentados: layout/tests/static_position_empty_line_corpus.rs (as larguras dos spans) e layout/tests/empty_inline_rect_corpus.rs (novo).

2. 404e4a4 — o corpus do WPT é uma pergunta, e sem ele o teste SALTA

cargo test -p rts-dom --lib falhava 50 dos 1 510 testes em todas as máquinas menos uma, e há meses. Não era layout: 99 caminhos escritos à mão em 8 ficheiros nomeavam o corpus do WPT por um caminho absoluto da máquina de quem os escreveu (C:\Users\…\wpt-corpus\…). O job dom-tests do CI é continue-on-error, portanto o vermelho não era reportado a ninguém — um gate permanentemente vermelho para todos é um gate que ensina a ignorar vermelho.

  • crates/rts-dom/src/wpt_corpus.rs (novo) é a ÚNICA resposta a onde o corpus está: $RTS_WPT_CORPUS, senão tests/wpt-corpus/ (ignorada pelo git — nada do WPT vendorizado), senão o caminho antigo, para a máquina que sempre os correu não precisar de configurar nada.
  • sem_corpus_wpt!() é a primeira instrução dos 51 testes que o leem: sem corpus, imprime a razão e retorna. Não é o verde silencioso que este repositório teme: o salto imprime o caminho que procurou, corpus_is_present é um teste cuja função é só relatar o estado, e nenhum número publicado vem de uma corrida que saltou (o de tests/css/README.md vem do corpus de fixtures, que está na árvore e corre sempre).
  • path() normaliza a barra invertida: dois dos 51 escreviam css-grid\alignment\…, que em Linux é um ficheiro com barras no nome — eram os únicos que um corpus não resolvia.
  • O dom-tests do CI passa a clonar o corpus esparso, o que transforma estes 51 numa régua em vez de um hábito. O procedimento de checkout não é escrito uma segunda vez: scripts/wpt_reftests.md já o tem, incluindo o aviso de que encolher um checkout existente apaga pastas em silêncio.

Medido nos dois estados, cargo test --profile fast -p rts-dom -p rts-dom-bridge:

antes depois
com o corpus (checkout esparso, 57 MB) nunca correu fora de uma máquina 1511 passam, 0 falham
sem o corpus 1460 passam, 50 falham 1511 passam, 0 falham (51 saltam)

O achado: 49 dos 51 já estavam certos e ninguém o podia saber. Os 2 que não estavam eram a barra invertida, não layout.

Perdidos

Nenhum, e comparado por NOME e não em líquido: as 50 falhas do rts-dom eram o mesmo conjunto antes e depois do commit 1 (grid/subgrid, por falta de corpus), e o commit 2 fecha-as todas. rts-egui e rts-ui compilam.

Fora do âmbito, mesmo padrão

rts-text lê C:/Users/…/wpt-corpus/fonts/Ahem.ttf num bloco #[cfg(test)] de src/adapter.rs e em tests/shaping_and_breaks.rs. Ambos já degradam com elegância (o crate passa verde), e partilhar este resolvedor obrigaria a um crate de suporte a testes — decisão própria.


Generated by Claude Code

… trim

The two fixtures that still failed on purpose in the CSS corpus were one
question asked twice: what counts as CONTENT on a line.

A `<span>`'s border/padding edge enters the line as a piece with width
(`AtomicKind::EdgeStart`/`EdgeEnd`), and that made the collapsible space
right after the start edge stop being at the line's START, and the one
before the end edge stop being at its END — so neither collapsed and
`<span style="border-right:25px"> X </span>` measured 51.39 where Blink
gives 33.8, one space too many on each side (CSS Text 3 §4.1.2). An edge
now neither consumes the pending space nor opens the line: a cluster
holding only edges answers "did the line start" the way an empty one
does, and the space is attributed to the first real content that
arrives. If none arrives, the line ends and the space is never realised,
which IS the trim.

The same question with the other answer: an inline whose runs all
collapse away (`<span> </span>`, a single space) makes no line box
(§9.4.2) and owned no piece of any line, so it got no rect at all and
`getBoundingClientRect` answered y = 0 where Blink answers 0x0 at the
line's place. The marker that gave a position to an inline that produced
NO run now goes to any inline that produced nothing that SURVIVES —
`preserved_spaces::tudo_colapsa`, which disqualifies an atom (a surface
on the line) and a `white-space` regime that preserves (the space is
then content and the line box real).

Rejected: trimming the trailing space at each line push. It would have
been six call sites deciding the same thing, and a width already summed
into `cur_w`; not realising a space is cheaper than unrealising it.

Rulers (`target/release/examples/run_fixture`, this tree):
- corpus CSS 170/170, 4528/4528 measurements (was 168/170, 4525/4528);
  `tests/css/esperado-a-falhar.txt` is empty for the first time.
- the Blink rects of both fixtures are asserted in Rust, written BEFORE
  the fix and seen to fail with exactly the documented deviations:
  `layout/tests/static_position_empty_line_corpus.rs` (the span widths)
  and `layout/tests/empty_inline_rect_corpus.rs` (new).
- `cargo test --profile fast -p rts-dom -p rts-dom-bridge`: 1460 passed
  against 1459, and the 50 failures are the same set per NAME before and
  after (grid/subgrid, pre-existing on this branch) — nothing lost.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KjcGCJ2vTJf62LEjTE8d4M
`cargo test -p rts-dom --lib` failed 50 of its 1 510 tests on every
machine but one, and had for months. Not a layout bug: each of those
tests named the WPT corpus by an absolute path on the machine of whoever
wrote it (`C:\Users\…\wpt-corpus\…`, 99 of them hand-written across 8
files), so everywhere else they panicked with `NotFound`. The
`dom-tests` job of CI is `continue-on-error`, so the red was reported to
nobody — a gate permanently red for everyone is a gate that teaches
people to ignore red, which is the honesty floor's "a suite that does
not run produces nothing to compare".

`src/wpt_corpus.rs` is now the ONE answer to where the corpus is:
`$RTS_WPT_CORPUS`, else `tests/wpt-corpus/` (git-ignored — nothing of
the WPT is vendored), else the legacy path, so the machine that has
always run these needs nothing set. `sem_corpus_wpt!()` is the first
statement of each of the 51 tests that read it: no corpus, the test
prints why and returns.

Skipping is not the silent green this repository warns about: the skip
prints the path it looked for, `corpus_is_present` is a test whose whole
job is to report the state, and no number is published from a run that
skipped — `tests/css/README.md`'s figure comes from the fixture corpus,
which is in the tree and always runs.

`path()` also normalises the separator. Two of the 51 named the file
`css-grid\alignment\…`, which on Linux is a filename containing
backslashes: they failed with the corpus in place, and were the only two
a corpus alone did not fix.

CI now clones the corpus sparsely for that job, which is what turns
these 51 from a habit into a ruler. The checkout procedure is NOT
written a second time — `scripts/wpt_reftests.md` has it, including the
warning that narrowing an existing checkout deletes folders silently.

Measured both ways, `cargo test --profile fast -p rts-dom
-p rts-dom-bridge`:
- with the corpus (a sparse wpt checkout, 57 MB): **1511 passed, 0
  failed**. So 49 of the 51 were already correct and nobody could know;
  the 2 that were not were the backslashes.
- without it: **1511 passed, 0 failed**, 51 skipped — against 1460
  passed and 50 FAILED before this change.

Not touched, and the same pattern: `rts-text` reads
`C:/Users/…/wpt-corpus/fonts/Ahem.ttf` in a `#[cfg(test)]` block of
`src/adapter.rs` and in `tests/shaping_and_breaks.rs`. Both are already
graceful — the crate's tests pass here — and sharing this resolver would
mean a crate for test support, which is a decision of its own.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01KjcGCJ2vTJf62LEjTE8d4M
@MarcosBrendonDePaula
MarcosBrendonDePaula merged commit bc3e93c into main Oct 24, 2026
13 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

Cross-runtime parity (RTS vs Bun vs Node)

Metric Value
Total 1528
✅ Pass 1369
❌ RTS diverges 111
⚠️ Bun ≠ Node 6
💥 RTS error 41
🚫 Rejected 0

Divergences detected

claude-array-index-upper-boundary — rts_diverge

Bun output:

maxIndexLen=4294967295
maxIndexVal=last
maxIndexKeys=4294967294
maxIndexIn=false true
beyondLen=0
beyondKeys=4294967295
beyondVal=beyond
aboveLen=0 keys=4294967296
setMaxLen=4294967295 keys=0
setBeyond=RangeError
stillMax=4294967295
ctorMax=4294967295
ctorBeyond=RangeError
ctorNeg=RangeError
ctorFrac=RangeError
hugeLen=4000000001 hugeKeys=1 hugeLast=x
hugeHas=true false

Node output:

maxIndexLen=4294967295
maxIndexVal=last
maxIndexKeys=4294967294
maxIndexIn=false true
beyondLen=0
beyondKeys=4294967295
beyondVal=beyond
aboveLen=0 keys=4294967296
setMaxLen=4294967295 keys=0
setBeyond=RangeError
stillMax=4294967295
ctorMax=4294967295
ctorBeyond=RangeError
ctorNeg=RangeError
ctorFrac=RangeError
hugeLen=4000000001 hugeKeys=1 hugeLast=x
hugeHas=true false

RTS output:

maxIndexLen=4294967295
maxIndexVal=last
maxIndexKeys=4294967294
maxIndexIn=false true
beyondLen=0
beyondKeys=4294967295
beyondVal=beyond
aboveLen=0 keys=4294967296
setMaxLen=4294967295 keys=0
stillMax=4294967296
ctorMax=4294967295
ctorBeyond=RangeError
ctorNeg=RangeError
ctorFrac=RangeError
hugeLen=4000000001 hugeKeys=1 hugeLast=undefined
hugeHas=true false
claude-array-length-truncation-and-nonwritable — rts_diverge

Bun output:

trunc=[0,1] len=2
idx2=undefined has2=false
grow=5 holes=yynnn
strLen=1 [1]
throw -1 -> RangeError
throw 1.5 -> RangeError
throw NaN -> RangeError
throw 4294967296 -> RangeError
throw Infinity -> RangeError
blockedSet=false
blockedLen=3 kept=0,1,22
desc=true,false,false
frozenSet=false len=2
frozenDesc=false

Node output:

trunc=[0,1] len=2
idx2=undefined has2=false
grow=5 holes=yynnn
strLen=1 [1]
throw -1 -> RangeError
throw 1.5 -> RangeError
throw NaN -> RangeError
throw 4294967296 -> RangeError
throw Infinity -> RangeError
blockedSet=false
blockedLen=3 kept=0,1,22
desc=true,false,false
frozenSet=false len=2
frozenDesc=false

RTS output:

trunc=[0,1] len=2
idx2=undefined has2=false
grow=5 holes=yynnn
strLen=1 {}
ok -1 -> -1
ok 1.5 -> 1.5
ok NaN -> NaN
ok 4294967296 -> 4294967296
ok Infinity -> Infinity
blockedSet=true
blockedLen=0 kept=
desc=true,false,false
frozenSet=false len=2
frozenDesc=false
claude-from-async-iterables-and-arraylike — rts_diverge

Bun output:

iterable=10,20 order=y1 m0 y2 m1
arrayLike=a,undefined,c
arrayLikeIn=yyy
negLen=0
nanLen=0
fracLen=2
strLen=2
noLen=0
string=3
stringLike=3
mapArity=2,2
ctor=C len=2 v=12
badMap=TypeError
pulledAfterBadMap=false
set=1,2
map=1:a
of=1 ctor=3

Node output:

iterable=10,20 order=y1 m0 y2 m1
arrayLike=a,undefined,c
arrayLikeIn=yyy
negLen=0
nanLen=0
fracLen=2
strLen=2
noLen=0
string=3
stringLike=3
mapArity=2,2
ctor=C len=2 v=12
badMap=TypeError
pulledAfterBadMap=false
set=1,2
map=1:a
of=1 ctor=3

RTS output:

iterable=10,20 order=y1 m0 y2 m1
arrayLike=a,undefined,c
arrayLikeIn=yyy
negLen=0
nanLen=0
fracLen=2
strLen=2
noLen=0
string=3
stringLike=3
mapArity=3,3
ctor=C len=2 v=12
pulledAfterBadMap=true
set=1,2
map=1:a
of=1 ctor=3
claude-join-cycle-detection — rts_error

Bun output:

self=1,2,
selfToString=1,2,
mutual_b=1-2,
mutual_c=2-1,
triple=||9
again=1,2,
obj=O,1
nested=1,2,3,4
nestedStr=1,2,3,4

Node output:

self=1,2,
selfToString=1,2,
mutual_b=1-2,
mutual_c=2-1,
triple=||9
again=1,2,
obj=O,1
nested=1,2,3,4
nestedStr=1,2,3,4

RTS output:


claude-species-and-subclass-derivation — rts_diverge

Bun output:

isSub=true isArr=true
map=true
filter=true
slice=true
splice=true
concat=true
flat=true
flatMap=true
toSorted=false
toReversed=false
toSpliced=false
with=false
join=string
reduceType=number
speciesArray=false isArr=true
nullSpecies=true
badSpecies=TypeError
ctorCalls=0:undefined 1:3 1:0
ofSub=true fromSub=true
arraySpecies=true
subSpecies=true

Node output:

isSub=true isArr=true
map=true
filter=true
slice=true
splice=true
concat=true
flat=true
flatMap=true
toSorted=false
toReversed=false
toSpliced=false
with=false
join=string
reduceType=number
speciesArray=false isArr=true
nullSpecies=true
badSpecies=TypeError
ctorCalls=0:undefined 1:3 1:0
ofSub=true fromSub=true
arraySpecies=true
subSpecies=true

RTS output:

isSub=true isArr=true
map=true
filter=true
slice=true
splice=true
concat=true
flat=true
flatMap=false
toSorted=false
toReversed=false
toSpliced=false
with=false
join=string
reduceType=number
speciesArray=false isArr=true
nullSpecies=true
ctorCalls=0:undefined 1:3 1:0
ofSub=true fromSub=true
arraySpecies=true
subSpecies=true
claude2-array-length-and-defineproperty-interplay — rts_diverge

Bun output:

defineSmaller=true 2[0,1]
shrinkAndLock=true 1[0]
lockedDesc={"value":1,"writable":false,"enumerable":false,"configurable":false}
pushAfterLock=TypeError:1
setAfterLock=false 1[0]
indexWriteAfterLock=false 1[0]
index0WriteAfterLock=true v=y
unlock=false
sameValueRedefine=true
makeEnumerable=false
makeConfigurable=false
makeAccessor=false
cDesc={"value":1,"writable":true,"enumerable":false,"configurable":false}
blocked=false 3[0,1,2]
blockedAgain=false 3[0,1,2]
blockedGrow=true len=9
defineIndex5=true 6[0,5]
defineIndex0=true 6[0,5]
defineStrKey=true 6[0,5,007]
defineFloatKey=true 6[0,5,007,1.5]
accessorIndex=1[0] v=computed join=computed json=["computed"]
accessorMap=["computed"]
nonEnumIndex=2[0] join=1,2 json=[1,2]
nonEnumForEach=2
nonEnumForIn=0

Node output:

defineSmaller=true 2[0,1]
shrinkAndLock=true 1[0]
lockedDesc={"value":1,"writable":false,"enumerable":false,"configurable":false}
pushAfterLock=TypeError:1
setAfterLock=false 1[0]
indexWriteAfterLock=false 1[0]
index0WriteAfterLock=true v=y
unlock=false
sameValueRedefine=true
makeEnumerable=false
makeConfigurable=false
makeAccessor=false
cDesc={"value":1,"writable":true,"enumerable":false,"configurable":false}
blocked=false 3[0,1,2]
blockedAgain=false 3[0,1,2]
blockedGrow=true len=9
defineIndex5=true 6[0,5]
defineIndex0=true 6[0,5]
defineStrKey=true 6[0,5,007]
defineFloatKey=true 6[0,5,007,1.5]
accessorIndex=1[0] v=computed join=computed json=["computed"]
accessorMap=["computed"]
nonEnumIndex=2[0] join=1,2 json=[1,2]
nonEnumForEach=2
nonEnumForIn=0

RTS output:

defineSmaller=true 2[0,1]
shrinkAndLock=true 1[0]
lockedDesc={"value":1,"writable":true,"enumerable":false,"configurable":false}
pushAfterLock=no-throw:2
setAfterLock=true 5[0,1]
indexWriteAfterLock=true 5[0,1]
index0WriteAfterLock=true v=y
unlock=true
sameValueRedefine=true
makeEnumerable=false
makeConfigurable=false
makeAccessor=false
cDesc={"value":1,"writable":true,"enumerable":false,"configurable":false}
blocked=false 3[0,1,2]
blockedAgain=true 1[0]
blockedGrow=true len=9
defineIndex5=true 6[0,5]
defineIndex0=true 6[0,5]
defineStrKey=true 6[0,5,007]
defineFloatKey=true 6[0,5,007,1.5]
accessorIndex=0[0] v=undefined join= json=[]
accessorMap=[]
nonEnumIndex=2[0,1] join=1,2 json=[1,2]
nonEnumForEach=2
nonEnumForIn=0,1
claude2-spread-vs-from-vs-concat-protocols — rts_diverge

Bun output:

spread=it0,it1 pulls=pull0 pull1 pull2
from=it0,it1 pulls=pull0 pull1 pull2
concat=1 pulls=
sliceCall=i0,i1,i2 pulls=
patchedSpread=A,B
patchedFrom=A,B
patchedSlice=1,2,3
patchedConcat=1,2,3
patchedJoin=1,2,3
patchedForOf=A,B
holes spread=yyy from=yyy slice=yny concat=yny
strSpread=2 strFrom=2 strSlice=3
setSpread=1,2 setSliceLen=0
callSpread=2:it0|it1
objSpread={"0":"i0","1":"i1","2":"i2","length":3}
objSpreadArray={"0":1,"2":3}
objSpreadString={"0":"a","1":"b"}
spreadPlain=TypeError
objSpreadNull={"k":1}
fromPlain=0
badIterSpread=TypeError
badIterFrom=TypeError
undefIterFrom=z

Node output:

spread=it0,it1 pulls=pull0 pull1 pull2
from=it0,it1 pulls=pull0 pull1 pull2
concat=1 pulls=
sliceCall=i0,i1,i2 pulls=
patchedSpread=A,B
patchedFrom=A,B
patchedSlice=1,2,3
patchedConcat=1,2,3
patchedJoin=1,2,3
patchedForOf=A,B
holes spread=yyy from=yyy slice=yny concat=yny
strSpread=2 strFrom=2 strSlice=3
setSpread=1,2 setSliceLen=0
callSpread=2:it0|it1
objSpread={"0":"i0","1":"i1","2":"i2","length":3}
objSpreadArray={"0":1,"2":3}
objSpreadString={"0":"a","1":"b"}
spreadPlain=TypeError
objSpreadNull={"k":1}
fromPlain=0
badIterSpread=TypeError
badIterFrom=TypeError
undefIterFrom=z

RTS output:

spread=it0,it1 pulls=pull0 pull1 pull2
from=it0,it1 pulls=pull0 pull1 pull2
concat=1 pulls=
sliceCall=i0,i1,i2 pulls=
patchedSpread=1,2,3
patchedFrom=1,2,3
patchedSlice=1,2,3
patchedConcat=1,2,3
patchedJoin=1,2,3
patchedForOf=A,B
holes spread=yyy from=yyy slice=yny concat=yny
strSpread=2 strFrom=2 strSlice=3
setSpread=1,2 setSliceLen=0
callSpread=2:it0|it1
objSpread={"0":"i0","1":"i1","2":"i2","length":3}
objSpreadArray={"0":1,"2":3}
objSpreadString={"0":"a","1":"b"}
spreadPlain=TypeError
objSpreadNull={"k":1}
fromPlain=0
badIterSpread=TypeError
badIterFrom=TypeError
undefIterFrom=z
codex3_021_array_length_shrink_rollback — rts_diverge

Bun output:

true 3 0,1,2
2 undefined undefined

Node output:

true 3 0,1,2
2 undefined undefined

RTS output:

false 1 0
undefined undefined undefined
codex3_022_array_map_holes_getter_mutation — rts_diverge

Bun output:

0:10|1:2|3:4
4 0,1,3 [20,4,null,8]
5

Node output:

0:10|1:2|3:4
4 0,1,3 [20,4,null,8]
5

RTS output:

0:1|1:2|2:3|3:4
4 0,1,2,3 [2,4,6,8]
4
codex3_025_array_sort_accessor_sideeffects — rts_diverge

Bun output:

2 3
get0|set0:1

Node output:

2 3
get0|set0:1

RTS output:

2 3
codex3_026_array_splice_species — rts_diverge

Bun output:

true false 2,3
true 1,9,4

Node output:

true false 2,3
true 1,9,4

RTS output:

true false 2,3,
true 1,9,4
claude-asintn-asuintn-wrapping — rts_diverge

Bun output:

bits=0 v=0 int=0 uint=0
bits=0 v=1 int=0 uint=0
bits=0 v=-1 int=0 uint=0
bits=0 v=255 int=0 uint=0
bits=1 v=0 int=0 uint=0
bits=1 v=1 int=-1 uint=1
bits=1 v=2 int=0 uint=0
bits=1 v=3 int=-1 uint=1
bits=1 v=-1 int=-1 uint=1
bits=1 v=-2 int=0 uint=0
bits=8 v=127 int=127 uint=127
bits=8 v=128 int=-128 uint=128
bits=8 v=255 int=-1 uint=255
bits=8 v=256 int=0 uint=0
bits=8 v=-1 int=-1 uint=255
bits=8 v=-128 int=-128 uint=128
bits=8 v=-129 int=127 uint=127
bits=32 v=2147483647 int=2147483647 uint=2147483647
bits=32 v=2147483648 int=-2147483648 uint=2147483648
bits=32 v=4294967295 int=-1 uint=4294967295
bits=32 v=4294967296 int=0 uint=0
bits=32 v=-2147483648 int=-2147483648 uint=2147483648
bits=64 v=9223372036854775807 int=9223372036854775807 uint=9223372036854775807
bits=64 v=9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=18446744073709551615 int=-1 uint=18446744073709551615
bits=64 v=18446744073709551616 int=0 uint=0
bits=64 v=-9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=-9223372036854775809 int=9223372036854775807 uint=9223372036854775807
bits=128 v=1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
bits=128 v=-1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
idempotent=true
floatBits=44
strBits=44
negBits=RangeError
numberValue=TypeError
strValue=44
type=bigint

Node output:

bits=0 v=0 int=0 uint=0
bits=0 v=1 int=0 uint=0
bits=0 v=-1 int=0 uint=0
bits=0 v=255 int=0 uint=0
bits=1 v=0 int=0 uint=0
bits=1 v=1 int=-1 uint=1
bits=1 v=2 int=0 uint=0
bits=1 v=3 int=-1 uint=1
bits=1 v=-1 int=-1 uint=1
bits=1 v=-2 int=0 uint=0
bits=8 v=127 int=127 uint=127
bits=8 v=128 int=-128 uint=128
bits=8 v=255 int=-1 uint=255
bits=8 v=256 int=0 uint=0
bits=8 v=-1 int=-1 uint=255
bits=8 v=-128 int=-128 uint=128
bits=8 v=-129 int=127 uint=127
bits=32 v=2147483647 int=2147483647 uint=2147483647
bits=32 v=2147483648 int=-2147483648 uint=2147483648
bits=32 v=4294967295 int=-1 uint=4294967295
bits=32 v=4294967296 int=0 uint=0
bits=32 v=-2147483648 int=-2147483648 uint=2147483648
bits=64 v=9223372036854775807 int=9223372036854775807 uint=9223372036854775807
bits=64 v=9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=18446744073709551615 int=-1 uint=18446744073709551615
bits=64 v=18446744073709551616 int=0 uint=0
bits=64 v=-9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=-9223372036854775809 int=9223372036854775807 uint=9223372036854775807
bits=128 v=1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
bits=128 v=-1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
idempotent=true
floatBits=44
strBits=44
negBits=RangeError
numberValue=TypeError
strValue=44
type=bigint

RTS output:

bits=0 v=0 int=0 uint=0
bits=0 v=1 int=0 uint=0
bits=0 v=-1 int=0 uint=0
bits=0 v=255 int=0 uint=0
bits=1 v=0 int=0 uint=0
bits=1 v=1 int=-1 uint=1
bits=1 v=2 int=0 uint=0
bits=1 v=3 int=-1 uint=1
bits=1 v=-1 int=-1 uint=1
bits=1 v=-2 int=0 uint=0
bits=8 v=127 int=127 uint=127
bits=8 v=128 int=-128 uint=128
bits=8 v=255 int=-1 uint=255
bits=8 v=256 int=0 uint=0
bits=8 v=-1 int=-1 uint=255
bits=8 v=-128 int=-128 uint=128
bits=8 v=-129 int=127 uint=127
bits=32 v=2147483647 int=2147483647 uint=2147483647
bits=32 v=2147483648 int=-2147483648 uint=2147483648
bits=32 v=4294967295 int=-1 uint=4294967295
bits=32 v=4294967296 int=0 uint=0
bits=32 v=-2147483648 int=-2147483648 uint=2147483648
bits=64 v=9223372036854775807 int=9223372036854775807 uint=9223372036854775807
bits=64 v=9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=18446744073709551615 int=-1 uint=18446744073709551615
bits=64 v=18446744073709551616 int=0 uint=0
bits=64 v=-9223372036854775808 int=-9223372036854775808 uint=9223372036854775808
bits=64 v=-9223372036854775809 int=9223372036854775807 uint=9223372036854775807
bits=128 v=1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
bits=128 v=-1606938044258990275541962092341162602522202993782792835301376 int=0 uint=0
idempotent=true
floatBits=44
strBits=44
negBits=RangeError
strValue=undefined
type=bigint
claude-bigint-constructor-string-forms — rts_diverge

Bun output:

plain=10n
padded=10n
tabbed=10n
empty=0n
blank=0n
nbsp_only=0n
bom_wrapped=10n
plus=10n
minus=-10n
minus_zero=0n
plus_zero=0n
leading_zeros=7n
inner_space!SyntaxError
trailing_junk!SyntaxError
long=123456789012345678901234567890n
hex_lower=31n
hex_upper=31n
binary=5n
binary_upper=5n
octal=15n
octal_upper=15n
hex_signed!SyntaxError
hex_plus!SyntaxError
bare_0x!SyntaxError
legacy_octal=17n
fraction!SyntaxError
trailing_dot!SyntaxError
leading_dot!SyntaxError
exponent!SyntaxError
exponent_upper!SyntaxError
separator!SyntaxError
bigint_suffix!SyntaxError
infinity!SyntaxError
neg_infinity!SyntaxError
nan_string!SyntaxError
num_int=10n
num_neg=-10n
num_zero=0n
num_negzero=0n
num_fraction!RangeError
num_tiny_fraction!RangeError
num_nan!RangeError
num_infinity!RangeError
num_neg_infinity!RangeError
num_2pow53=9007199254740992n
num_2pow53_plus1_literal=9007199254740992n
num_1e21=1000000000000000000000n
num_max_value=179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368n
num_min_value!RangeError
true=1n
false=0n
null!TypeError
undefined!TypeError
symbol!TypeError
bigint_itself=7n
empty_array=0n
array_one=15n
array_two!SyntaxError
array_nested=7n
plain_object!SyntaxError
valueof_num=7n
valueof_frac!RangeError
valueof_string=16n
tostring_only=42n
number_wrapper=9n
string_wrapper=9n
bigint_wrapper=9n
new_BigInt!TypeError
BigInt_length=1
BigInt_name=BigInt
has_prototype=object
proto_tag=BigInt
asIntN_length=2
asUintN_length=2

Node output:

plain=10n
padded=10n
tabbed=10n
empty=0n
blank=0n
nbsp_only=0n
bom_wrapped=10n
plus=10n
minus=-10n
minus_zero=0n
plus_zero=0n
leading_zeros=7n
inner_space!SyntaxError
trailing_junk!SyntaxError
long=123456789012345678901234567890n
hex_lower=31n
hex_upper=31n
binary=5n
binary_upper=5n
octal=15n
octal_upper=15n
hex_signed!SyntaxError
hex_plus!SyntaxError
bare_0x!SyntaxError
legacy_octal=17n
fraction!SyntaxError
trailing_dot!SyntaxError
leading_dot!SyntaxError
exponent!SyntaxError
exponent_upper!SyntaxError
separator!SyntaxError
bigint_suffix!SyntaxError
infinity!SyntaxError
neg_infinity!SyntaxError
nan_string!SyntaxError
num_int=10n
num_neg=-10n
num_zero=0n
num_negzero=0n
num_fraction!RangeError
num_tiny_fraction!RangeError
num_nan!RangeError
num_infinity!RangeError
num_neg_infinity!RangeError
num_2pow53=9007199254740992n
num_2pow53_plus1_literal=9007199254740992n
num_1e21=1000000000000000000000n
num_max_value=179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368n
num_min_value!RangeError
true=1n
false=0n
null!TypeError
undefined!TypeError
symbol!TypeError
bigint_itself=7n
empty_array=0n
array_one=15n
array_two!SyntaxError
array_nested=7n
plain_object!SyntaxError
valueof_num=7n
valueof_frac!RangeError
valueof_string=16n
tostring_only=42n
number_wrapper=9n
string_wrapper=9n
bigint_wrapper=9n
new_BigInt!TypeError
BigInt_length=1
BigInt_name=BigInt
has_prototype=object
proto_tag=BigInt
asIntN_length=2
asUintN_length=2

RTS output:

plain=10n
padded=10n
tabbed=10n
empty=0n
blank=0n
nbsp_only=0n
bom_wrapped=10n
plus=10n
minus=-10n
minus_zero=0n
plus_zero=0n
leading_zeros=7n
inner_space!SyntaxError
trailing_junk!SyntaxError
long=123456789012345678901234567890n
hex_lower=31n
hex_upper=31n
binary=5n
binary_upper=5n
octal=15n
octal_upper=15n
hex_signed!SyntaxError
hex_plus!SyntaxError
bare_0x!SyntaxError
legacy_octal=17n
fraction!SyntaxError
trailing_dot!SyntaxError
leading_dot!SyntaxError
exponent!SyntaxError
exponent_upper!SyntaxError
separator!SyntaxError
bigint_suffix!SyntaxError
infinity!SyntaxError
neg_infinity!SyntaxError
nan_string!SyntaxError
num_int=10n
num_neg=-10n
num_zero=0n
num_negzero=0n
num_fraction!RangeError
num_tiny_fraction!RangeError
num_nan!RangeError
num_infinity!RangeError
num_neg_infinity!RangeError
num_2pow53=9007199254740992n
num_2pow53_plus1_literal=9007199254740992n
num_1e21=1000000000000000000000n
num_max_value=179769313486231570814527423731704356798070567525844996598917476803157260780028538760589558632766878171540458953514382464234321326889464182768467546703537516986049910576551282076245490090389328944075868508455133942304583236903222948165808559332123348274797826204144723168738177180919299881250404026184124858368n
num_min_value!RangeError
true=1n
false=0n
null=undefinedn
undefined=undefinedn
symbol=undefinedn
bigint_itself=7n
empty_array=undefinedn
array_one=undefinedn
array_two=undefinedn
array_nested=undefinedn
plain_object=undefinedn
valueof_num=undefinedn
valueof_frac=undefinedn
valueof_string=undefinedn
tostring_only=undefinedn
number_wrapper=undefinedn
string_wrapper=undefinedn
bigint_wrapper=undefinedn
new_BigInt=undefined
BigInt_length=1
BigInt_name=BigInt
has_prototype=object
proto_tag=BigInt
asIntN_length=2
asUintN_length=2
claude-bigint-division-shifts-and-bitwise — rts_diverge

Bun output:

div_pp=3
div_np=-3
div_pn=-3
div_nn=3
div_exact=2
div_smaller=0
div_smaller_neg=0
div_huge=142857142857142857142857142857
mod_pp=1
mod_np=-1
mod_pn=1
mod_nn=-1
mod_exact=0
mod_smaller=1
identity=-7
div_by_zero!RangeError
mod_by_zero!RangeError
zero_div_zero!RangeError
zero_div_one=0
neg_zero_literal=0
neg_zero_is_zero=true
pow=1024
pow_zero=1
pow_neg_base_odd=-8
pow_neg_base_even=16
pow_neg_exp!RangeError
pow_zero_neg_exp!RangeError
pow_one_neg_exp!RangeError
pow_big=18446744073709551616
shl=256
shl_big=1267650600228229401496703205376
shl_neg_count=2
shr=16
shr_neg_count=256
shr_to_zero=0
shr_neg_value=-1
shr_neg_value2=-3
shr_neg_far=-1
shr_pos_far=0
shl_neg_value=-8
ushr!TypeError
not_5=-6
not_neg1=0
not_0=-1
and_neg=255
and_neg_neg=-2
or_neg=-1
xor_self_neg=0
xor_neg=-6
and_big=0
or_big=1267650600228229401496703205377
asIntN_0=0
asUintN_0=0
asIntN_1_of_1=-1
asIntN_1_of_0=0
asIntN_1_of_neg1=-1
asUintN_1_of_3=1
asUintN_1_of_neg1=1
asIntN_3_of_7=-1
asIntN_3_of_4=-4
asUintN_3_of_neg1=7
asIntN_64_wrap=-9223372036854775808
asUintN_64_wrap=18446744073709551615
asIntN_neg_width!RangeError
asIntN_frac_width=-1
asIntN_string_width=-1
asIntN_number_value!TypeError

Node output:

div_pp=3
div_np=-3
div_pn=-3
div_nn=3
div_exact=2
div_smaller=0
div_smaller_neg=0
div_huge=142857142857142857142857142857
mod_pp=1
mod_np=-1
mod_pn=1
mod_nn=-1
mod_exact=0
mod_smaller=1
identity=-7
div_by_zero!RangeError
mod_by_zero!RangeError
zero_div_zero!RangeError
zero_div_one=0
neg_zero_literal=0
neg_zero_is_zero=true
pow=1024
pow_zero=1
pow_neg_base_odd=-8
pow_neg_base_even=16
pow_neg_exp!RangeError
pow_zero_neg_exp!RangeError
pow_one_neg_exp!RangeError
pow_big=18446744073709551616
shl=256
shl_big=1267650600228229401496703205376
shl_neg_count=2
shr=16
shr_neg_count=256
shr_to_zero=0
shr_neg_value=-1
shr_neg_value2=-3
shr_neg_far=-1
shr_pos_far=0
shl_neg_value=-8
ushr!TypeError
not_5=-6
not_neg1=0
not_0=-1
and_neg=255
and_neg_neg=-2
or_neg=-1
xor_self_neg=0
xor_neg=-6
and_big=0
or_big=1267650600228229401496703205377
asIntN_0=0
asUintN_0=0
asIntN_1_of_1=-1
asIntN_1_of_0=0
asIntN_1_of_neg1=-1
asUintN_1_of_3=1
asUintN_1_of_neg1=1
asIntN_3_of_7=-1
asIntN_3_of_4=-4
asUintN_3_of_neg1=7
asIntN_64_wrap=-9223372036854775808
asUintN_64_wrap=18446744073709551615
asIntN_neg_width!RangeError
asIntN_frac_width=-1
asIntN_string_width=-1
asIntN_number_value!TypeError

RTS output:

div_pp=3
div_np=-3
div_pn=-3
div_nn=3
div_exact=2
div_smaller=0
div_smaller_neg=0
div_huge=142857142857142857142857142857
mod_pp=1
mod_np=-1
mod_pn=1
mod_nn=-1
mod_exact=0
mod_smaller=1
identity=-7
div_by_zero!RangeError
mod_by_zero!RangeError
zero_div_zero!RangeError
zero_div_one=0
neg_zero_literal=0
neg_zero_is_zero=true
pow=1024
pow_zero=1
pow_neg_base_odd=-8
pow_neg_base_even=16
pow_neg_exp!RangeError
pow_zero_neg_exp!RangeError
pow_one_neg_exp!RangeError
pow_big=18446744073709551616
shl=256
shl_big=1267650600228229401496703205376
shl_neg_count=2
shr=16
shr_neg_count=256
shr_to_zero=0
shr_neg_value=-1
shr_neg_value2=-3
shr_neg_far=-1
shr_pos_far=0
shl_neg_value=-8
ushr!TypeError
not_5=-6
not_neg1=0
not_0=-1
and_neg=255
and_neg_neg=-2
or_neg=-1
xor_self_neg=0
xor_neg=-6
and_big=0
or_big=1267650600228229401496703205377
asIntN_0=0
asUintN_0=0
asIntN_1_of_1=-1
asIntN_1_of_0=0
asIntN_1_of_neg1=-1
asUintN_1_of_3=1
asUintN_1_of_neg1=1
asIntN_3_of_7=-1
asIntN_3_of_4=-4
asUintN_3_of_neg1=7
asIntN_64_wrap=-9223372036854775808
asUintN_64_wrap=18446744073709551615
asIntN_neg_width!RangeError
asIntN_frac_width=-1
asIntN_string_width=-1
asIntN_number_value=undefined
claude-bigint-number-mixing-typeerrors — rts_diverge

Bun output:

bigint_plus_number!TypeError
number_plus_bigint!TypeError
bigint_minus_number!TypeError
bigint_times_number!TypeError
bigint_div_number!TypeError
bigint_mod_number!TypeError
bigint_pow_number!TypeError
number_pow_bigint!TypeError
bigint_plus_bool!TypeError
bigint_plus_null!TypeError
bigint_plus_undefined!TypeError
bigint_plus_nan!TypeError
bigint_plus_bigint=5
unary_minus=-2
unary_tilde=-3
unary_plus!TypeError
unary_plus_wrapper!TypeError
and_mixed!TypeError
or_mixed!TypeError
xor_mixed!TypeError
shl_mixed!TypeError
shr_mixed!TypeError
and_pure=2
shl_pure=16
ushr_pure!TypeError
ushr_mixed!TypeError
bigint_plus_string=2x
string_plus_bigint=x2
bigint_plus_numeric_string=23
bigint_minus_string!TypeError
template=2
bigint_plus_array=2
bigint_plus_object=2[object Object]
lt=true
gt=true
le=true
ge=false
lt_float=true
gt_float=true
lt_nan=false
gt_nan=false
lt_infinity=true
gt_neginfinity=true
lt_string=true
huge_vs_double=true
loose_eq=true
loose_eq_float=false
strict_eq=false
loose_eq_string=true
loose_eq_hex_string=true
loose_eq_bad_string=false
loose_eq_empty_string=true
loose_eq_bool=true
loose_eq_true=true
loose_eq_null=false
loose_eq_undefined=false
loose_eq_nan=false
loose_eq_array=true
loose_eq_wrapper=true
math_abs!TypeError
math_max!TypeError
math_floor!TypeError
math_sqrt!TypeError
math_sign!TypeError
Number_of_bigint=2
String_of_bigint=2
Boolean_of_bigint=false
BigInt_of_number=2
isNaN_of_bigint!TypeError
Number_isInteger=false
parseInt_of_bigint=2

Node output:

bigint_plus_number!TypeError
number_plus_bigint!TypeError
bigint_minus_number!TypeError
bigint_times_number!TypeError
bigint_div_number!TypeError
bigint_mod_number!TypeError
bigint_pow_number!TypeError
number_pow_bigint!TypeError
bigint_plus_bool!TypeError
bigint_plus_null!TypeError
bigint_plus_undefined!TypeError
bigint_plus_nan!TypeError
bigint_plus_bigint=5
unary_minus=-2
unary_tilde=-3
unary_plus!TypeError
unary_plus_wrapper!TypeError
and_mixed!TypeError
or_mixed!TypeError
xor_mixed!TypeError
shl_mixed!TypeError
shr_mixed!TypeError
and_pure=2
shl_pure=16
ushr_pure!TypeError
ushr_mixed!TypeError
bigint_plus_string=2x
string_plus_bigint=x2
bigint_plus_numeric_string=23
bigint_minus_string!TypeError
template=2
bigint_plus_array=2
bigint_plus_object=2[object Object]
lt=true
gt=true
le=true
ge=false
lt_float=true
gt_float=true
lt_nan=false
gt_nan=false
lt_infinity=true
gt_neginfinity=true
lt_string=true
huge_vs_double=true
loose_eq=true
loose_eq_float=false
strict_eq=false
loose_eq_string=true
loose_eq_hex_string=true
loose_eq_bad_string=false
loose_eq_empty_string=true
loose_eq_bool=true
loose_eq_true=true
loose_eq_null=false
loose_eq_undefined=false
loose_eq_nan=false
loose_eq_array=true
loose_eq_wrapper=true
math_abs!TypeError
math_max!TypeError
math_floor!TypeError
math_sqrt!TypeError
math_sign!TypeError
Number_of_bigint=2
String_of_bigint=2
Boolean_of_bigint=false
BigInt_of_number=2
isNaN_of_bigint!TypeError
Number_isInteger=false
parseInt_of_bigint=2

RTS output:

bigint_plus_number!TypeError
number_plus_bigint!TypeError
bigint_minus_number!TypeError
bigint_times_number!TypeError
bigint_div_number!TypeError
bigint_mod_number!TypeError
bigint_pow_number!TypeError
number_pow_bigint!TypeError
bigint_plus_bool!TypeError
bigint_plus_null!TypeError
bigint_plus_undefined!TypeError
bigint_plus_nan!TypeError
bigint_plus_bigint=5
unary_minus=-2
unary_tilde=-3
unary_plus!TypeError
unary_plus_wrapper!TypeError
and_mixed!TypeError
or_mixed!TypeError
xor_mixed!TypeError
shl_mixed!TypeError
shr_mixed!TypeError
and_pure=2
shl_pure=16
ushr_pure!TypeError
ushr_mixed!TypeError
bigint_plus_string=2x
string_plus_bigint=x2
bigint_plus_numeric_string=23
bigint_minus_string!TypeError
template=2
bigint_plus_array=2
bigint_plus_object=2[object Object]
lt=true
gt=true
le=true
ge=false
lt_float=true
gt_float=true
lt_nan=false
gt_nan=false
lt_infinity=true
gt_neginfinity=true
lt_string=true
huge_vs_double=true
loose_eq=true
loose_eq_float=false
strict_eq=false
loose_eq_string=true
loose_eq_hex_string=true
loose_eq_bad_string=false
loose_eq_empty_string=true
loose_eq_bool=true
loose_eq_true=true
loose_eq_null=false
loose_eq_undefined=false
loose_eq_nan=false
loose_eq_array=true
loose_eq_wrapper=false
math_abs!TypeError
math_max!TypeError
math_floor!TypeError
math_sqrt!TypeError
math_sign!TypeError
Number_of_bigint=2
String_of_bigint=2
Boolean_of_bigint=false
BigInt_of_number=2
isNaN_of_bigint!TypeError
Number_isInteger=false
parseInt_of_bigint=2
claude-bigint-tostring-radix-and-keys — rts_diverge

Bun output:

r2=11111111 r8=377 r16=ff r36=73
neg=-ff zero=0
defaultRadix=255 explicit10=255
undefRadix=255
floatRadix=ff
strRadix=ff
radix1=RangeError
radix37=RangeError
radix0=RangeError
bigDec=340282366920938463463374607431768211456
bigHex=100000000000000000000000000000000
bigBin_len=129
bigMinusOneHex=ffffffffffffffffffffffffffffffff
factorial25=15511210043330985984000000
String=42
template=42
concat=42
json=TypeError
jsonReplacer={"v":"1"}
valueOf=1 typeof=bigint
wrongBrand=TypeError
wrapperBrand=7
keys=10 viaStr=ten viaNum=ten
hugeKey=10|1180591620717411303424
mapSize=2 big=big num=num
setDedup=2
defaultSort=10,100,2,9
numericSort=2,9,10,100

Node output:

r2=11111111 r8=377 r16=ff r36=73
neg=-ff zero=0
defaultRadix=255 explicit10=255
undefRadix=255
floatRadix=ff
strRadix=ff
radix1=RangeError
radix37=RangeError
radix0=RangeError
bigDec=340282366920938463463374607431768211456
bigHex=100000000000000000000000000000000
bigBin_len=129
bigMinusOneHex=ffffffffffffffffffffffffffffffff
factorial25=15511210043330985984000000
String=42
template=42
concat=42
json=TypeError
jsonReplacer={"v":"1"}
valueOf=1 typeof=bigint
wrongBrand=TypeError
wrapperBrand=7
keys=10 viaStr=ten viaNum=ten
hugeKey=10|1180591620717411303424
mapSize=2 big=big num=num
setDedup=2
defaultSort=10,100,2,9
numericSort=2,9,10,100

RTS output:

r2=11111111 r8=377 r16=ff r36=73
neg=-ff zero=0
defaultRadix=255 explicit10=255
undefRadix=255
floatRadix=ff
strRadix=ff
radix1=RangeError
radix37=RangeError
radix0=RangeError
bigDec=340282366920938463463374607431768211456
bigHex=100000000000000000000000000000000
bigBin_len=129
bigMinusOneHex=ffffffffffffffffffffffffffffffff
factorial25=15511210043330985984000000
String=42
template=42
concat=42
json=TypeError
jsonReplacer={"v":"1"}
valueOf=1 typeof=bigint
wrapperBrand=7
keys=10 viaStr=ten viaNum=ten
hugeKey=10|1180591620717411303424
mapSize=2 big=big num=num
setDedup=2
defaultSort=10,100,2,9
numericSort=2,9,10,100
claude-bigint-wrapper-and-collection-keys — rts_diverge

Bun output:

typeof_prim=bigint
typeof_wrapper=object
wrapper_tag=[object BigInt]
prim_tag=[object BigInt]
wrapper_valueOf_is_prim=true
wrapper_loose_eq=true
wrapper_strict_eq=false
two_wrappers_eq=false
wrapper_instanceof=true
prim_instanceof=false
proto_of_wrapper=true
Object_is_same=true
Object_is_cross_type=false
Object_is_neg_zero=true
valueOf_prim=1
valueOf_wrapper=1
valueOf_number!TypeError
valueOf_string!TypeError
toString_wrapper=ff
toString_prim=ff
toString_number!TypeError
--- Number() precision ---
num_2pow60=1152921504606847000
num_2pow60_exact=true
num_2pow53=9007199254740992
num_2pow53_plus1=9007199254740992
collision=true
roundtrip_lost=false
roundtrip_kept=true
num_huge_is_inf=true
num_neg_huge=true
--- collections ---
map_size=3
map_get_bigint=bigint
map_get_number=number
map_get_string=string
map_get_other_bigint_instance=bigint
set_size=4
set_has_bigint=true
set_has_number=false
includes_bigint=true
includes_number=false
indexOf_bigint=1
--- property keys ---
read_by_number=via-bigint
read_by_string=via-bigint
read_by_bigint_after=via-number
keys=1
key_count=1
key_typeof=string
has_own=true
array_by_bigint=b
array_len_after_bigint=4
array_join=a,b,c,d
huge_bigint_key=1180591620717411303424

Node output:

typeof_prim=bigint
typeof_wrapper=object
wrapper_tag=[object BigInt]
prim_tag=[object BigInt]
wrapper_valueOf_is_prim=true
wrapper_loose_eq=true
wrapper_strict_eq=false
two_wrappers_eq=false
wrapper_instanceof=true
prim_instanceof=false
proto_of_wrapper=true
Object_is_same=true
Object_is_cross_type=false
Object_is_neg_zero=true
valueOf_prim=1
valueOf_wrapper=1
valueOf_number!TypeError
valueOf_string!TypeError
toString_wrapper=ff
toString_prim=ff
toString_number!TypeError
--- Number() precision ---
num_2pow60=1152921504606847000
num_2pow60_exact=true
num_2pow53=9007199254740992
num_2pow53_plus1=9007199254740992
collision=true
roundtrip_lost=false
roundtrip_kept=true
num_huge_is_inf=true
num_neg_huge=true
--- collections ---
map_size=3
map_get_bigint=bigint
map_get_number=number
map_get_string=string
map_get_other_bigint_instance=bigint
set_size=4
set_has_bigint=true
set_has_number=false
includes_bigint=true
includes_number=false
indexOf_bigint=1
--- property keys ---
read_by_number=via-bigint
read_by_string=via-bigint
read_by_bigint_after=via-number
keys=1
key_count=1
key_typeof=string
has_own=true
array_by_bigint=b
array_len_after_bigint=4
array_join=a,b,c,d
huge_bigint_key=1180591620717411303424

RTS output:

typeof_prim=bigint
typeof_wrapper=object
wrapper_tag=[object BigInt]
prim_tag=[object BigInt]
wrapper_valueOf_is_prim=true
wrapper_loose_eq=true
wrapper_strict_eq=false
two_wrappers_eq=false
wrapper_instanceof=true
prim_instanceof=false
proto_of_wrapper=true
Object_is_same=true
Object_is_cross_type=false
Object_is_neg_zero=true
valueOf_prim=1
valueOf_wrapper=1
valueOf_number=1
valueOf_string=1
toString_wrapper=ff
toString_prim=ff
toString_number=undefined
--- Number() precision ---
num_2pow60=1152921504606847000
num_2pow60_exact=true
num_2pow53=9007199254740992
num_2pow53_plus1=9007199254740992
collision=true
roundtrip_lost=false
roundtrip_kept=true
num_huge_is_inf=true
num_neg_huge=true
--- collections ---
map_size=3
map_get_bigint=bigint
map_get_number=number
map_get_string=string
map_get_other_bigint_instance=bigint
set_size=4
set_has_bigint=true
set_has_number=false
includes_bigint=false
includes_number=false
indexOf_bigint=-1
--- property keys ---
read_by_number=via-bigint
read_by_string=via-bigint
read_by_bigint_after=via-number
keys=1
key_count=1
key_typeof=string
has_own=true
array_by_bigint=b
array_len_after_bigint=3
array_join=a,b,c
huge_bigint_key=1180591620717411303424
claude2-bigint-arithmetic-exactness — rts_error

Bun output:

20!=2432902008176640000
25!=15511210043330985984000000
30!=265252859812191058636308480000000
50!=30414093201713378043612608166064768844377641568960512000000000000
50!_digits=65
100!_digits=158
100!_trailing_zeros=24
number_factorial_first_wrong=23 all_wrong_from=23,24,25
18!_number=6402373705728000 exact=6402373705728000
21!_number=51090942171709440000 exact=51090942171709440000
fib_50=12586269025
fib_100=354224848179261915075
fib_200=280571172992510140037611932413038677189525
fib_300_digits=63
fib_identity=true
2^64=18446744073709551616
2^64-1=18446744073709551615
2^100=1267650600228229401496703205376
2^1024_digits=309
2^4096_digits=1234
2^64_is_shift=true
2^1024_finite=false as_number=Infinity
max_safe=9007199254740991
max_safe_plus_1=9007199254740992
max_safe_plus_2=9007199254740993
number_plus_1=9007199254740992
number_plus_2=9007199254740992
number_loses_it=true
bigint_keeps_it=false
roundtrip_through_number=false
BigInt_of_2p53=9007199254740992 vs 9007199254740992
div_exact=20
div_truncates=3,-3
div_reconstruct=true
div_reconstruct_neg=true
big_div=870
big_mod=109361473
powmod_small=24
powmod_fermat=1
powmod_big=136318165
powmod_matches_direct=true
gcd=1307674368000
gcd_coprime=1
gcd_zero=5,5
sorted=-1267650600228229401496703205376,-9007199254740991,0,9007199254740991,9007199254740992,9007199254740993,1267650600228229401496703205376
max_by_reduce=1267650600228229401496703205376
strict_ordering=true number_ordering=false

Node output:

20!=2432902008176640000
25!=15511210043330985984000000
30!=265252859812191058636308480000000
50!=30414093201713378043612608166064768844377641568960512000000000000
50!_digits=65
100!_digits=158
100!_trailing_zeros=24
number_factorial_first_wrong=23 all_wrong_from=23,24,25
18!_number=6402373705728000 exact=6402373705728000
21!_number=51090942171709440000 exact=51090942171709440000
fib_50=12586269025
fib_100=354224848179261915075
fib_200=280571172992510140037611932413038677189525
fib_300_digits=63
fib_identity=true
2^64=18446744073709551616
2^64-1=18446744073709551615
2^100=1267650600228229401496703205376
2^1024_digits=309
2^4096_digits=1234
2^64_is_shift=true
2^1024_finite=false as_number=Infinity
max_safe=9007199254740991
max_safe_plus_1=9007199254740992
max_safe_plus_2=9007199254740993
number_plus_1=9007199254740992
number_plus_2=9007199254740992
number_loses_it=true
bigint_keeps_it=false
roundtrip_through_number=false
BigInt_of_2p53=9007199254740992 vs 9007199254740992
div_exact=20
div_truncates=3,-3
div_reconstruct=true
div_reconstruct_neg=true
big_div=870
big_mod=109361473
powmod_small=24
powmod_fermat=1
powmod_big=136318165
powmod_matches_direct=true
gcd=1307674368000
gcd_coprime=1
gcd_zero=5,5
sorted=-1267650600228229401496703205376,-9007199254740991,0,9007199254740991,9007199254740992,9007199254740993,1267650600228229401496703205376
max_by_reduce=1267650600228229401496703205376
strict_ordering=true number_ordering=false

RTS output:


claude2-bigint-dataview-endianness — rts_diverge

Bun output:

0n | be:0000000000000000 | le:0000000000000000 | signed:0 | unsigned:0
1n | be:0000000000000001 | le:0100000000000000 | signed:1 | unsigned:1
-1n | be:ffffffffffffffff | le:ffffffffffffffff | signed:-1 | unsigned:18446744073709551615
255n | be:00000000000000ff | le:ff00000000000000 | signed:255 | unsigned:255
-255n | be:ffffffffffffff01 | le:01ffffffffffffff | signed:-255 | unsigned:18446744073709551361
2^32 | be:0000000100000000 | le:0000000001000000 | signed:4294967296 | unsigned:4294967296
2^63-1 | be:7fffffffffffffff | le:ffffffffffffff7f | signed:9223372036854775807 | unsigned:9223372036854775807
-2^63 | be:8000000000000000 | le:0000000000000080 | signed:-9223372036854775808 | unsigned:9223372036854775808
max_safe | be:001fffffffffffff | le:ffffffffffff1f00 | signed:9007199254740991 | unsigned:9007199254740991
0x0123456789abcdef | be:0123456789abcdef | le:efcdab8967452301 | signed:81985529216486895 | unsigned:81985529216486895
be_bytes=1,35,69,103,137,171,205,239
le_bytes=239,205,171,137,103,69,35,1
is_reversal=true
default_flag_is_big_endian=true
neg_one_unsigned=18446744073709551615
neg_one_is_2p64_minus_1=true
min_i64_unsigned=9223372036854775808
asUintN_agrees=true
max_u64_signed=-1
asIntN_agrees=true
wrap_above=5
wrap_negative_unsigned=18446744073709551611
wrap_huge=0
set_number!TypeError
set_numeric_string=written
set_null!TypeError
set_boolean=written
float64_rejects_bigint!TypeError
uint32_rejects_bigint!TypeError
offset_8_ok=42
offset_9_overruns!RangeError
offset_negative!RangeError
offset_fractional=1
offset_string=1
i64_view=-2,7
u64_view=18446744073709551614,7
byte_length=16 length=2 BYTES_PER_ELEMENT=8
typed_array_number_assign!TypeError
typed_array_from_numbers!TypeError
typed_array_from_bigints=1,2
sorted=-1,2,3

Node output:

0n | be:0000000000000000 | le:0000000000000000 | signed:0 | unsigned:0
1n | be:0000000000000001 | le:0100000000000000 | signed:1 | unsigned:1
-1n | be:ffffffffffffffff | le:ffffffffffffffff | signed:-1 | unsigned:18446744073709551615
255n | be:00000000000000ff | le:ff00000000000000 | signed:255 | unsigned:255
-255n | be:ffffffffffffff01 | le:01ffffffffffffff | signed:-255 | unsigned:18446744073709551361
2^32 | be:0000000100000000 | le:0000000001000000 | signed:4294967296 | unsigned:4294967296
2^63-1 | be:7fffffffffffffff | le:ffffffffffffff7f | signed:9223372036854775807 | unsigned:9223372036854775807
-2^63 | be:8000000000000000 | le:0000000000000080 | signed:-9223372036854775808 | unsigned:9223372036854775808
max_safe | be:001fffffffffffff | le:ffffffffffff1f00 | signed:9007199254740991 | unsigned:9007199254740991
0x0123456789abcdef | be:0123456789abcdef | le:efcdab8967452301 | signed:81985529216486895 | unsigned:81985529216486895
be_bytes=1,35,69,103,137,171,205,239
le_bytes=239,205,171,137,103,69,35,1
is_reversal=true
default_flag_is_big_endian=true
neg_one_unsigned=18446744073709551615
neg_one_is_2p64_minus_1=true
min_i64_unsigned=9223372036854775808
asUintN_agrees=true
max_u64_signed=-1
asIntN_agrees=true
wrap_above=5
wrap_negative_unsigned=18446744073709551611
wrap_huge=0
set_number!TypeError
set_numeric_string=written
set_null!TypeError
set_boolean=written
float64_rejects_bigint!TypeError
uint32_rejects_bigint!TypeError
offset_8_ok=42
offset_9_overruns!RangeError
offset_negative!RangeError
offset_fractional=1
offset_string=1
i64_view=-2,7
u64_view=18446744073709551614,7
byte_length=16 length=2 BYTES_PER_ELEMENT=8
typed_array_number_assign!TypeError
typed_array_from_numbers!TypeError
typed_array_from_bigints=1,2
sorted=-1,2,3

RTS output:

0n | be:0000000000000000 | le:0000000000000000 | signed:0 | unsigned:0
1n | be:0000000000000001 | le:0100000000000000 | signed:1 | unsigned:1
-1n | be:ffffffffffffffff | le:ffffffffffffffff | signed:-1 | unsigned:18446744073709551615
255n | be:00000000000000ff | le:ff00000000000000 | signed:255 | unsigned:255
-255n | be:ffffffffffffff01 | le:01ffffffffffffff | signed:-255 | unsigned:18446744073709551361
2^32 | be:0000000100000000 | le:0000000001000000 | signed:4294967296 | unsigned:4294967296
2^63-1 | be:7fffffffffffffff | le:ffffffffffffff7f | signed:9223372036854775807 | unsigned:9223372036854775807
-2^63 | be:8000000000000000 | le:0000000000000080 | signed:-9223372036854775808 | unsigned:9223372036854775808
max_safe | be:001fffffffffffff | le:ffffffffffff1f00 | signed:9007199254740991 | unsigned:9007199254740991
0x0123456789abcdef | be:0123456789abcdef | le:efcdab8967452301 | signed:81985529216486895 | unsigned:81985529216486895
be_bytes=1,35,69,103,137,171,205,239
le_bytes=239,205,171,137,103,69,35,1
is_reversal=true
default_flag_is_big_endian=true
neg_one_unsigned=18446744073709551615
neg_one_is_2p64_minus_1=true
min_i64_unsigned=9223372036854775808
asUintN_agrees=true
max_u64_signed=-1
asIntN_agrees=true
wrap_above=5
wrap_negative_unsigned=18446744073709551611
wrap_huge=0
set_number!TypeError
set_numeric_string=written
set_null!TypeError
set_boolean=written
float64_rejects_bigint!TypeError
uint32_rejects_bigint!TypeError
offset_8_ok=42
offset_9_overruns!RangeError
offset_negative!RangeError
offset_fractional=0
offset_string=0
i64_view=-2,7
u64_view=18446744073709551614,7
byte_length=16 length=2 BYTES_PER_ELEMENT=8
typed_array_number_assign!TypeError
typed_array_from_numbers!TypeError
typed_array_from_bigints=1,2
sorted=-1,2,3
claude2-bigint-namespace-and-brand — rts_diverge

Bun output:

typeof=function
name=BigInt
length=1
keys=[]
proto_is_Function=true
prototype_flags=false,false,false
call=5
new_BigInt!TypeError
reflect_construct!TypeError
subclass_construct!TypeError
static_asIntN=function:2:asIntN
static_asUintN=function:2:asUintN
asIntN=-1,-9223372036854775808
asUintN=255,18446744073709551615
proto_typeof=object
proto_tag=[object BigInt]
proto_toStringTag=BigInt
toStringTag_flags=false,false,true
proto_of_proto=true
constructor_identity=true
proto_keys=[]
valueOf_on_prototype!TypeError
toString_on_prototype!TypeError
method_toString=function:0:toString
method_valueOf=function:0:valueOf
valueOf_primitive=7
valueOf_wrapper=7
valueOf_number!TypeError
valueOf_number_wrapper!TypeError
valueOf_string!TypeError
valueOf_null!TypeError
valueOf_undefined!TypeError
valueOf_plain_object!TypeError
valueOf_fake_slot!TypeError
toString_primitive_radix=ff
toString_wrapper_radix=11111111
toString_number!TypeError
toString_bad_radix!RangeError
toString_radix_37!RangeError
wrapper_typeof=object
wrapper_tag=[object BigInt]
wrapper_strict=false loose=false self=true
wrapper_vs_primitive=true,false
wrapper_valueOf=7 typeof=bigint
wrapper_proto=true
wrapper_is_truthy=yes
wrapper_takes_properties=extra keys=tagged
primitive_toString=ff
primitive_valueOf=255 typeof=bigint
primitive_constructor=true
primitive_instanceof=false wrapper=true
reflect_set_on_primitive!TypeError
reflect_set_on_wrapper=true
primitive_property_read=undefined

Node output:

typeof=function
name=BigInt
length=1
keys=[]
proto_is_Function=true
prototype_flags=false,false,false
call=5
new_BigInt!TypeError
reflect_construct!TypeError
subclass_construct!TypeError
static_asIntN=function:2:asIntN
static_asUintN=function:2:asUintN
asIntN=-1,-9223372036854775808
asUintN=255,18446744073709551615
proto_typeof=object
proto_tag=[object BigInt]
proto_toStringTag=BigInt
toStringTag_flags=false,false,true
proto_of_proto=true
constructor_identity=true
proto_keys=[]
valueOf_on_prototype!TypeError
toString_on_prototype!TypeError
method_toString=function:0:toString
method_valueOf=function:0:valueOf
valueOf_primitive=7
valueOf_wrapper=7
valueOf_number!TypeError
valueOf_number_wrapper!TypeError
valueOf_string!TypeError
valueOf_null!TypeError
valueOf_undefined!TypeError
valueOf_plain_object!TypeError
valueOf_fake_slot!TypeError
toString_primitive_radix=ff
toString_wrapper_radix=11111111
toString_number!TypeError
toString_bad_radix!RangeError
toString_radix_37!RangeError
wrapper_typeof=object
wrapper_tag=[object BigInt]
wrapper_strict=false loose=false self=true
wrapper_vs_primitive=true,false
wrapper_valueOf=7 typeof=bigint
wrapper_proto=true
wrapper_is_truthy=yes
wrapper_takes_properties=extra keys=tagged
primitive_toString=ff
primitive_valueOf=255 typeof=bigint
primitive_constructor=true
primitive_instanceof=false wrapper=true
reflect_set_on_primitive!TypeError
reflect_set_on_wrapper=true
primitive_property_read=undefined

RTS output:

typeof=function
name=BigInt
length=1
keys=[]
proto_is_Function=true
prototype_flags=false,false,false
call=5
new_BigInt=undefined
reflect_construct=undefined
subclass_construct=undefined
static_asIntN=function:2:asIntN
static_asUintN=function:2:asUintN
asIntN=-1,-9223372036854775808
asUintN=255,18446744073709551615
proto_typeof=object
proto_tag=[object BigInt]
proto_toStringTag=BigInt
toStringTag_flags=false,false,true
proto_of_proto=true
constructor_identity=true
proto_keys=[]
valueOf_on_prototype=undefined
toString_on_prototype=undefined
method_toString=function:1:toString
method_valueOf=function:0:valueOf
valueOf_primitive=7
valueOf_wrapper=7
valueOf_number=7
valueOf_number_wrapper=7
valueOf_string=7
valueOf_null=null
valueOf_undefined=undefined
valueOf_plain_object=[object Object]
valueOf_fake_slot=[object Object]
toString_primitive_radix=ff
toString_wrapper_radix=11111111
toString_number=undefined
toString_bad_radix!RangeError
toString_radix_37!RangeError
wrapper_typeof=object
wrapper_tag=[object BigInt]
wrapper_strict=false loose=false self=true
wrapper_vs_primitive=false,false
wrapper_valueOf=7 typeof=bigint
wrapper_proto=true
wrapper_is_truthy=yes
wrapper_takes_properties=extra keys=tagged
primitive_toString=ff
primitive_valueOf=255 typeof=bigint
primitive_constructor=true
primitive_instanceof=false wrapper=true
reflect_set_on_primitive!TypeError
reflect_set_on_wrapper=true
primitive_property_read=undefined

132 additional divergences are available in the uploaded workflow artifact.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants