Giter Club home page Giter Club logo

Comments (4)

patkwee avatar patkwee commented on August 11, 2024 1

Yes, I can prepare a PR in the coming days.

from taylorseries.jl.

patkwee avatar patkwee commented on August 11, 2024 1

I will check a few more complex related functions, e.g. angle seems also not defined.

from taylorseries.jl.

lbenet avatar lbenet commented on August 11, 2024

Thanks for reporting, and good catch! Yes, I think you are right and your proposed solution is correct.

Could you open a PR with your solution and perhaps some tests? I guess a good test could be (using your definition of t):

abs2(exp(im*t)) == 1.0

from taylorseries.jl.

lbenet avatar lbenet commented on August 11, 2024

Excelent! Thanks a lot!

I also noticed that there are more brittle peaces around... As an example,

julia> tim = im*Taylor1(16)
 ( 0.0 + 1.0im ) t + 𝒪(t¹⁷)

julia> isapprox( abs2(exp(tim)), 1.0)
ERROR: DomainError with  4.336808689942018e-19 t⁸ - 2.710505431213761e-20 t¹⁰ + 𝒪(t¹⁶):
The 0th order Taylor1 coefficient must be non-zero
(abs(x) is not differentiable at x=0).
Stacktrace:
 [1] abs
   @ ~/.julia/dev/TaylorSeries/src/other_functions.jl:86 [inlined]
 [2] isapprox(x::Taylor1{Float64}, y::Float64; atol::Int64, rtol::Float64, nans::Bool, norm::typeof(abs))
   @ Base ./floatfuncs.jl:281
 [3] isapprox(x::Taylor1{Float64}, y::Float64)
   @ Base ./floatfuncs.jl:281
 [4] top-level scope
   @ REPL[32]:1

It seems that norm, which is used in isapprox, defaults to abs, which is not defined for Taylor1{<:Complex}...

from taylorseries.jl.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.