{"id":24756364,"url":"https://github.com/dalance/softfloat-wrapper","last_synced_at":"2025-10-11T02:31:40.653Z","repository":{"id":52400510,"uuid":"284597275","full_name":"dalance/softfloat-wrapper","owner":"dalance","description":"a safe wrapper of Berkeley SoftFloat based on softfloat-sys","archived":false,"fork":false,"pushed_at":"2023-06-26T02:27:00.000Z","size":26,"stargazers_count":9,"open_issues_count":1,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-05-02T01:00:54.786Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dalance.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE-APACHE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"dalance"}},"created_at":"2020-08-03T03:48:17.000Z","updated_at":"2024-03-12T08:28:58.000Z","dependencies_parsed_at":"2022-09-07T15:41:48.570Z","dependency_job_id":null,"html_url":"https://github.com/dalance/softfloat-wrapper","commit_stats":null,"previous_names":[],"tags_count":9,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsoftfloat-wrapper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsoftfloat-wrapper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsoftfloat-wrapper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dalance%2Fsoftfloat-wrapper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dalance","download_url":"https://codeload.github.com/dalance/softfloat-wrapper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236026089,"owners_count":19083324,"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":"2025-01-28T13:51:06.344Z","updated_at":"2025-10-11T02:31:35.386Z","avatar_url":"https://github.com/dalance.png","language":"Rust","funding_links":["https://github.com/sponsors/dalance"],"categories":[],"sub_categories":[],"readme":"# softfloat-wrapper\nsoftfloat-wrapper is a safe wrapper of [Berkeley SoftFloat](https://github.com/ucb-bar/berkeley-softfloat-3) based on [softfloat-sys](https://crates.io/crates/softfloat-sys).\n\n[![Actions Status](https://github.com/dalance/softfloat-wrapper/workflows/Regression/badge.svg)](https://github.com/dalance/softfloat-wrapper/actions)\n[![Crates.io](https://img.shields.io/crates/v/softfloat-wrapper.svg)](https://crates.io/crates/softfloat-wrapper)\n[![Docs.rs](https://docs.rs/softfloat-wrapper/badge.svg)](https://docs.rs/softfloat-wrapper)\n\n## Usage\n\n```Cargo.toml\n[dependencies]\nsoftfloat-wrapper = \"0.3.4\"\n```\n\n## Example\n\n```rust\nuse softfloat_wrapper::{Float, F16, RoundingMode};\n\nfn main() {\n    let a = 0x1234;\n    let b = 0x1479;\n\n    let a = F16::from_bits(a);\n    let b = F16::from_bits(b);\n    let d = a.add(b, RoundingMode::TiesToEven);\n\n    let a = f32::from_bits(a.to_f32(RoundingMode::TiesToEven).to_bits());\n    let b = f32::from_bits(b.to_f32(RoundingMode::TiesToEven).to_bits());\n    let d = f32::from_bits(d.to_f32(RoundingMode::TiesToEven).to_bits());\n\n    println!(\"{} + {} = {}\", a, b, d);\n}\n```\n\n## Feature\n\nSome architectures are supported:\n\n* 8086\n* 8086-SSE (default)\n* ARM-VFPv2\n* ARM-VFPv2-DefaultNaN\n* RISCV\n\nYou can specify architecture through feature like below:\n\n```Cargo.toml\n[dependencies.softfloat-wrapper]\nversion = \"0.3.4\"\ndefault-features = false\nfeatures = [\"riscv\"]\n```\n\n## License\n\nLicensed under either of\n\n * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)\n * MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally\nsubmitted for inclusion in the work by you, as defined in the Apache-2.0\nlicense, shall be dual licensed as above, without any additional terms or\nconditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fsoftfloat-wrapper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdalance%2Fsoftfloat-wrapper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdalance%2Fsoftfloat-wrapper/lists"}