Giter Site home page Giter Site logo

Comments (6)

adomahidi avatar adomahidi commented on August 18, 2024

That's an interesting direction... From an ECOS point of view there shouldn't be a fundamental issue with higher precision types, but I am not sure about the linear solver under the hood (SparseLDL). All code is there so you might give it a try and see where it fails? :)

Just curious, from which field is the optimization problem requiring more than double precision arithmetics?

from ecos.

DanielDoehring avatar DanielDoehring commented on August 18, 2024

Alright, I will give it a shot :)

Essentially, I am trying to optimize the coefficients $ \boldsymbol \alpha \in \mathbb R^{N+1} $ of a complex polynom
$$ \sum_{i=0}^N \alpha_i z^i = \sum_{i=0}^N \frac{\widetilde \alpha_i}{i!} z^i , \quad z \in \mathbb C $$
where $ \vert z^i \vert \sim \mathcal O (10)$. Already for $N \approx 20 $ I run into stability issues since the $z^i$ term explodes. This can be somewhat mitigated by the normalization by $i!$. However, then you have to divide the $ \tilde \alpha_i$ by $i!$ which gives you in any case $\alpha_i$ very small to zero. Of course, this problem is inherently ill-conditioned, but I want to see how far I can go with this formulation.

from ecos.

DanielDoehring avatar DanielDoehring commented on August 18, 2024

Switching from doubleto long double is actually not that difficult, it can be done with moderate changes. However, some adjustments have to be made, i.e., fabs becomes fabsl and printing requires usually also an "L", e.g. %f becomes %fL.

Thus, a fully type-generic version would demand some more effort.

from ecos.

adomahidi avatar adomahidi commented on August 18, 2024

Ok great to hear, so did it run with long double after those changes and did you see an improvement on numerical stability?

from ecos.

DanielDoehring avatar DanielDoehring commented on August 18, 2024

I called ECOS through the Julia interface where there is, unfortunately, within the Julia MOI no support for long double or other types (like Double64) but only for the standard C double.

I will now take a look at the Matlab & Python interfaces.

from ecos.

DanielDoehring avatar DanielDoehring commented on August 18, 2024

Based on the EiCOS project which allows fairly easy specification of constraints I forked a long double version.

from ecos.

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.