-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from putianyi889/version-0.2.1
Version 0.2.1
- Loading branch information
Showing
7 changed files
with
97 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
version: | ||
- '1.9' | ||
- '1.10' | ||
os: | ||
- ubuntu-latest | ||
- macOS-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
name = "PTYQoL" | ||
uuid = "551ad714-b11a-4605-8871-12721def4e72" | ||
authors = ["Tianyi Pu <[email protected]> and contributors"] | ||
version = "0.2.0" | ||
version = "0.2.1" | ||
|
||
[weakdeps] | ||
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
|
@@ -10,9 +10,9 @@ ContinuumArrays = "7ae1f121-cc2c-504b-ac30-9b923412ae5c" | |
IntervalSets = "8197267c-284f-5f27-9208-e0e47529a953" | ||
QuasiArrays = "c4ea9172-b204-11e9-377d-29865faadc5c" | ||
ClassicalOrthogonalPolynomials = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" | ||
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c" | ||
BandedMatrices = "aae01518-5342-5314-be14-df237901396f" | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
AlgebraicNumbers = "e86d093a-a386-599e-b7c7-df0420c8bcba" | ||
|
||
[extensions] | ||
PTYQoLLinearAlgebraExt = "LinearAlgebra" | ||
|
@@ -21,9 +21,9 @@ PTYQoLContinuumArraysExt = "ContinuumArrays" | |
PTYQoLIntervalSetsExt = "IntervalSets" | ||
PTYQoLQuasiArraysExt = "QuasiArrays" | ||
PTYQoLClassicalOrthogonalPolynomialsExt = "ClassicalOrthogonalPolynomials" | ||
PTYQoLInfiniteArraysExt = "InfiniteArrays" | ||
PTYQoLBandedMatricesExt = "BandedMatrices" | ||
PTYQoLArrayLayoutsExt = "ArrayLayouts" | ||
PTYQoLAlgebraicNumbersExt = "AlgebraicNumbers" | ||
|
||
[compat] | ||
julia = "1" | ||
|
@@ -35,9 +35,9 @@ DomainSets = "5b8099bc-c8ec-5219-889f-1d9e522a28bf" | |
LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
ClassicalOrthogonalPolynomials = "b30e2e7b-c4ee-47da-9d5f-2c5c27239acd" | ||
InfiniteArrays = "4858937d-0d70-526a-a4dd-2d5cb5dd786c" | ||
ArrayLayouts = "4c555306-a7a7-4459-81d9-ec55ddd5c99a" | ||
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595" | ||
AlgebraicNumbers = "e86d093a-a386-599e-b7c7-df0420c8bcba" | ||
|
||
[targets] | ||
test = ["Test", "Aqua", "LinearAlgebra", "Documenter", "DomainSets", "ContinuumArrays", "ClassicalOrthogonalPolynomials", "InfiniteArrays", "ArrayLayouts"] | ||
test = ["Test", "Aqua", "LinearAlgebra", "Documenter", "DomainSets", "ContinuumArrays", "ClassicalOrthogonalPolynomials", "ArrayLayouts", "AlgebraicNumbers"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
module PTYQoLAlgebraicNumbersExt | ||
|
||
import AlgebraicNumbers: sin_alg, cos_alg, AlgebraicNumber | ||
import Base: sinpi, cospi, tanpi, sincospi, sind, cosd, sincosd, promote_rule, float | ||
|
||
export tan_alg, sincos_alg | ||
|
||
tan_alg(x) = sin_alg(x) // cos_alg(x) | ||
sincos_alg(x) = (sin_alg(x), cos_alg(x)) | ||
|
||
for (fd, fpi, falg) in ((:sind, :sinpi, :sin_alg), (:cosd, :cospi, :cos_alg), (:tand, :tanpi, :tan_alg), (:sincosd, :sincospi, :sincos_alg)) | ||
@eval begin | ||
$fpi(x::Rational) = $falg(x) | ||
$fpi(x::AlgebraicNumber) = $falg(x) | ||
$fd(x::Integer) = $falg(x//180) | ||
$fd(x::Rational) = $falg(x//180) | ||
end | ||
end | ||
|
||
promote_rule(::Type{<:AlgebraicNumber}, ::Type{T}) where T <: AbstractFloat = T | ||
float(x::AlgebraicNumber) = x.apprx | ||
(::Type{T})(x::AlgebraicNumber) where T<:Number = T(x.apprx) | ||
AlgebraicNumber(x::AlgebraicNumber) = x | ||
|
||
end # module |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters