Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Python-Blosc2 documentation
Logo
Python-Blosc2 documentation
  • Getting Started
    • Overview
    • Installation
  • Tutorials
    • NDArray: A NDim, Compressed Data Container
    • Expressions containing NDArray objects
    • User Defined Functions
    • Lazy array kernels with Menudet
    • Optimizing data reductions with NDArrays
    • Advanced Lazy Expressions and Persistent Reductions
    • Using Proxies for Efficient Handling of Remote Multidimensional Data
    • Compressing data with the SChunk class
    • Slicing, extending and serializing with SChunks
    • User-defined codecs and filters
    • Prefilters, postfilters and fillers
    • Working with Containers
    • Working with ObjectArray
    • Working with BatchArray
    • CTable Tutorial
    • Indexing Arrays
    • Indexing CTables
  • Guides
    • Performance & Benchmarks
    • Optimization tips
    • Menudet: portable computation
    • Migrating to Menudet
    • Working with Remote Data
    • Working with Remote Arrays
    • Working with Remote Tables
    • Sharing Containers Across Processes
    • Using Blosc2 with pandas
    • b2view: Browse TreeStore Bundles in the Terminal
    • Parquet to Blosc2 Walkthrough
  • API Reference
    • Blosc2 Classes
      • NDArray
      • C2Array
      • LazyArray
      • BatchArray
      • ListArray
      • ObjectArray
      • Proxy
      • RemoteObject
      • RemoteArray
      • RemoteStore
      • RemoteRepository
      • RemoteFile
      • RemoteCTable
      • ProxySource
      • ProxyNDSource
      • ByteRangeNDSource
      • FsspecNDSource
      • ZarrNDSource
      • HDF5NDSource
      • B2ZNDSource
      • SimpleProxy
      • Traffic
      • EmbedStore
      • DictStore
      • TreeStore
      • CTable
      • Column
      • NestedColumn
      • Schema Specs
      • Index
      • SChunk
      • Array
      • NDField
      • Ref
    • Operations with arrays
      • Universal Functions (ufuncs)
      • Reduction Functions
      • Linear Algebra
      • Random Functions
      • Additional Functions and Type Utilities
      • Indexing and Manipulation Functions and Utilities
    • Miscellaneous
    • Compression Utilities
      • blosc2.compress
      • blosc2.compress2
      • blosc2.decompress
      • blosc2.decompress2
      • blosc2.pack
      • blosc2.pack_array
      • blosc2.pack_array2
      • blosc2.pack_tensor
      • blosc2.unpack
      • blosc2.unpack_array
      • blosc2.unpack_array2
      • blosc2.unpack_tensor
      • blosc2.clib_info
      • blosc2.compressor_list
      • blosc2.detect_number_of_cores
      • blosc2.free_resources
      • blosc2.get_clib
      • blosc2.nthreads
      • blosc2.print_versions
      • blosc2.register_codec
      • blosc2.register_filter
      • blosc2.set_blocksize
      • blosc2.set_nthreads
      • blosc2.set_prefetch
      • blosc2.set_releasegil
      • blosc2.set_compressor
      • blosc2.get_compressor
      • blosc2.get_blocksize
      • blosc2.get_cbuffer_sizes
      • blosc2.cparams_dflts
      • blosc2.dparams_dflts
      • blosc2.storage_dflts
      • blosc2.Codec
      • blosc2.Filter
      • blosc2.SpecialValue
      • blosc2.SplitMode
      • blosc2.Tuner
      • blosc2.compute_chunks_blocks
      • blosc2.get_slice_nchunks
      • blosc2.remove_urlpath
      • blosc2.blosclib_version
      • blosc2.DEFINED_CODECS_STOP
      • blosc2.GLOBAL_REGISTERED_CODECS_STOP
      • blosc2.USER_REGISTERED_CODECS_STOP
      • blosc2.EXTENDED_HEADER_LENGTH
      • blosc2.MAX_BUFFERSIZE
      • blosc2.MAX_BLOCKSIZE
      • blosc2.MAX_OVERHEAD
      • blosc2.MAX_TYPESIZE
      • blosc2.MIN_HEADER_LENGTH
      • blosc2.prefilter_funcs
      • blosc2.postfilter_funcs
      • blosc2.ucodecs_registry
      • blosc2.ufilters_registry
      • blosc2.VERSION_DATE
      • blosc2.VERSION_STRING
      • blosc2.__version__
    • Compression, decompression and storage parameters
    • Save and load
    • Expression Utilities
    • Menudet syntax
    • Menudet API
    • Menudet numerical behavior
    • JIT execution options
  • Glossary
  • Development
    • Contributing guidelines
    • Code of Conduct
    • List of desired features for a 4.0 release
    • Remote cache design
    • Menudet numerical qualification
    • Typed expression evaluator rollout
  • Release Notes
Back to top

Menudet numerical qualification¶

These are developer qualification details. For user-facing behavior and limits, see Menudet numerical behavior.

Menudet 0.1 beta requires its specified wrapping/checked integer results and the stated floating-point type, domain, NaN, infinity, signed-zero and rounding rules. It does not promise bit-identical transcendental results across host math libraries or a universal ULP error bound. Native exact-anchor and exceptional-value tests remain separate from the bounded independent math check described here.

Reproducible independent references¶

scripts/menudet_math_vectors.json contains 284 samples for 40 canonical operations, covering both float32 and float64. Inputs and expected results are stored as exact hexadecimal encodings. References were generated with mpmath 1.3.0 at both 100 and 200 decimal digits; regeneration rejects disagreement between the two rounded results. The checker does not need mpmath and does not use NumPy or the executing host’s libm as its mathematical reference.

The finite domains include inverse-function endpoints, small arguments that exercise cancellation, mixed quadrants, gamma functions, and explicit fused multiply-add cancellation. Domain errors, NaNs/infinities, subnormal behavior, signed zeros, rounding functions, nextafter and aliases additionally have native conformance fixtures; they are not certified merely by these finite samples.

Operations

Maximum error for the checked samples

cospi, sinpi, exp10, lgamma, tgamma, logaddexp

8 ULP

Other sampled transcendental functions, sqrt, hypot, floating pow

4 ULP

fdim, fmin, fmax, copysign, fmod, remainder, ldexp, fma

Exact rounded value

These are function-specific acceptance budgets for this finite corpus, not new normative bounds over all possible inputs. ULP is measured using the smaller adjacent gap at the expected value, including at powers of two. Adding a new sample or changing a budget requires review; a failed platform must not silently skip a function or inflate its tolerance.

Running certification¶

Against an installed package:

python scripts/certify_menudet_math.py --report menudet-math.json

Reports identify the package path/version, platform, reference generator, sample count, per-function/per-precision maxima and individual failures. The process exits nonzero on failure. Use --generate only to regenerate the checked-in reference corpus in a development environment with mpmath installed.

Native Python CI uploads the reports. The same corpus runs in Pyodide and in the installed-wheel test command, without adding a runtime reference-library dependency. Passing a local wheel certifies only that tested wheel and host; release readiness additionally requires the supported platform matrix to pass.

Next
Typed expression evaluator rollout
Previous
Remote cache design
Copyright © 2019-present, The Blosc Developers
Made with Sphinx and @pradyunsg's Furo
On this page
  • Menudet numerical qualification
    • Reproducible independent references
    • Running certification