Hi all,
by preparing for a lecture on Newton iteration I did the following,
which strange behaviour. Note, that p and p' in the body of a function
are not evaluated, while x is evaluated. Can one explain the philosophy
behind - or it is a bug (I hope) - and how to do it to achieve the
expected behaviour?
(1) -> p := x^3+4*x^2-10
3 2
(1) x + 4x - 10
Type:
Polynomial(Integer)
(2) -> p' := D p
2
(2) 3x + 8x
Type:
UnivariatePolynomial(x,Integer)
(3) -> N(x) == x - p/p'
Type:
Void
(4) -> N(x)
Compiling function N with type Variable(x) -> Fraction(Polynomial(
Integer))
3 2
2x + 4x + 10
(4) --------------
2
3x + 8x
Type:
Fraction(Polynomial(Integer))
(5) -> N(1)
Compiling function N with type PositiveInteger -> Fraction(
Polynomial(Integer))
3 2
- x - x + 8x + 10
(5) -------------------
2
3x + 8x
Type:
Fraction(Polynomial(Integer))
(6) -> 1-p/p'
3 2
- x - x + 8x + 10
(6) -------------------
2
3x + 8x
Type:
Fraction(Polynomial(Integer))
--
Mit freundlichen Grüßen
Johannes Grabmeier
Prof. Dr. Johannes Grabmeier
Köckstraße 1, D-94469 Deggendorf
Tel. +49-(0)-991-2979584, Tel. +49-(0)-151-681-70756
Tel. +49-(0)-991-3615-141 (d), Fax: +49-(0)-3224-192688
--
You received this message because you are subscribed to the Google Groups
"FriCAS - computer algebra system" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/fricas-devel.
For more options, visit https://groups.google.com/d/optout.