Hacker News new | ask | show | jobs
by s20n 77 days ago
Thanks for working on LispPad, I'm really enjoying using it.

> Polar complex number literals are actually not part of R7RS

I actually thought they were part of the spec. Specifically, I am referring to the last paragraph from section 6.2.5 of R7RS small <https://small.r7rs.org/attachment/r7rs.pdf>

This is the excerpt from the pdf:

6.2.5. Syntax of numerical constants

...

There are two notations provided for non-real complex numbers: the rectangular notation a+bi, where a is the real part and b is the imaginary part; and the polar no- tation r@θ, where r is the magnitude and θ is the phase (angle) in radians. These are related by the equation a + bi = r cos θ + (r sin θ)i. All of a, b, r , and θ are real numbers.

1 comments

Thanks for the reference! I must have overlooked this when implementing the scanner. Will definitely be added. Thanks for letting me know.