Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions library/std/src/num/f128.rs
Original file line number Diff line number Diff line change
Expand Up @@ -557,10 +557,12 @@ impl f128 {

/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
///
/// * `x = 0`, `y = 0`: `0`
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
/// | `x` | `y` | Piecewise Definition | Range |
/// |---------|---------|----------------------|---------------|
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
///
/// # Unspecified precision
///
Expand Down
10 changes: 6 additions & 4 deletions library/std/src/num/f16.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,10 +522,12 @@ impl f16 {

/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
///
/// * `x = 0`, `y = 0`: `0`
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
/// | `x` | `y` | Piecewise Definition | Range |
/// |---------|---------|----------------------|---------------|
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
///
/// # Unspecified precision
///
Expand Down
10 changes: 6 additions & 4 deletions library/std/src/num/f32.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,12 @@ impl f32 {

/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
///
/// * `x = 0`, `y = 0`: `0`
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
/// | `x` | `y` | Piecewise Definition | Range |
/// |---------|---------|----------------------|---------------|
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
///
/// # Unspecified precision
///
Expand Down
10 changes: 6 additions & 4 deletions library/std/src/num/f64.rs
Original file line number Diff line number Diff line change
Expand Up @@ -826,10 +826,12 @@ impl f64 {

/// Computes the four quadrant arctangent of `self` (`y`) and `other` (`x`) in radians.
///
/// * `x = 0`, `y = 0`: `0`
/// * `x >= 0`: `arctan(y/x)` -> `[-pi/2, pi/2]`
/// * `y >= 0`: `arctan(y/x) + pi` -> `(pi/2, pi]`
/// * `y < 0`: `arctan(y/x) - pi` -> `(-pi, -pi/2)`
/// | `x` | `y` | Piecewise Definition | Range |
/// |---------|---------|----------------------|---------------|
/// | `>= +0` | `>= +0` | `arctan(y/x)` | `[+0, +pi/2]` |
/// | `>= +0` | `<= -0` | `arctan(y/x)` | `[-pi/2, -0]` |
/// | `<= -0` | `>= +0` | `arctan(y/x) + pi` | `[+pi/2, +pi]`|
/// | `<= -0` | `<= -0` | `arctan(y/x) - pi` | `[-pi, -pi/2]`|
///
/// # Unspecified precision
///
Expand Down
Loading