tc39 / proposal-extended-numeric-literals

Extensible numeric literals for JavaScript
https://tc39.github.io/proposal-extended-numeric-literals/
72 stars 18 forks source link

Imaginary Numbers should be built in like Python #29

Open 7fe opened 3 years ago

7fe commented 3 years ago

I propose we support Imaginary Numbers like Python. The other parts of the proposals are fine with me.

let n = 1j * 1j

https://stackoverflow.com/questions/8370637/complex-numbers-usage-in-python

you could even support the dot syntax

n.real;
n.imaginary;

Right now JS is rather ignored for computational software compared to let's say Python because it lacks proper imaginary number support(and fractions.)