Skip to content

when x is the identity, f = sign(x) works while g = sign(x) - x fails because arclength is called with invalid signiture #946

@macd

Description

@macd

Here is all the info

               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.11.1 (2024-10-16)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

julia> using ApproxFun

(@v1.11) pkg> status ApproxFun
Status `~/julia-versions/dot_julia/environments/v1.11/Project.toml`
  [28f2ccd6] ApproxFun v0.13.27

julia> x = Fun(identity, -1..1)
Fun(Chebyshev(-1 .. 1), [0.0, 1.0])

julia> f = sign(x)  # this works
Fun(Chebyshev(Segment(-1.0, 0.0)) ⨄ Chebyshev(Segment(0.0, 1.0)), [-1.0, 1.0])

julia> g = sign(x) - x
ERROR: MethodError: no method matching arclength(::DomainSets.Point{Float64})
The function `arclength` exists, but no method is defined for this combination of argument types.

Closest candidates are:
  arclength(::ApproxFunBase.EmptyDomain)
...

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions