{"id":24573104,"url":"https://github.com/perazz/fortran-bessels","last_synced_at":"2026-02-10T15:02:26.260Z","repository":{"id":61857952,"uuid":"553769992","full_name":"perazz/fortran-bessels","owner":"perazz","description":"Fortran port of the Bessels.jl repository","archived":false,"fork":false,"pushed_at":"2023-03-15T19:10:39.000Z","size":306,"stargazers_count":11,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-01-23T19:55:35.535Z","etag":null,"topics":["bessel","bessel-function","fortran","math","special-functions"],"latest_commit_sha":null,"homepage":"","language":"Fortran","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/perazz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2022-10-18T18:36:15.000Z","updated_at":"2024-12-06T05:12:41.000Z","dependencies_parsed_at":"2023-09-24T12:00:50.565Z","dependency_job_id":null,"html_url":"https://github.com/perazz/fortran-bessels","commit_stats":{"total_commits":39,"total_committers":3,"mean_commits":13.0,"dds":0.07692307692307687,"last_synced_commit":"ee7e6f405f77398b44f67e9a11728d528c6f6f5f"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffortran-bessels","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffortran-bessels/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffortran-bessels/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/perazz%2Ffortran-bessels/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/perazz","download_url":"https://codeload.github.com/perazz/fortran-bessels/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014773,"owners_count":20383832,"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":["bessel","bessel-function","fortran","math","special-functions"],"created_at":"2025-01-23T19:55:47.336Z","updated_at":"2026-02-10T15:02:25.278Z","avatar_url":"https://github.com/perazz.png","language":"Fortran","funding_links":[],"categories":[],"sub_categories":[],"readme":"# fortran-bessels\nFortran port (stub) of the [Bessels.jl](https://github.com/heltonmc/Bessels.jl.git) repository\n\nBuilding\n\nCurrently available functions are in the `bessel_constants` module:\n- `besselj0(x)`\n- `besselj1(x)`\n- `besselj(nu, x)`\n- `bessely0(x)`\n- `bessely1(x)`\n- `besselk0(x)`\n- `besselk1(x)`\n- `besseli0(x)`\n- `besseli1(x)`\n- `gamma_BK(x)`\n\nNot yet implemented: \n- `bessely(nu, x)`\n- `besseli(nu, x)`\n- `besselk(nu, x)`\n- `besselh(nu, k, x)`\n- `hankelh1(nu, x)`\n- `hankelh2(nu, x)`\n- `sphericalbesselj(nu, x)`\n- `sphericalbessely(nu, x)`\n- `Bessels.sphericalbesseli(nu, x)`\n- `Bessels.sphericalbesselk(nu, x)`\n- `airyai(x)`\n- `airyaiprime(x)`\n- `airybi(x)`\n- `airybiprime(x)`\n\nA simple build can be achieved by running:\n\n```\n gfortran -ffree-line-length-none -O3 -march=native -ffast-math src/3rd_party/ribesl.f src/3rd_party/rkbesl.f src/bessels_constants.f90 src/bessels.f90 test/bessels_test.f90 -o bessels_test.exe\n```\n\nThese are the results of a sample performance test on an M1 Mac with gfortran 12.1.0.\nFor the functions where an intrinsic Fortran equivalent is available, the intrinsic version is compared against.\nFor all others, the [netlib specfun](https://netlib.org/specfun/) package is employed, in the current refactoring by [Scivision](https://github.com/scivision/rpn-calc-fortran).\n\n```\n[bessel_j0] INTRINSIC time used:   37.5113 ns/eval, sum(z)=9476.3324505667606\n[bessel_j0] PACKAGE   time used:   17.8369 ns/eval, sum(z)=9476.3324505666478\n[bessel_j1] INTRINSIC time used:   36.7986 ns/eval, sum(z)=-284.46168826127564\n[bessel_j1] PACKAGE   time used:   17.8452 ns/eval, sum(z)=-284.46168826129275\n[bessel_y0] INTRINSIC time used:   28.4847 ns/eval, sum(z)=1376.4176554633455\n[bessel_y0] PACKAGE   time used:   18.0247 ns/eval, sum(z)=1376.4176554633682\n[bessel_y1] INTRINSIC time used:   28.5509 ns/eval, sum(z)=-33903.574400809193\n[bessel_y1] PACKAGE   time used:   17.9210 ns/eval, sum(z)=-33903.574400809302\n[bessel_k0] NETLIB    time used:   44.2205 ns/eval, sum(z)=168876.38538504631\n[bessel_k0] PACKAGE   time used:    6.0067 ns/eval, sum(z)=168876.38538504628\n[bessel_k1] NETLIB    time used:   27.2245 ns/eval, sum(z)=29117.807091784642\n[bessel_k1] PACKAGE   time used:    5.9314 ns/eval, sum(z)=448921.45244578301\n[bessel_i0] NETLIB    time used: 1962.9280 ns/eval, sum(z)=0.95961921716826134E+263\n[bessel_i0] PACKAGE   time used:   10.3035 ns/eval, sum(z)=0.95961921716826120E+263\n[bessel_i1] NETLIB    time used:  479.3809 ns/eval, sum(z)=0.11073899685120145E+48\n[bessel_i1] PACKAGE   time used:   10.4763 ns/eval, sum(z)=0.11017821571878319E+48\n[gamma]     INTRINSIC time used:   37.9529 ns/eval, sum(z)=0.14440233357737784E+68\n[gamma]     PACKAGE   time used:   26.1333 ns/eval, sum(z)=0.14440233357737787E+68\n\n```\n\nthis package is approximately *2x faster* than gcc's intrinsic function. For the non-fortran-intrinsic functions, this package is ludicrously faster than the netlib counterpart!\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperazz%2Ffortran-bessels","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fperazz%2Ffortran-bessels","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fperazz%2Ffortran-bessels/lists"}