## tangent() doesn't work when non-integers are involved

Bugs

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

### tangent() doesn't work when non-integers are involved

There's a problem creating tangents to ellipses and parabolas (but there's no problem with circles) when we use non-integer numbers.

For example, the following code works:

Code : Tout sélectionner

``````el := ellipse(-1,1,point(1+i));
A := point(-3+3*i);
tn := tangent(el, A);
``````
But the following code doesn't work:

Code : Tout sélectionner

``````el := ellipse(-1,1,point(1+i));
A := point(-3.1+3*i);
tn := tangent(el, A);
``````
I simply changed the "-3" to "-3.1". When I do this, the tangent() fails and prints:

Code : Tout sélectionner

``````Warning! Algebraic extension not implemented yet for poly [100,-1185520711848600,5832385641982111064112389540,-3790135019015975345440561800,-2729701128580087121698805869]
``````
I have the same problem with parabolas. The following code works:

Code : Tout sélectionner

``````A := point(-3+3*i);
B := point(5+i);
C := point(4-i);
prb := parabola(B,C);
tn := tangent(prb,A);
``````
BUT, when I change the "B := point(5+i)" to "B := point(5.1+i)", I get a message telling me "Computing..." and it doesn't return (I can stop it).

The output of my "dpkg -l giac":

Code : Tout sélectionner

``````||/ Name                                Version                Architecture           Description
+++-===================================-======================-======================-============================
ii  giac                                1.1.0-44               i386                   computer algebra system by Bernard Parisse
``````

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

### Re: tangent() doesn't work when non-integers are involved

Indeed, the reason is that it is using the trigonometric parametric equation instead of the rational one. I'll fix that for the next release.

niccolo
Messages : 22
Inscription : dim. mars 02, 2014 2:13 pm

### Re: tangent() doesn't work when non-integers are involved

parisse a écrit :I'll fix that for the next release.
Thank you!