lib-misc-utils · crate

libm

Libraryenvironment

Kinogaki's own libm, published under the crates.io name so the frozen naga resolves to it through [patch.crates-io].

Repository
lib-misc-utils (kinogaki/lib-misc-utils)
Folder
libs/lib-misc-utils/crates/libm
Source
1 file, 61 lines
Tests
2 files, 996 lines
This crate libm
depends onused by tests alonedependencies for tests alone are listed below, not drawn

What it is

Kinogaki's own libm, published under the crates.io name so the frozen naga resolves to it through [patch.crates-io]. It is not upstream libm: it has only the four functions naga calls directly (its other float maths goes through our num-traits, which uses std).

  • rint, rintf: round to the nearest integer, ties to even (exact).
  • asinh, acosh: the classic argument-range split (as in fdlibm and musl) over std's ln, ln_1p and sqrt, so large arguments do not overflow and small ones keep their precision. Accuracy is checked against reference values computed to 40 digits (tests/accuracy.rs): within 1 ulp.

Depends on

None.

Third-party

None.

Used by

None.

Third-party crates using it

naga

Modules

One file: the crate root.

Public types and traits

Besides these, 4 public functions at module level.