# An AI case study: qdldl-fortran

> Source: <https://fortran-lang.discourse.group/t/an-ai-case-study-qdldl-fortran/11152#post_1>
> Published: 2026-10-04 16:06:43+00:00

I needed some sparse linear algebra code for a project (more on that later). Using AI (Claude Opus 5.5), it suggested I just convert [qdldl](https://github.com/osqp/qdldl) to Fortran. I had never seen this library before, but it looked like a pretty straightforward C code. So, I had the AI develop a plan for converting it to Fortran and making it an FPM package.

The result is here: [GitHub - jacobwilliams/qdldl-fortran: Modern Fortran edition of QDLDL · GitHub](https://github.com/jacobwilliams/qdldl-fortran)

It’s pretty amazing. I haven’t touched the code at all. The AI ported it over to Fortran, and wrote unit tests to validate the results. I suggested it build the original C and compare the timings, and it did all that too. Note that the Fortran is a little bit faster in general. In less than an hour I was able to pull it in as a dependency (via FPM) into my other project and continue what I was doing, and it seems to be working great.
