This could be
```rust
let p = if sign == 1 {p_last} else {-p_last};
Some(Ratio::new(p, q_last))
```
which saves some repetition.