Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Very small number plus zero becomes zero #26658

Open
crusaderky opened this issue Feb 21, 2025 · 1 comment · May be fixed by #26668
Open

Very small number plus zero becomes zero #26658

crusaderky opened this issue Feb 21, 2025 · 1 comment · May be fixed by #26668
Assignees
Labels
bug Something isn't working

Comments

@crusaderky
Copy link

crusaderky commented Feb 21, 2025

Description

Tiny numbers (float64 ~1e-313) compare as equal to zero. When added to an actual zero, they become zero.
I could reproduce this on CPU, but not on GPU.

import jax
import jax.numpy as xp
import numpy as np

jax.config.update("jax_enable_x64", True)
device = jax.devices("cpu")[0]
x = xp.asarray(2.22507386e-313, dtype=xp.float64, device=device)
y = x + 0.
print(f"{jax.__version__=} {x=} {y=}")  # jax.__version__='0.5.0' x=Array(2.22507386e-313, dtype=float64) y=Array(0., dtype=float64)
assert x == 0.  # Passes
assert x == y  # Passes
np.testing.assert_allclose(y, x)  # Fails

System info (python version, jaxlib version, accelerator, etc.)

WARNING:2025-02-21 12:19:03,076:jax._src.xla_bridge:987: An NVIDIA GPU may be present on this machine, but a CUDA-enabled jaxlib is not installed. Falling back to cpu.
jax:    0.5.0
jaxlib: 0.5.0
numpy:  2.2.3
python: 3.10.16 | packaged by conda-forge | (main, Dec  5 2024, 14:16:10) [GCC 13.3.0]
device info: cpu-1, 1 local devices"
process_count: 1
platform: uname_result(system='Linux', node='melody', release='6.8.0-53-generic', version='#55-Ubuntu SMP PREEMPT_DYNAMIC Fri Jan 17 15:37:52 UTC 2025', machine='x86_64')


$ nvidia-smi
Fri Feb 21 12:19:03 2025       
+-----------------------------------------------------------------------------------------+
| NVIDIA-SMI 550.120                Driver Version: 550.120        CUDA Version: 12.4     |
|-----------------------------------------+------------------------+----------------------+
| GPU  Name                 Persistence-M | Bus-Id          Disp.A | Volatile Uncorr. ECC |
| Fan  Temp   Perf          Pwr:Usage/Cap |           Memory-Usage | GPU-Util  Compute M. |
|                                         |                        |               MIG M. |
|=========================================+========================+======================|
|   0  NVIDIA GeForce RTX 3080        Off |   00000000:09:00.0  On |                  N/A |
| 36%   34C    P5             43W /  340W |    2139MiB /  10240MiB |      4%      Default |
|                                         |                        |                  N/A |
+-----------------------------------------+------------------------+----------------------+
                                                                                         
+-----------------------------------------------------------------------------------------+
| Processes:                                                                              |
|  GPU   GI   CI        PID   Type   Process name                              GPU Memory |
|        ID   ID                                                               Usage      |
|=========================================================================================|
|    0   N/A  N/A      3358      G   /usr/lib/xorg/Xorg                           1093MiB |
|    0   N/A  N/A      3621      G   /usr/bin/gnome-shell                          203MiB |
|    0   N/A  N/A      5267      G   ...17c7a8468c1673444724fa825054c54bf4f        135MiB |
|    0   N/A  N/A      5314      G   ...erProcess --variations-seed-version        306MiB |
|    0   N/A  N/A      5940      G   ...yOnDemand --variations-seed-version        112MiB |
|    0   N/A  N/A     82923      G   ...17c7a8468c1673444724fa825054c54bf4f        207MiB |
+-----------------------------------------------------------------------------------------+

##pixi.lock:

version: 6
environments:
  default:
    channels:
    - url: https://prefix.dev/conda-forge/
    indexes:
    - https://pypi.org/simple
    packages:
      linux-64:
      - conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
      - conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2
      - conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda
      - conda: https://prefix.dev/conda-forge/linux-64/ca-certificates-2025.1.31-hbcca054_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_3.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libffi-3.4.6-h2dba641_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/liblzma-5.6.4-hb9d3cd8_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libsqlite-3.49.1-hee588c1_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda
      - conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda
      - conda: https://prefix.dev/conda-forge/linux-64/openssl-3.4.1-h7b32b05_0.conda
      - conda: https://prefix.dev/conda-forge/linux-64/python-3.10.16-he725a3c_1_cpython.conda
      - conda: https://prefix.dev/conda-forge/linux-64/readline-8.2-h8228510_1.conda
      - conda: https://prefix.dev/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda
      - conda: https://prefix.dev/conda-forge/noarch/tzdata-2025a-h78e105d_0.conda
      - pypi: https://files.pythonhosted.org/packages/f4/58/cc0721a1030fcbab0984beea0bf3c4610ec103f738423cdfa9c4ceb40598/jax-0.5.0-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/08/c3/573e2f01b99f1247e8fbe1aa46b95a0faa68ef208f9a8e8ef775d607b3e6/jaxlib-0.5.0-cp310-cp310-manylinux2014_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/16/d8/4502e12c6a10d42e13a552e8d97f20198e3cf82a0d1411ad50be56a5077c/ml_dtypes-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/e9/88/3870cfa9bef4dffb3a326507f430e6007eeac258ebeef6b76fc542aef66d/numpy-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
      - pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl
      - pypi: https://files.pythonhosted.org/packages/de/3c/c96d904b9892beec978562f64d8cc43f9cca0842e65bd3cd1b7f7389b0ba/scipy-1.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
packages:
- conda: https://prefix.dev/conda-forge/linux-64/_libgcc_mutex-0.1-conda_forge.tar.bz2
  sha256: fe51de6107f9edc7aa4f786a70f4a883943bc9d39b3bb7307c04c41410990726
  md5: d7c89558ba9fa0495403155b64376d81
  license: None
  purls: []
  size: 2562
  timestamp: 1578324546067
- conda: https://prefix.dev/conda-forge/linux-64/_openmp_mutex-4.5-2_gnu.tar.bz2
  build_number: 16
  sha256: fbe2c5e56a653bebb982eda4876a9178aedfc2b545f25d0ce9c4c0b508253d22
  md5: 73aaf86a425cc6e73fcf236a5a46396d
  depends:
  - _libgcc_mutex 0.1 conda_forge
  - libgomp >=7.5.0
  constrains:
  - openmp_impl 9999
  license: BSD-3-Clause
  license_family: BSD
  purls: []
  size: 23621
  timestamp: 1650670423406
- conda: https://prefix.dev/conda-forge/linux-64/bzip2-1.0.8-h4bc722e_7.conda
  sha256: 5ced96500d945fb286c9c838e54fa759aa04a7129c59800f0846b4335cee770d
  md5: 62ee74e96c5ebb0af99386de58cf9553
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc-ng >=12
  license: bzip2-1.0.6
  license_family: BSD
  purls: []
  size: 252783
  timestamp: 1720974456583
- conda: https://prefix.dev/conda-forge/linux-64/ca-certificates-2025.1.31-hbcca054_0.conda
  sha256: bf832198976d559ab44d6cdb315642655547e26d826e34da67cbee6624cda189
  md5: 19f3a56f68d2fd06c516076bff482c52
  license: ISC
  purls: []
  size: 158144
  timestamp: 1738298224464
- pypi: https://files.pythonhosted.org/packages/f4/58/cc0721a1030fcbab0984beea0bf3c4610ec103f738423cdfa9c4ceb40598/jax-0.5.0-py3-none-any.whl
  name: jax
  version: 0.5.0
  sha256: b3907aa87ae2c340b39cdbf80c07a74550369cafcaf7398fb60ba58d167345ab
  requires_dist:
  - jaxlib<=0.5.0,>=0.5.0
  - ml-dtypes>=0.4.0
  - numpy>=1.25
  - numpy>=1.26.0 ; python_full_version >= '3.12'
  - opt-einsum
  - scipy>=1.11.1
  - jaxlib==0.5.0 ; extra == 'minimum-jaxlib'
  - jaxlib==0.4.38 ; extra == 'ci'
  - jaxlib<=0.5.0,>=0.5.0 ; extra == 'tpu'
  - libtpu-nightly==0.1.dev20241010+nightly.cleanup ; extra == 'tpu'
  - libtpu==0.0.8 ; extra == 'tpu'
  - requests ; extra == 'tpu'
  - jaxlib==0.5.0 ; extra == 'cuda'
  - jax-cuda12-plugin[with-cuda]<=0.5.0,>=0.5.0 ; extra == 'cuda'
  - jaxlib==0.5.0 ; extra == 'cuda12'
  - jax-cuda12-plugin[with-cuda]<=0.5.0,>=0.5.0 ; extra == 'cuda12'
  - jaxlib==0.5.0 ; extra == 'cuda12-pip'
  - jax-cuda12-plugin[with-cuda]<=0.5.0,>=0.5.0 ; extra == 'cuda12-pip'
  - jaxlib==0.5.0 ; extra == 'cuda12-local'
  - jax-cuda12-plugin==0.5.0 ; extra == 'cuda12-local'
  - jaxlib==0.5.0 ; extra == 'rocm'
  - jax-rocm60-plugin<=0.5.0,>=0.5.0 ; extra == 'rocm'
  - kubernetes ; extra == 'k8s'
  requires_python: '>=3.10'
- pypi: https://files.pythonhosted.org/packages/08/c3/573e2f01b99f1247e8fbe1aa46b95a0faa68ef208f9a8e8ef775d607b3e6/jaxlib-0.5.0-cp310-cp310-manylinux2014_x86_64.whl
  name: jaxlib
  version: 0.5.0
  sha256: 74440b632107336400d4f97a16481d767f13ea914c53ba14e544c6fda54819b3
  requires_dist:
  - scipy>=1.11.1
  - numpy>=1.25
  - ml-dtypes>=0.2.0
  requires_python: '>=3.10'
- conda: https://prefix.dev/conda-forge/linux-64/ld_impl_linux-64-2.43-h712a8e2_3.conda
  sha256: f754b85b9c4528e09749fea56466e3a4f38439dd70b34f0f9bebff9b31055cf1
  md5: 5d5839b8df5d356d701bdd3450af6955
  depends:
  - __glibc >=2.17,<3.0.a0
  constrains:
  - binutils_impl_linux-64 2.43
  license: GPL-3.0-only
  purls: []
  size: 671098
  timestamp: 1740102063271
- conda: https://prefix.dev/conda-forge/linux-64/libffi-3.4.6-h2dba641_0.conda
  sha256: 67a6c95e33ebc763c1adc3455b9a9ecde901850eb2fceb8e646cc05ef3a663da
  md5: e3eb7806380bc8bcecba6d749ad5f026
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc >=13
  license: MIT
  license_family: MIT
  purls: []
  size: 53415
  timestamp: 1739260413716
- conda: https://prefix.dev/conda-forge/linux-64/libgcc-14.2.0-h77fa898_1.conda
  sha256: 53eb8a79365e58849e7b1a068d31f4f9e718dc938d6f2c03e960345739a03569
  md5: 3cb76c3f10d3bc7f1105b2fc9db984df
  depends:
  - _libgcc_mutex 0.1 conda_forge
  - _openmp_mutex >=4.5
  constrains:
  - libgomp 14.2.0 h77fa898_1
  - libgcc-ng ==14.2.0=*_1
  license: GPL-3.0-only WITH GCC-exception-3.1
  license_family: GPL
  purls: []
  size: 848745
  timestamp: 1729027721139
- conda: https://prefix.dev/conda-forge/linux-64/libgcc-ng-14.2.0-h69a702a_1.conda
  sha256: 3a76969c80e9af8b6e7a55090088bc41da4cffcde9e2c71b17f44d37b7cb87f7
  md5: e39480b9ca41323497b05492a63bc35b
  depends:
  - libgcc 14.2.0 h77fa898_1
  license: GPL-3.0-only WITH GCC-exception-3.1
  license_family: GPL
  purls: []
  size: 54142
  timestamp: 1729027726517
- conda: https://prefix.dev/conda-forge/linux-64/libgomp-14.2.0-h77fa898_1.conda
  sha256: 1911c29975ec99b6b906904040c855772ccb265a1c79d5d75c8ceec4ed89cd63
  md5: cc3573974587f12dda90d96e3e55a702
  depends:
  - _libgcc_mutex 0.1 conda_forge
  license: GPL-3.0-only WITH GCC-exception-3.1
  license_family: GPL
  purls: []
  size: 460992
  timestamp: 1729027639220
- conda: https://prefix.dev/conda-forge/linux-64/liblzma-5.6.4-hb9d3cd8_0.conda
  sha256: cad52e10319ca4585bc37f0bc7cce99ec7c15dc9168e42ccb96b741b0a27db3f
  md5: 42d5b6a0f30d3c10cd88cb8584fda1cb
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc >=13
  license: 0BSD
  purls: []
  size: 111357
  timestamp: 1738525339684
- conda: https://prefix.dev/conda-forge/linux-64/libnsl-2.0.1-hd590300_0.conda
  sha256: 26d77a3bb4dceeedc2a41bd688564fe71bf2d149fdcf117049970bc02ff1add6
  md5: 30fd6e37fe21f86f4bd26d6ee73eeec7
  depends:
  - libgcc-ng >=12
  license: LGPL-2.1-only
  license_family: GPL
  purls: []
  size: 33408
  timestamp: 1697359010159
- conda: https://prefix.dev/conda-forge/linux-64/libsqlite-3.49.1-hee588c1_1.conda
  sha256: 7a09eef804ef7cf4d88215c2297eabb72af8ad0bd5b012060111c289f14bbe7d
  md5: 73cea06049cc4174578b432320a003b8
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc >=13
  - libzlib >=1.3.1,<2.0a0
  license: Unlicense
  purls: []
  size: 915956
  timestamp: 1739953155793
- conda: https://prefix.dev/conda-forge/linux-64/libuuid-2.38.1-h0b41bf4_0.conda
  sha256: 787eb542f055a2b3de553614b25f09eefb0a0931b0c87dbcce6efdfd92f04f18
  md5: 40b61aab5c7ba9ff276c41cfffe6b80b
  depends:
  - libgcc-ng >=12
  license: BSD-3-Clause
  license_family: BSD
  purls: []
  size: 33601
  timestamp: 1680112270483
- conda: https://prefix.dev/conda-forge/linux-64/libxcrypt-4.4.36-hd590300_1.conda
  sha256: 6ae68e0b86423ef188196fff6207ed0c8195dd84273cb5623b85aa08033a410c
  md5: 5aa797f8787fe7a17d1b0821485b5adc
  depends:
  - libgcc-ng >=12
  license: LGPL-2.1-or-later
  purls: []
  size: 100393
  timestamp: 1702724383534
- conda: https://prefix.dev/conda-forge/linux-64/libzlib-1.3.1-hb9d3cd8_2.conda
  sha256: d4bfe88d7cb447768e31650f06257995601f89076080e76df55e3112d4e47dc4
  md5: edb0dca6bc32e4f4789199455a1dbeb8
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc >=13
  constrains:
  - zlib 1.3.1 *_2
  license: Zlib
  license_family: Other
  purls: []
  size: 60963
  timestamp: 1727963148474
- pypi: https://files.pythonhosted.org/packages/16/d8/4502e12c6a10d42e13a552e8d97f20198e3cf82a0d1411ad50be56a5077c/ml_dtypes-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  name: ml-dtypes
  version: 0.5.1
  sha256: 141b2ea2f20bb10802ddca55d91fe21231ef49715cfc971998e8f2a9838f3dbe
  requires_dist:
  - numpy>=1.21
  - numpy>=1.21.2 ; python_full_version >= '3.10'
  - numpy>=1.23.3 ; python_full_version >= '3.11'
  - numpy>=1.26.0 ; python_full_version >= '3.12'
  - numpy>=2.1.0 ; python_full_version >= '3.13'
  - absl-py ; extra == 'dev'
  - pytest ; extra == 'dev'
  - pytest-xdist ; extra == 'dev'
  - pylint>=2.6.0 ; extra == 'dev'
  - pyink ; extra == 'dev'
  requires_python: '>=3.9'
- conda: https://prefix.dev/conda-forge/linux-64/ncurses-6.5-h2d0b736_3.conda
  sha256: 3fde293232fa3fca98635e1167de6b7c7fda83caf24b9d6c91ec9eefb4f4d586
  md5: 47e340acb35de30501a76c7c799c41d7
  depends:
  - __glibc >=2.17,<3.0.a0
  - libgcc >=13
  license: X11 AND BSD-3-Clause
  purls: []
  size: 891641
  timestamp: 1738195959188
- pypi: https://files.pythonhosted.org/packages/e9/88/3870cfa9bef4dffb3a326507f430e6007eeac258ebeef6b76fc542aef66d/numpy-2.2.3-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  name: numpy
  version: 2.2.3
  sha256: 0391ea3622f5c51a2e29708877d56e3d276827ac5447d7f45e9bc4ade8923c52
  requires_python: '>=3.10'
- conda: https://prefix.dev/conda-forge/linux-64/openssl-3.4.1-h7b32b05_0.conda
  sha256: cbf62df3c79a5c2d113247ddea5658e9ff3697b6e741c210656e239ecaf1768f
  md5: 41adf927e746dc75ecf0ef841c454e48
  depends:
  - __glibc >=2.17,<3.0.a0
  - ca-certificates
  - libgcc >=13
  license: Apache-2.0
  license_family: Apache
  purls: []
  size: 2939306
  timestamp: 1739301879343
- pypi: https://files.pythonhosted.org/packages/23/cd/066e86230ae37ed0be70aae89aabf03ca8d9f39c8aea0dec8029455b5540/opt_einsum-3.4.0-py3-none-any.whl
  name: opt-einsum
  version: 3.4.0
  sha256: 69bb92469f86a1565195ece4ac0323943e83477171b91d24c35afe028a90d7cd
  requires_python: '>=3.8'
- conda: https://prefix.dev/conda-forge/linux-64/python-3.10.16-he725a3c_1_cpython.conda
  build_number: 1
  sha256: 3f90a2d5062a73cd2dd8a0027718aee1db93f7975b9cfe529e2c9aeec2db262e
  md5: b887811a901b3aa622a92caf03bc8917
  depends:
  - __glibc >=2.17,<3.0.a0
  - bzip2 >=1.0.8,<2.0a0
  - ld_impl_linux-64 >=2.36.1
  - libffi >=3.4,<4.0a0
  - libgcc >=13
  - liblzma >=5.6.3,<6.0a0
  - libnsl >=2.0.1,<2.1.0a0
  - libsqlite >=3.47.0,<4.0a0
  - libuuid >=2.38.1,<3.0a0
  - libxcrypt >=4.4.36
  - libzlib >=1.3.1,<2.0a0
  - ncurses >=6.5,<7.0a0
  - openssl >=3.4.0,<4.0a0
  - readline >=8.2,<9.0a0
  - tk >=8.6.13,<8.7.0a0
  - tzdata
  constrains:
  - python_abi 3.10.* *_cp310
  license: Python-2.0
  purls: []
  size: 25199631
  timestamp: 1733409331823
- conda: https://prefix.dev/conda-forge/linux-64/readline-8.2-h8228510_1.conda
  sha256: 5435cf39d039387fbdc977b0a762357ea909a7694d9528ab40f005e9208744d7
  md5: 47d31b792659ce70f470b5c82fdfb7a4
  depends:
  - libgcc-ng >=12
  - ncurses >=6.3,<7.0a0
  license: GPL-3.0-only
  license_family: GPL
  purls: []
  size: 281456
  timestamp: 1679532220005
- pypi: https://files.pythonhosted.org/packages/de/3c/c96d904b9892beec978562f64d8cc43f9cca0842e65bd3cd1b7f7389b0ba/scipy-1.15.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
  name: scipy
  version: 1.15.2
  sha256: 69ea6e56d00977f355c0f84eba69877b6df084516c602d93a33812aa04d90a3d
  requires_dist:
  - numpy>=1.23.5,<2.5
  - pytest ; extra == 'test'
  - pytest-cov ; extra == 'test'
  - pytest-timeout ; extra == 'test'
  - pytest-xdist ; extra == 'test'
  - asv ; extra == 'test'
  - mpmath ; extra == 'test'
  - gmpy2 ; extra == 'test'
  - threadpoolctl ; extra == 'test'
  - scikit-umfpack ; extra == 'test'
  - pooch ; extra == 'test'
  - hypothesis>=6.30 ; extra == 'test'
  - array-api-strict>=2.0,<2.1.1 ; extra == 'test'
  - cython ; extra == 'test'
  - meson ; extra == 'test'
  - ninja ; sys_platform != 'emscripten' and extra == 'test'
  - sphinx>=5.0.0,<8.0.0 ; extra == 'doc'
  - intersphinx-registry ; extra == 'doc'
  - pydata-sphinx-theme>=0.15.2 ; extra == 'doc'
  - sphinx-copybutton ; extra == 'doc'
  - sphinx-design>=0.4.0 ; extra == 'doc'
  - matplotlib>=3.5 ; extra == 'doc'
  - numpydoc ; extra == 'doc'
  - jupytext ; extra == 'doc'
  - myst-nb ; extra == 'doc'
  - pooch ; extra == 'doc'
  - jupyterlite-sphinx>=0.16.5 ; extra == 'doc'
  - jupyterlite-pyodide-kernel ; extra == 'doc'
  - mypy==1.10.0 ; extra == 'dev'
  - typing-extensions ; extra == 'dev'
  - types-psutil ; extra == 'dev'
  - pycodestyle ; extra == 'dev'
  - ruff>=0.0.292 ; extra == 'dev'
  - cython-lint>=0.12.2 ; extra == 'dev'
  - rich-click ; extra == 'dev'
  - doit>=0.36.0 ; extra == 'dev'
  - pydevtool ; extra == 'dev'
  requires_python: '>=3.10'
- conda: https://prefix.dev/conda-forge/linux-64/tk-8.6.13-noxft_h4845f30_101.conda
  sha256: e0569c9caa68bf476bead1bed3d79650bb080b532c64a4af7d8ca286c08dea4e
  md5: d453b98d9c83e71da0741bb0ff4d76bc
  depends:
  - libgcc-ng >=12
  - libzlib >=1.2.13,<2.0.0a0
  license: TCL
  license_family: BSD
  purls: []
  size: 3318875
  timestamp: 1699202167581
- conda: https://prefix.dev/conda-forge/noarch/tzdata-2025a-h78e105d_0.conda
  sha256: c4b1ae8a2931fe9b274c44af29c5475a85b37693999f8c792dad0f8c6734b1de
  md5: dbcace4706afdfb7eb891f7b37d07c04
  license: LicenseRef-Public-Domain
  purls: []
  size: 122921
  timestamp: 1737119101255
@crusaderky crusaderky added the bug Something isn't working label Feb 21, 2025
@jakevdp jakevdp self-assigned this Feb 21, 2025
@jakevdp
Copy link
Collaborator

jakevdp commented Feb 21, 2025

Thanks for the report: this is expected behavior. JAX operations will generally flush denormals to zero, although this behavior is backend-dependent. We should probably add this to the Sharp Bits doc, but it's mentioned in a few places (e.g. https://docs.jax.dev/en/latest/_autosummary/jax.lax.nextafter.html).

@jakevdp jakevdp linked a pull request Feb 21, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants