MCPcopy Create free account
hub / github.com/Open-Quant/openquant / test_get_w_key_error

Function test_get_w_key_error

crates/openquant/tests/ch10_snippets.rs:293–295  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

291#[test]
292fn test_inv_price_power() {
293 let f_i: f64 = 35.19;
294 let w_pow: f64 = 3.32;
295 let m_pow: f64 = 0.72;
296 let inv_p = f_i - m_pow.signum() * m_pow.abs().powf(1.0 / w_pow);
297 let res = inv_price_power(f_i, w_pow, m_pow);
298 assert!((res - inv_p).abs() < 1e-7);

Callers

nothing calls this directly

Calls 1

get_wFunction · 0.85

Tested by

no test coverage detected