Skip to content

Overload // for creating rational polynomials #167

Open
@dlfivefifty

Description

@dlfivefifty

I was expecting this to work:

julia> using DynamicPolynomials

julia> @polyvar x
(x,)

julia> x//2
ERROR: MethodError: no method matching //(::Variable{DynamicPolynomials.Commutative{DynamicPolynomials.CreationOrder}, Graded{LexOrder}}, ::Int64)
The function `//` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  //(::Integer, ::Integer)
   @ Base rational.jl:84
  //(::Rational, ::Integer)
   @ Base rational.jl:86
  //(::Complex, ::Real)
   @ Base rational.jl:100
  ...

Stacktrace:
 [1] top-level scope
   @ REPL[4]:1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions