poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ] & poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]
Publié : mar. juin 26, 2018 4:31 am
Hello, a problem when working in polynomials as n-uplas, is that it is not known if they are ordered in ascending or descending order.
idea: add the prefixes (ascending , decreasing) to be able to differentiate them and internally interpret them without needing to verify external flag
P(x) = a₀·x⁰ + a₁·x¹ + a₂·x² + … + aₙ₋₁ ·xⁿ⁻¹ + aₙ· xⁿ
poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ]
P(x) = aₙ·xⁿ + aₙ₋₁ ·xⁿ⁻¹+ … + a₂·x² + a₁·x¹ + a₀·x⁰
poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]
idea: add the prefixes (ascending , decreasing) to be able to differentiate them and internally interpret them without needing to verify external flag
P(x) = a₀·x⁰ + a₁·x¹ + a₂·x² + … + aₙ₋₁ ·xⁿ⁻¹ + aₙ· xⁿ
poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ]
P(x) = aₙ·xⁿ + aₙ₋₁ ·xⁿ⁻¹+ … + a₂·x² + a₁·x¹ + a₀·x⁰
poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]