Skip to content

Improve Arithmetic #76

@billhails

Description

@billhails
  • General overhaul.
  • move to libgmp?
  • trig functions.
  • Pre-compute constant values at compile time.
  • allow numeric (not symbolic) arithmetic expressions in patterns.
  • allow unpacking of numerator and denominator variables in patterns.
    • special case: a / b because there is a canonical form (via gcd).
    • match would fail if the actual argument is not integer or rational.
    • b would be bound to 1 if the argument was an integer.
    • can't allow arbitrary ops and combinations because i.e. (a + 2) * b
      can't uniquely determine a and b, and a ** 2 would require a
      to be bound to the square root of the actual argument.
  • allow unpacking of the real and imaginary parts of a complex number in patterns.
    • another special case: a + b, b would be bound to 0i if the actual
      argument is not complex.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions