Giter Site home page Giter Site logo

elliptic.jl's People

Contributors

femtocleaner[bot] avatar giovact avatar hamzaelsaawy avatar jefffessler avatar juliatagbot avatar mauro3 avatar nolta avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

elliptic.jl's Issues

conflicts with Base.cd

Since Jacobi.cd conflicts with Base.cd, it cannot be imported directly into scope:

julia> using Elliptic

julia> using Elliptic.Jacobi

julia> sd(0,0)
0.0

julia> cd(0,0)
WARNING: both Jacobi and Base export "cd"; uses of it in module Main must be qualified
ERROR: UndefVarError: cd not defined
Stacktrace:
 [1] top-level scope at none:0

julia> Jacobi.cd(0,0)
1.0

One solution would be to import Base.cd and extend it, but since they provide unrelated functionality, I am not sure people's appetites for that

Use Hypergeometric functions for BigFloat support

From @TSGut (CC @MikaelSlevinsky):

julia> α = 4.453667231591123
4.453667231591123

julia> K = Elliptic.K(1-1/α^2)
2.9043516240612575

julia> K2f1 = convert(eltype(α),π)/2*HypergeometricFunctions._₂F₁(one(eltype(α))/2,one(eltype(α))/2,1,1-1/α^2)
2.904351624061259

julia> @test K  K2f1
Test Passed

Elliptic.E(NaN) hangs

Running

julia> Elliptic.E(NaN)

just hangs (well, at least 10 seconds). Same goes for K, maybe others?

tag a new version in METADATA.jl ?

Changing symbol() to Symbol() last October 20 was sufficient to keep Julia 0.6 happy, but no METADATA.jl updates have been tagged to reflect the change.

[PkgEval] Your package doesn't have a test/runtests.jl file

PackageEvaluator.jl is a script that runs nightly.
It attempts to load all Julia packages and run their tests (if available) on both the stable
version of Julia (0.3) and the nightly build of the unstable version (0.4).
The results of this script are used to generate a package listing
enhanced with testing results. This service also benefits package developers by notifying them if
their package breaks for some reason (caused by e.g. changes in Julia, changes in dependencies,
or broken binary dependencies.)

Currently PackageEvaluator attempts to find your test scripts using a heuristic, preferring the
standarized test/runtests.jl whenever present. Using test/runtests.jl allows people to test
your package using simply Pkg.test("Elliptic"), with any testing-only dependencies being
installed by looking at test/REQUIRE.

Your package doesn't appear to have a test/runtests.jl file. PackageEvaluator is going to move
away from auto-detecting tests and will instead only test packages with a test/runtests.jl
file. This change will take place in about a month.

You can:

  • Add the file and tag a new version. You may in fact have already added this file but not
    tagged a new version. PackageEvaluator only tests your latest tagged verison, so you must tag
    for the file to be detected.
  • Chose to do nothing. PackageEvaluator will stop attempting to test your package, and the testing
    status will be reported as "not possible".

If you'd like help or more information, please just reply to this issue.

Extending the range of m to be greater than unity and negative

I have seen that the complete elliptic integrals were extended for negative range which is great. Can the non complete elliptic integral be extended as well?

In page 593, in the book by Abramowitz and Stegun equations 17.4.15 and on give the formulas.

I did not see there a formula for the Jacobi amplitude, but it can be derived from the relations 17.4.15 and on.

Elliptic.K does not take negative arguments

Elliptic.K(x) currently raises a DomainError for negative x.

However, K(x) can be calculated for negative arguments with the existing routine using the identity given in Eq. (11) of this text.

Ideally, Elliptic.K(x) would just check for negative x and map it to a positive x automatically.

Fix DomainError exceptions

The file "Elliptic.jl" contains a lot of throw(DomainError()) statements in the checks of parameter m. If m is outside the region [0.0,1.0], instead of producing DomainError exception, the code gives

MethodError: no method matching DomainError()
Closest candidates are:
DomainError(!Matched::Any) at boot.jl:258
DomainError(!Matched::Any, !Matched::Any) at boot.jl:259

I do not know what the situation was in earlier versions of Julia, but, apparently, the constructor of DomainError requires at least one argument to be passed now.

The issue is easily fixed by replacing all throw(DomainError()) statements with something like throw(DomainError(m, "Argument m ∉[0, 1]")).

I could make a pull request for this, however, I have a question about the status of extend domain to negative m #19. If that gets merged, the domain checks and error messages should be changed accordingly.

Strict typing causes issues with auto-diff

Is there a reason all the function parameters are strictly typed to Float64? This causes issues when using auto-diff tools (which need a more general type: T<:Real).

Support for extended precision (BigFloats)?

Hi! I was trying to use Elliptic.jl in order to evaluate K(k) to high accuracy using BigFloats, but noticed that if given a BigFloat as an input, Elliptic.K returns a Float64:

julia> using Elliptic

julia> Elliptic.K(big"0.512341234")
1.8646739600308775

@oxinabox explained to me that, by construction, Elliptic.jl functions explicitly cast all Reals down to Float64, and was wondering if the code may be adapted for other types such as BigFloat, perhaps adapting the constants such as D1MACH1 with something like const D1MACH1 = realmin(T) with T<:AbstractFloat, etc., for these types?

elliptic integrals with complex argument

It seems that F is only defined on the real line. It would be nice if it was also defined on the complex domain, i.e. if it could take a complex argument phi. Actually it would be nice to have complex version of all the elliptic integrals and functions.

Surprisingly, few libraries/CAS provide such a feature. I rely on maxima at the moment for this kind of computation but it is slow.

Elliptic functions of complex argument

As far as I understand, the elliptic functions in this package are defined only for real values of the first argument u.
At the same time, it is good to be able to calculate them across the whole complex plane (all in all, the defining property of elliptic functions as doubly periodic meromorphic functions is intimately linked with the complex plane).

As a consequence, I have the following question: are there any plans to add the support of complex arguments?
If not, could you advise some packages where such functionality is already implemented?

v0.6 deprecation warnings

while loading /home/travis/.julia/v0.6/Elliptic/src/jacobi.jl, in expression starting on line 6
WARNING: `@vectorize_2arg` is deprecated in favor of compact broadcast syntax. Instead of `@vectorize_2arg`'ing function `f` and calling `f(arg1, arg2)`, call `f.(arg1,arg2)`. 
Stacktrace:
 [1] depwarn(::String, ::Symbol) at ./deprecated.jl:70
 [2] @vectorize_2arg(::ANY, ::ANY) at ./deprecated.jl:330
 [3] include_from_node1(::String) at ./loading.jl:569
 [4] include(::String) at ./sysimg.jl:14
 [5] include_from_node1(::String) at ./loading.jl:569
 [6] include(::String) at ./sysimg.jl:14
 [7] anonymous at ./<missing>:2
 [8] eval(::Module, ::Any) at ./boot.jl:235
 [9] process_options(::Base.JLOptions) at ./client.jl:286
 [10] _start() at ./client.jl:371

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.