Coder Social home page Coder Social logo

Comments (3)

odow avatar odow commented on September 13, 2024

So Julia 1.9 is noticeably less-accurate at competing inv of a complex number. And this causes problems with the susceptance matrix. It's probably also the cause of the numeric issue on Windows.

Julia 1.9

julia> imag(inv(0.00064 + 0.0064im))
-154.70297029702968

julia> x = imag(inv(big"0.00064" + big"0.0064" * im))
-154.7029702970297029702970297029702970297029702970297029702970297029702970297017

julia> x - imag(inv(0.00064 + 0.0064im))
-2.335645428439141205041715414217202970297029702970297029702970170069474548472957e-14

Julia 1.6

julia> imag(inv(0.00064 + 0.0064im))
-154.7029702970297

julia> x = imag(inv(big"0.00064" + big"0.0064" * im))
-154.7029702970297029702970297029702970297029702970297029702970297029702970297017

julia> x - imag(inv(0.00064 + 0.0064im))
5.065255146012595384427816560952970297029702970297029702970298299305254515270434e-15

Diff

julia> -154.70297029702968 - -154.7029702970297
2.842170943040401e-14

from powermodels.jl.

odow avatar odow commented on September 13, 2024

Upstream change seems to be JuliaLang/julia#47255

from powermodels.jl.

odow avatar odow commented on September 13, 2024

The two Float64s are neighbors

julia> prevfloat(-154.70297029702968)
-154.7029702970297

so it seems unlikely that they'll revert the upstream change. I wonder if we should compute the matrix in better precision on the PowerModels side.

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