MCPcopy Create free account
hub / github.com/hashintel/hash / from_natural

Function from_natural

libs/@local/codec/src/numeric/real.rs:524–531  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

522
523 #[test]
524 fn from_natural() {
525 let real = Real::from_natural(42, 0);
526 assert_eq!(real.to_i32(), Some(42));
527 assert!(
528 (real.to_f64_lossy() - 42.0).abs() < f64::EPSILON,
529 "Expected real.to_f64() to be approximately 42.0"
530 );
531 }
532
533 #[test]
534 fn operations() {

Callers 12

operationsFunction · 0.85
orderingFunction · 0.85
specific_versionFunction · 0.85
transpile_all_conditionFunction · 0.85
transpile_any_conditionFunction · 0.85
multiple_ofFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected