{"id":19012741,"url":"https://github.com/njdevpro/numerical-recipes","last_synced_at":"2025-08-22T00:21:18.499Z","repository":{"id":63265722,"uuid":"560522097","full_name":"NJdevPro/Numerical-Recipes","owner":"NJdevPro","description":"Numerical Recipes in C++, that actually compiles","archived":false,"fork":false,"pushed_at":"2023-01-18T05:46:07.000Z","size":9521,"stargazers_count":68,"open_issues_count":0,"forks_count":20,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-17T16:04:14.124Z","etag":null,"topics":["linear-algebra","numerical-algorithms","numerical-integration","numerical-methods"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/NJdevPro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-11-01T17:26:38.000Z","updated_at":"2025-04-16T01:40:16.000Z","dependencies_parsed_at":"2023-02-10T13:30:57.276Z","dependency_job_id":null,"html_url":"https://github.com/NJdevPro/Numerical-Recipes","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NJdevPro%2FNumerical-Recipes","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NJdevPro%2FNumerical-Recipes/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NJdevPro%2FNumerical-Recipes/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/NJdevPro%2FNumerical-Recipes/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/NJdevPro","download_url":"https://codeload.github.com/NJdevPro/Numerical-Recipes/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250343678,"owners_count":21415035,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linear-algebra","numerical-algorithms","numerical-integration","numerical-methods"],"created_at":"2024-11-08T19:19:26.705Z","updated_at":"2025-04-22T23:41:23.437Z","avatar_url":"https://github.com/NJdevPro.png","language":"C++","readme":"# Numerical-Recipes\nAll header files from numerical recipes in C++. 3rd Edition. \nNote that all these files are under copyright by their authors.\nCheck http://numerical.recipes/licenses/ for more information.\n\nThese files have been modified to actually compile out of the box (under Linux), \nunlike the many copies of these routines that can be found on Github but fail\nto compile due to absence of the necessary includes.\n\nThis also means that the following dependencies have been added:\nSuiteSparse AMD and LDL are included in the AMD and LDL directories, with the\ncorresponding libs built for Linux 64-bit.\nOnly the simplex.h file is missing the lp_solve library, which I could not compile.\n\nhttps://github.com/DrTimothyAldenDavis/SuiteSparse\n\nhttps://github.com/ESMG/PyCNAL_legacy/tree/master/bathy_smoother/external/lp_solve_5.5\n\nNo attempt has been made to make the code more modern or to use C++11 features.\nThe reason is because it makes it easier to compare the code with the original \nand the text in the book. I have passed the code through an indenter to make it easier\non the eye.\nBarely any attempt has been made to clean compiler warnings nor correct mistakes\nfound by static analysis,  so the algorithms are pretty much verbatim.\nThey should compile on any modern C++ compiler with C++03 support.\n\n**Use at your own risks !**\n\nThe code is not mine, and I am not responsible for any damage it may cause.\nMost of it was written in the 80s and 90s. \nThe code shows its age and its Fortran and C origins and would fail modern code quality\nstandards. The compiler will spit out a number of warnings and I only bothered to fix a\nfew of them.\nAlthough I believe the results of these routines are correct (decades of bugs fixing),\nI would not recommend using them without serious testing. But NR is a good \nintroduction to numerical algorithms and a great starting point for educative purpose\n(buy the book, it's totally worth it !).\nFor production work, I would recommend looking at modern libraries such as LAPACK, Intel \nMKL, Eigen, GNU Scientific Library, Ceres Solver, FFTW, etc. These are often much more \nefficient and reliable, written in more idiomatic C++, better tested and more actively \nmaintained.\n\nFinally, thereis only a few examples as a proof that the code does indeed\ncompile and run.\nYou will find many other examples in C here:\nhttps://www.astro.umd.edu/~ricotti/NEWWEB/teaching/ASTR415/InClassExamples/NR3/legacy/nr2/CPP_211/progs.htm\n\n== How to build ==\n\nYou will need cmake (adjust to your version in the first line of the CMakeLists.txt file, if necessary). \nThen go to the directory containing the CMakeLists.txt file (aka root of the project) and type:\ncmake .\nmake","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjdevpro%2Fnumerical-recipes","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnjdevpro%2Fnumerical-recipes","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnjdevpro%2Fnumerical-recipes/lists"}