hayden4r4 / blackscholes-rust

A Black-Scholes pricing model built in Rust
MIT License
11 stars 6 forks source link

resolve magic numbers to const function approach when we can #41

Open day01 opened 3 months ago

day01 commented 3 months ago

Currently, our codebase uses constants to store pre-calculated values such as 2 * pi.

We would like to replace these constants with const fn functions to enable dynamic calculation of values at compile time.


blocked by https://github.com/rust-lang/rust/issues/57241 Unfortunately, the current limitations in Rust do not fully support the use of const fn for f64.