File tree 4 files changed +23
-1
lines changed
4 files changed +23
-1
lines changed Original file line number Diff line number Diff line change 1
1
name = " Compat"
2
2
uuid = " 34da2185-b29b-5c13-b0c7-acf172513d20"
3
- version = " 3.24 .0"
3
+ version = " 3.25 .0"
4
4
5
5
[deps ]
6
6
Base64 = " 2a0f44e3-6c83-55bd-87e4-b1978d98bd5f"
Original file line number Diff line number Diff line change @@ -54,6 +54,9 @@ without incrementing the major version of Compat.jl if necessary to match
54
54
changes in ` julia ` .
55
55
56
56
## Supported features
57
+
58
+ * ` cispi(x) ` for accurately calculating ` cis(pi * x) ` ([ #38449 ] ) (since Compat 3.25)
59
+
57
60
* ` startswith(s, r::Regex) ` and ` endswith(s, r::Regex) ` ([ #29790 ] ) (since Compat 3.24)
58
61
59
62
* ` sincospi(x) ` for calculating the tuple ` (sinpi(x), cospi(x)) ` ([ #35816 ] ) (since Compat 3.23)
@@ -232,3 +235,4 @@ Note that you should specify the correct minimum version for `Compat` in the
232
235
[ #37391 ] : https://github.com/JuliaLang/julia/pull/37391
233
236
[ #35816 ] : https://github.com/JuliaLang/julia/pull/35816
234
237
[ #29790 ] : https://github.com/JuliaLang/julia/pull/29790
238
+ [ #38449 ] : https://github.com/JuliaLang/julia/pull/38449
Original file line number Diff line number Diff line change @@ -820,6 +820,16 @@ if VERSION < v"1.6.0-DEV.292" # 6cd329c371c1db3d9876bc337e82e274e50420e8
820
820
sincospi (x) = (sinpi (x), cospi (x))
821
821
end
822
822
823
+ # https://github.com/JuliaLang/julia/pull/38449
824
+ if VERSION < v " 1.6.0-DEV.1591" # 96d59f957e4c0413e2876592072c0f08a7482cf2
825
+ export cispi
826
+ cispi (theta:: Real ) = Complex (reverse (sincospi (theta))... )
827
+ function cispi (z:: Complex )
828
+ sipi, copi = sincospi (z)
829
+ return complex (real (copi) - imag (sipi), imag (copi) + real (sipi))
830
+ end
831
+ end
832
+
823
833
# https://github.com/JuliaLang/julia/pull/29790
824
834
if VERSION < v " 1.2.0-DEV.246"
825
835
using Base. PCRE
Original file line number Diff line number Diff line change 774
774
@test sincospi (0.13im ) == (sinpi (0.13im ), cospi (0.13im ))
775
775
end
776
776
777
+ # https://github.com/JuliaLang/julia/pull/38449
778
+ @testset " cispi(x)" begin
779
+ @test cispi (true ) == - 1 + 0im
780
+ @test cispi (1 ) == - 1.0 + 0.0im
781
+ @test cispi (2.0 ) == 1.0 + 0.0im
782
+ @test cispi (0.25 + 1im ) ≈ cis (π/ 4 + π* im)
783
+ end
784
+
777
785
include (" iterators.jl" )
778
786
779
787
# Import renaming, https://github.com/JuliaLang/julia/pull/37396,
You can’t perform that action at this time.
0 commit comments