@@ -10,7 +10,7 @@ export sin, cos, sincos, tan, sinh, cosh, tanh, asin, acos, atan,
10
10
acosd, acotd, acscd, asecd, asind, atand,
11
11
rad2deg, deg2rad,
12
12
log, log2, log10, log1p, exponent, exp, exp2, exp10, expm1,
13
- cbrt, sqrt, significand,
13
+ cbrt, sqrt, fourthroot, significand,
14
14
hypot, max, min, minmax, ldexp, frexp,
15
15
clamp, clamp!, modf, ^ , mod2pi, rem2pi,
16
16
@evalpoly , evalpoly
@@ -715,6 +715,13 @@ julia> .√(1:4)
715
715
"""
716
716
sqrt (x)
717
717
718
+ """
719
+ fourthroot(x)
720
+
721
+ Return the fourth root of `x` by applying `sqrt` twice successively.
722
+ """
723
+ fourthroot (x:: Number ) = sqrt (sqrt (x))
724
+
718
725
"""
719
726
hypot(x, y)
720
727
@@ -1537,7 +1544,7 @@ include("special/log.jl")
1537
1544
# Float16 definitions
1538
1545
1539
1546
for func in (:sin ,:cos ,:tan ,:asin ,:acos ,:atan ,:cosh ,:tanh ,:asinh ,:acosh ,
1540
- :atanh ,:log ,:log2 ,:log10 ,:sqrt ,:log1p )
1547
+ :atanh ,:log ,:log2 ,:log10 ,:sqrt ,:fourthroot , : log1p )
1541
1548
@eval begin
1542
1549
$ func (a:: Float16 ) = Float16 ($ func (Float32 (a)))
1543
1550
$ func (a:: ComplexF16 ) = ComplexF16 ($ func (ComplexF32 (a)))
@@ -1573,5 +1580,6 @@ end
1573
1580
exp2 (x:: AbstractFloat ) = 2 ^ x
1574
1581
exp10 (x:: AbstractFloat ) = 10 ^ x
1575
1582
clamp (:: Missing , lo, hi) = missing
1583
+ fourthroot (:: Missing ) = missing
1576
1584
1577
1585
end # module
0 commit comments