Skip to content

Polar Notation Support #31

Description

@shriramters

Just bringing this discussion over from the Hackernews Comment Thread

As per the R7RS Small specification at https://small.r7rs.org/attachment/r7rs.pdf

in section 6.2.5. Syntax of numerical constants, the following is mentioned:

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 notation 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.

I believe this polar notation is an important addition for full r7rs small compliance. While I know that you touched on this in the HN thread, my interpretation of the text above is that polar notation is indeed a required part of the requirements for R7RS-small implementations that support complex numbers.

I just wanted to formalize this here to see if it aligns with the roadmap for LispPad. However, if my interpretation of the "should/must" requirements in this section is incorrect or if this falls outside the specific goals of the compiler, please feel free to close this issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions