poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ] & poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]

Messages in english

Modérateur : xcasadmin

compsystems
Messages : 562
Inscription : sam. févr. 04, 2017 11:34 pm
Localisation : Colombia
Contact :

poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ] & poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]

Message par compsystems » 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₀]

parisse
Messages : 5739
Inscription : mar. déc. 20, 2005 4:02 pm
Contact :

Re: poly1a[a₀, a₁, a₂, …, aₙ₋₁, aₙ] & poly1d[aₙ, aₙ₋₁, …, a₂, a₁, a₀]

Message par parisse » mar. juin 26, 2018 4:46 am

Inside Xcas, coefficients are always ordered by decreasing degree. poly1[...] is not really meant to be used in highschool, it's for advanced users who need efficient 1-d dense polynomial arithmetic.

Répondre