[CLN-list] Cl_I to cl_F conversion error.
Richard B. Kreckel
kreckel at ginac.de
Thu Apr 10 23:24:22 CEST 2014
Hello,
On 04/10/2014 04:06 PM, Ендовицкий Егор wrote:
> I'm using your library in my school project. It is about some numerical
> algorithms.
>
> In my program I need ceil of sqrt of N, and I don't know how implement
> this using your library. Because when I'm trying to converse cl_I to
> cl_F, I got an error:conversion from cln::cl_I to a non-scalar type
> cln::cl_F requested.
>
> Here is a brief information about my OS and PC:
> Gentoo Linux 3.12.13
> gcc 4.7.3-r3
Check out the type system <http://www.ginac.de/CLN/cln_3.html>.
You cannot convert cl_I directly to cl_F because cl_I is not a subclass
of cl_F.
Convert to cl_R instead, then use functions sqrt() and fceiling().
Hope that helps
-richard.
PS: In general, please show some simple example code when asking for
advice on the list.
--
Richard B. Kreckel
<http://www.ginac.de/~kreckel/>
More information about the CLN-list
mailing list