I used Codex and Claude to write in Python a transpiler from C to modern Fortran. It correctly translates a handful of numerical C codes at the repo, and I will test it on larger C code bases.
2 Likes
Now you should translate SciPy back to Fortran. ![]()
3 Likes
ChatGPT says the following SciPy algorithms ought to be implemented in Fortran:
- AAA β compact, distinctive, numerically interesting, and apparently a genuine Fortran gap.
- LGMRES and GCROT(m,k) β immediately useful in large scientific programs.
funm_multiply_krylovβ high-value matrix-free numerical linear algebra.- LOBPCG β substantial demand and a natural fit for Fortran HPC applications.
- COBYQA β very valuable, but considerably harder to implement and validate.
- SHGO β distinctive, though its data-structure-heavy implementation is less naturally Fortran-oriented.
- Complete QMC suite β broad utility, but a larger packaging and API project.
1 Like
Isnβt COBYQA one of the optimisation algorithms by Mike Powell? In that case the original will have been written in FORTRAN 77.
Yes, and I think it is in
1 Like
If Iβm not mistaken, COBYQA is not in PRIMA. The acronyms are very similar but they should not be confused together.
Oh, indeed: COBYLA versus COBYQA!