square_root_async

Function square_root_async 

Source
pub async fn square_root_async(number: f64) -> Result<f64>
Expand description

Computes the square root of a number asynchronously by offloading the computation to a blocking thread pool.

§Arguments

  • number: The input number (must be non-negative).

§Returns

  • Ok(f64) if the computation is successful.
  • Err(anyhow::Error) if the input number is negative.