This could be written:

~~~~
let sign =
    if hi > 0f64 { 1f64 }
    else { -1f64 };
~~~~

Spares an alloc in the `else` case and a `mut` annotation.