Setting ApproxFun Space , tried several tricks but still receive **ERROR: LoadError: Cannot infer spaces** – specifically when using GeneralizedGenerated.jl for Generalized generated functions

Thank you All for your input and insights !
You motivated me to push on until we found an answer together !

Ok so I’d like to take a swing at recapping
what we’ve learned so far here …

### 
# Template solution motivated by @Chris_Foster and @ChrisRackauckas Thanks Chrisss^2 :-) !
# .. Marc BEGIN WORKS NOW !!

julia> func_f161 = @RuntimeGeneratedFunction(Meta.parse("f16(x) = x"))
# Julia response @RuntimeGeneratedFunction( >>
RuntimeGeneratedFunction(#=in Main=#, :((x,)->begin
          #= none:1 =#
          x
      end))

julia> f17 = ApproxFun.Fun(x->func_f161(x),Domain(0.0..10.0))
# Julia response ApproxFun.Fun( >>
Fun(Chebyshev(0.0..10.0),[5.0, 5.000000000000001])

julia> f17(1)
0.9999999999999991

julia> f17(7)
7.000000000000001

julia> @btime f17(7)
  26.122 ns (1 allocation: 16 bytes)
7.000000000000001
## Yay !! good job Chris using RuntimeGeneratedFunctions.jl even beats Generalizedgenerated.jl for generalized generated functions

#
# .. Marc END WORKS NOW !!
###

Ps> @dlfivefifty Now that the above code works for defining Dynamic functions specified by a String would you like me to Test it out , clean it up, and possibly create a PR ?

… And Hope you all are up for another Question ?
It’s really for everyone but I’m guessing @dlfivefifty or @ChrisRackauckas might know off the top of their heads about why this section of Code:

julia> f17 = ApproxFun.Fun(x->func_f161(x),Domain(0.0..10.0))
# Julia response ApproxFun.Fun( >>
Fun(Chebyshev(0.0..10.0),[5.0, 5.000000000000001])

Note it doesn’t appear until specify the Domain( ,
so to develop Mathematical theory intuition further pls
where and why does the [5.0, 5.000000000000001] come from ?

… And @c42f and @dlfivefifty I have more questions about quickly handling / removing Inf from answers (possibly as Missing instead ) because Inf really renders LinearAlgebra.norm( and Statistics.mean( useless for further Tests or analysis ;
but I’m trying (but failing ? LOL :slight_smile: ) to keep things bite size and not “Fire Hose” everyone …