JuliaApproximation / JuliaApproximation/ApproxFun.jl

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

Open
#946 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Julia
Stars
559
Forks
71
PR merge metrics
No merged PRs in 30d

Description

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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the Julia 1.11.1 example with ApproxFun v0.13.27, comparing sign(x) with sign(x) - x on -1..1. Start from the arclength(::ApproxFunBase.EmptyDomain) dispatch shown in the error and trace how the Point{Float64} argument is reached. Done means the reported expression no longer raises this MethodError, with a regression test covering the example.

Written by the indexing model from the issue text.

Assessment

Tech stack
julia
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.