Skip to content

Commit

Permalink
document fourthroot (#55560)
Browse files Browse the repository at this point in the history
Updates #19529
  • Loading branch information
nsajko authored and KristofferC committed Sep 12, 2024
1 parent 6cae6a4 commit 0d0a18f
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
1 change: 1 addition & 0 deletions doc/src/base/math.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,7 @@ Base.flipsign
Base.sqrt(::Number)
Base.isqrt
Base.Math.cbrt(::AbstractFloat)
Base.fourthroot(::Number)
Base.real
Base.imag
Base.reim
Expand Down
31 changes: 16 additions & 15 deletions doc/src/manual/mathematical-operations.md
Original file line number Diff line number Diff line change
Expand Up @@ -551,21 +551,22 @@ See [Conversion and Promotion](@ref conversion-and-promotion) for how to define

### Powers, logs and roots

| Function | Description |
|:------------------------ |:-------------------------------------------------------------------------- |
| [`sqrt(x)`](@ref), `√x` | square root of `x` |
| [`cbrt(x)`](@ref), `∛x` | cube root of `x` |
| [`hypot(x, y)`](@ref) | hypotenuse of right-angled triangle with other sides of length `x` and `y` |
| [`exp(x)`](@ref) | natural exponential function at `x` |
| [`expm1(x)`](@ref) | accurate `exp(x) - 1` for `x` near zero |
| [`ldexp(x, n)`](@ref) | `x * 2^n` computed efficiently for integer values of `n` |
| [`log(x)`](@ref) | natural logarithm of `x` |
| [`log(b, x)`](@ref) | base `b` logarithm of `x` |
| [`log2(x)`](@ref) | base 2 logarithm of `x` |
| [`log10(x)`](@ref) | base 10 logarithm of `x` |
| [`log1p(x)`](@ref) | accurate `log(1 + x)` for `x` near zero |
| [`exponent(x)`](@ref) | binary exponent of `x` |
| [`significand(x)`](@ref) | binary significand (a.k.a. mantissa) of a floating-point number `x` |
| Function | Description |
|:----------------------------- |:-------------------------------------------------------------------------- |
| [`sqrt(x)`](@ref), `√x` | square root of `x` |
| [`cbrt(x)`](@ref), `∛x` | cube root of `x` |
| [`fourthroot(x)`](@ref), `∜x` | fourth root of `x` |
| [`hypot(x, y)`](@ref) | hypotenuse of right-angled triangle with other sides of length `x` and `y` |
| [`exp(x)`](@ref) | natural exponential function at `x` |
| [`expm1(x)`](@ref) | accurate `exp(x) - 1` for `x` near zero |
| [`ldexp(x, n)`](@ref) | `x * 2^n` computed efficiently for integer values of `n` |
| [`log(x)`](@ref) | natural logarithm of `x` |
| [`log(b, x)`](@ref) | base `b` logarithm of `x` |
| [`log2(x)`](@ref) | base 2 logarithm of `x` |
| [`log10(x)`](@ref) | base 10 logarithm of `x` |
| [`log1p(x)`](@ref) | accurate `log(1 + x)` for `x` near zero |
| [`exponent(x)`](@ref) | binary exponent of `x` |
| [`significand(x)`](@ref) | binary significand (a.k.a. mantissa) of a floating-point number `x` |

For an overview of why functions like [`hypot`](@ref), [`expm1`](@ref), and [`log1p`](@ref)
are necessary and useful, see John D. Cook's excellent pair of blog posts on the subject: [expm1, log1p, erfc](https://www.johndcook.com/blog/2010/06/07/math-library-functions-that-seem-unnecessary/),
Expand Down

0 comments on commit 0d0a18f

Please sign in to comment.