Bill Allombert on Tue, 30 Jul 2019 00:25:42 +0200


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: real/imag for t_QUAD


On Tue, Jul 30, 2019 at 12:14:17AM +0200, Vincent Delecroix wrote:
> Thanks Karim and Bill for your replies! I did not look further than
> the simple '?real' and '?imag'.
> 
> Now, the real question: how can I convert a t_QUAD to a t_COMPLEX (in
> the usual sense) with the pari library? greal/real_i and gimag/imag_i
> have the same behavior as in GP.

Multiply by '1.'.

? quadgen(-23)*1.
%1 =
0.50000000000000000000000000000000000000+2.3979157616563597707987190320813469600*I

But the real question is why do you want to use t_QUAD ?

Cheers,
Bill.