{"id":17149392,"url":"https://github.com/yairchu/numpy-floats-bug","last_synced_at":"2025-03-24T11:42:41.223Z","repository":{"id":247554103,"uuid":"826184488","full_name":"yairchu/numpy-floats-bug","owner":"yairchu","description":"Chasing after what looks like a strange bug in numpy on M1","archived":false,"fork":false,"pushed_at":"2024-07-14T18:48:02.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-29T17:09:40.274Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Assembly","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/yairchu.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-09T08:26:46.000Z","updated_at":"2024-07-14T18:48:05.000Z","dependencies_parsed_at":"2024-07-13T16:47:15.961Z","dependency_job_id":null,"html_url":"https://github.com/yairchu/numpy-floats-bug","commit_stats":null,"previous_names":["yairchu/numpy-floats-bug"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yairchu%2Fnumpy-floats-bug","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yairchu%2Fnumpy-floats-bug/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yairchu%2Fnumpy-floats-bug/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yairchu%2Fnumpy-floats-bug/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yairchu","download_url":"https://codeload.github.com/yairchu/numpy-floats-bug/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245266566,"owners_count":20587452,"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":[],"created_at":"2024-10-14T21:33:02.788Z","updated_at":"2025-03-24T11:42:41.202Z","avatar_url":"https://github.com/yairchu.png","language":"Assembly","readme":"# numpy bug goose-chase\n\nIn this repo I investigated [a bug in numpy](https://github.com/numpy/numpy/issues/26940),\nwhere the same calculation `np.square(vec)` performed again produces different results,\nand generally things didn't make sense!\n\nReproduced on Python 3.12.4 numpy=1.26.4 on macOS 14.4.1 M1 Pro.\n\nDidn't repro for me with numpy==2.0.0, nor on Linux/Windows!\n\nTo test on your environment:\n\n```bash\npython -m venv venv\nvenv/bin/python -m pip install -r requirements.txt\n\nvenv/bin/python floating_point_determinism_test.py\n```\n\nThe common output I get looks like this:\n\n```text\nINCONSISTENT!\nDifference: [2.5243549e-29+0.j 0.0000000e+00+0.j 0.0000000e+00+0.j]\nUsing \u003cmodule 'numpy' from '...'\u003e version 1.26.4\n```\n\nHowever with `numpy==2.0.0` the valid output comes and looks like this:\n\n```text\nResults are consistent.\nDifference: [0.+0.j 0.+0.j 0.+0.j]\nUsing \u003cmodule 'numpy' from '...'\u003e version 2.0.0\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyairchu%2Fnumpy-floats-bug","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyairchu%2Fnumpy-floats-bug","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyairchu%2Fnumpy-floats-bug/lists"}