Crates.io | endf_format |
lib.rs | endf_format |
version | 0.0.4 |
source | src |
created_at | 2020-06-23 09:20:50.323046 |
updated_at | 2020-06-30 20:13:33.442954 |
description | ENDF-6 Format Rust Library |
homepage | https://github.com/logansquirel/endf_format |
repository | https://github.com/logansquirel/endf_format |
max_upload_size | |
id | 257113 |
size | 61,480 |
Rust library providing utilities for dealing with ENDF-6 format files.
ENDF-6 format specification is available at: https://www.nndc.bnl.gov/csewg/docs/endf-manual.pdf
Alpha version: endf_format
crate is currently at alpha development phase (version 0.0.z
).
Append endf_format
dependency to your Cargo.toml
[dependencies]
endf_format="^0.0"
Parse ENDF-6 format integers:
let x = endf_format::integer::parse("-1234567890");
assert_eq!(-1_234_567_890_i64, x.unwrap())
Parse ENDF-6 format reals:
let x = endf_format::real::parse("+1.234567-1");
let diff = (1.234_567e-1_f64 - x).abs();
assert!(diff < 1e-10);
let lib = endf_format::library::Library::from_nlib(0).unwrap();
println!("{}", lib);
let sublib = endf_format::sublibrary::SubLibrary::from_nsub(10).unwrap();
println!("{}", sublib);
For questions and issues, open an issue here.
Contributions and Pull Requests (PR) are welcome.