Giter Site home page Giter Site logo

Comments (11)

dmbates avatar dmbates commented on June 16, 2024

I can see how your version will be faster because it avoids the exp(-x) in oftype(exp(-x), x). You may consider adding

log1pexp_v2(x::Number) = log1pexp_v2(float(x))

to get coverage for integer arguments.

from logexpfunctions.jl.

cossio avatar cossio commented on June 16, 2024

I would do log1pexp_v2(x::Real) = log1pexp_v2(float(x)), since we don't want to cover complex arguments.

from logexpfunctions.jl.

dmbates avatar dmbates commented on June 16, 2024

You're right. That's better.

from logexpfunctions.jl.

cossio avatar cossio commented on June 16, 2024

Should I prepare a PR on this?

from logexpfunctions.jl.

dmbates avatar dmbates commented on June 16, 2024

Yes, please.

from logexpfunctions.jl.

cossio avatar cossio commented on June 16, 2024

@dmbates Please see JuliaStats/StatsFuns.jl#70

from logexpfunctions.jl.

Uroc327 avatar Uroc327 commented on June 16, 2024

If I may ask, what's the current state of this?

from logexpfunctions.jl.

devmotion avatar devmotion commented on June 16, 2024

I don't know, I just transferred the issue when log1pexp was moved from StatsFuns to LogExpFunctions. @cossio, do you plan to open a PR to LogExpFunctions that preferably also addresses the comments in JuliaStats/StatsFuns.jl#70?

from logexpfunctions.jl.

tpapp avatar tpapp commented on June 16, 2024

JuliaStats/StatsFuns.jl#70 was just closed, but a PR here is welcome.

from logexpfunctions.jl.

cossio avatar cossio commented on June 16, 2024

I'll do a PR right after #35 is done.

from logexpfunctions.jl.

tpapp avatar tpapp commented on June 16, 2024

Great, thanks!

from logexpfunctions.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.