
Line-by-line transliteration of the C math library, delivering comprehensive IEEE-compliant floating-point math functions with faithful behavior, port provenance headers, and in-progress feature-parity tracking.
This is a Kotlin Multiplatform line-by-line transliteration port of libm.
Original Project: This port is based on libm. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced from
https://github.com/rust-lang/libm. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs where appropriate so they continue to resolve from this repository.
A Rust implementations of the C math library.
libm provides fallback implementations for Rust's float math functions in
core, and the core_float_math feature. If what is available suits your
needs, there is no need to add libm as a dependency.
If more functionality is needed, this crate can also be used directly:
[dependencies]
libm = "0.2.11"Please check CONTRIBUTING.md
This crate supports rustc 1.63 and newer.
Usage is under the MIT license, available at https://opensource.org/license/mit.
Contributions are licensed under both the MIT license and the Apache License, Version 2.0, available at htps://www.apache.org/licenses/LICENSE-2.0. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as mentioned, without any additional terms or conditions.
See LICENSE.txt for full details.
dependencies {
implementation("io.github.kotlinmania:libm-kotlin:0.1.0")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same license terms as the upstream libm. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the libm authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the libm maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.
This is a Kotlin Multiplatform line-by-line transliteration port of libm.
Original Project: This port is based on libm. All design credit and project intent belong to the upstream authors; this repository is a faithful port to Kotlin Multiplatform with no behavioural changes intended.
This is an in-progress port. The goal is feature parity with the upstream Rust crate while providing a native Kotlin Multiplatform API. Every Kotlin file carries a // port-lint: source <path> header naming its upstream Rust counterpart so the AST-distance tool can track provenance.
The text below is reproduced from
https://github.com/rust-lang/libm. It is the upstream project's own description and remains under the upstream authors' authorship; links have been rewritten to absolute upstream URLs where appropriate so they continue to resolve from this repository.
A Rust implementations of the C math library.
libm provides fallback implementations for Rust's float math functions in
core, and the core_float_math feature. If what is available suits your
needs, there is no need to add libm as a dependency.
If more functionality is needed, this crate can also be used directly:
[dependencies]
libm = "0.2.11"Please check CONTRIBUTING.md
This crate supports rustc 1.63 and newer.
Usage is under the MIT license, available at https://opensource.org/license/mit.
Contributions are licensed under both the MIT license and the Apache License, Version 2.0, available at htps://www.apache.org/licenses/LICENSE-2.0. Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as mentioned, without any additional terms or conditions.
See LICENSE.txt for full details.
dependencies {
implementation("io.github.kotlinmania:libm-kotlin:0.1.0")
}./gradlew build
./gradlew testSee AGENTS.md and CLAUDE.md for translator discipline, port-lint header convention, and Rust → Kotlin idiom mapping.
This Kotlin port is distributed under the same license terms as the upstream libm. See LICENSE (and any sibling LICENSE-* / NOTICE files mirrored from upstream) for the full text.
Original work copyrighted by the libm authors.
Kotlin port: Copyright (c) 2026 Sydney Renee and The Solace Project.
Thanks to the libm maintainers and contributors for the original Rust implementation. This port reproduces their work in Kotlin Multiplatform; bug reports about upstream design or behavior should go to the upstream repository.