08:23
<Jesse>
AFAIK there is no current proposal to add ℂ to JS 🤣
08:46
<nicolo-ribaudo>
https://github.com/tc39/proposal-extended-numeric-literals "Other numeric types which may be added: [...] Complex numbers" 😛
08:48
<Andreu Botella>
Next up, quaternions
08:51
<Jesse>
see, there's all sorts of stuff to talk about!
16:26
<Michael Ficarra>
okay, serious question: what advantage do decimals have over rationals?
16:26
<Michael Ficarra>
it seems like rationals would be strictly better
16:27
<Michael Ficarra>
and a rational library is really simple to implement on top of bigints today
16:36
<Jesse>
one concern that comes to mind with rationals would be the normal form representation (unless one wants to expose numerically equal values with different representations). There might be quite a lot of integer division and modulo checks to reduce the numerators and denominators
16:38
<Jesse>
there was a discussion about rationals in proposal-decimal: https://github.com/tc39/proposal-decimal/issues/6
16:45
<littledan>
Rationals and decimals are just different data types. A very common and important operation on decimals is rounding in an inherently base-10 way; this operation doesn't really make sense on rationals.
16:46
<littledan>
pervasive rounding is also important to control size blowup (which, as Waldemar, remains a problem anyway for BigDecimal, but is worse for rationals)
16:55
<Michael Ficarra>
I dunno, that thread seems to support rational pretty well IMO
16:55
<Michael Ficarra>
a smart implementation can amortise the GCDs as appropriate for the platform
16:56
<Michael Ficarra>
anyway, we can talk more about it at the meeting next week
19:15
<littledan>
I dunno, that thread seems to support rational pretty well IMO
Heh my leading comment there is pretty weak. I'd say that the main factor for me is this round operation. Looking forward to discussing more.