EulerSumCommutative
com.phasmidsoftware.number.expression.expr.EulerSumCommutative
object EulerSumCommutative extends CommutativeExtractor[Expression, Expression]
Commutative extractor for the Euler recognition pattern cos(θ) + i·sin(θ).
Matches a pair (left, right) where one side is cos(θ) and the other is i·sin(θ) (in either multiplication order), returning (θ_from_cos, θ_from_sin). The caller guards with θ1 == θ2.
extractLeft excludes the i·sin shape so the two roles are mutually exclusive, preventing the swap path from producing spurious matches.
Attributes
- Graph
-
- Supertypes
- Self type
-
EulerSumCommutative.type
Members list
In this article