<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[arbeiten mit gmp]]></title><description><![CDATA[<p>Hi!<br />
Also... ich hab folgendes Problemchen!<br />
ich habe nen String und will den umwandeln in ne große Zahl, die ich dann in nen mpz_t stecke, also ne sehr großen ganzzahligen datentyp... das kann ich machen mit der funktion</p>
<p>int mpz_set_str (mpz t rop, char *str, int base) [Function]</p>
<p>{Set the value of rop from str, a null-terminated C string in base base. White space is allowed<br />
in the string, and is simply ignored. The base may vary from 2 to 36. If base is 0, the actual<br />
base is determined from the leading characters: if the rst two characters are \0x&quot; or \0X&quot;,<br />
hexadecimal is assumed, otherwise if the rst character is \0&quot;, octal is assumed, otherwise<br />
decimal is assumed.<br />
This function returns 0 if the entire string is a valid number in base base. Otherwise it returns}</p>
<p>gibbet dazu denn auch umgekehrt ne Funktion zu? die mir ne mpz in nen string packt? und wenn nicht... wie sähe die aus wenn man sie sich basten müsste?</p>
<p>dank euch schonmal!</p>
<p>mfg<br />
Tommy</p>
]]></description><link>https://www.c-plusplus.net/forum/topic/133662/arbeiten-mit-gmp</link><generator>RSS for Node</generator><lastBuildDate>Fri, 28 Aug 2026 00:53:11 GMT</lastBuildDate><atom:link href="https://www.c-plusplus.net/forum/topic/133662.rss" rel="self" type="application/rss+xml"/><pubDate>Thu, 19 Jan 2006 16:38:10 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to arbeiten mit gmp on Thu, 19 Jan 2006 16:38:10 GMT]]></title><description><![CDATA[<p>Hi!<br />
Also... ich hab folgendes Problemchen!<br />
ich habe nen String und will den umwandeln in ne große Zahl, die ich dann in nen mpz_t stecke, also ne sehr großen ganzzahligen datentyp... das kann ich machen mit der funktion</p>
<p>int mpz_set_str (mpz t rop, char *str, int base) [Function]</p>
<p>{Set the value of rop from str, a null-terminated C string in base base. White space is allowed<br />
in the string, and is simply ignored. The base may vary from 2 to 36. If base is 0, the actual<br />
base is determined from the leading characters: if the rst two characters are \0x&quot; or \0X&quot;,<br />
hexadecimal is assumed, otherwise if the rst character is \0&quot;, octal is assumed, otherwise<br />
decimal is assumed.<br />
This function returns 0 if the entire string is a valid number in base base. Otherwise it returns}</p>
<p>gibbet dazu denn auch umgekehrt ne Funktion zu? die mir ne mpz in nen string packt? und wenn nicht... wie sähe die aus wenn man sie sich basten müsste?</p>
<p>dank euch schonmal!</p>
<p>mfg<br />
Tommy</p>
]]></description><link>https://www.c-plusplus.net/forum/post/970705</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/970705</guid><dc:creator><![CDATA[TommyTB]]></dc:creator><pubDate>Thu, 19 Jan 2006 16:38:10 GMT</pubDate></item><item><title><![CDATA[Reply to arbeiten mit gmp on Thu, 19 Jan 2006 17:13:46 GMT]]></title><description><![CDATA[<p>Hi,</p>
<p>char* cs = new char[mpz_sizeinbase(value_, base) + 2];<br />
<strong>mpz_get_str</strong>(cs, base, value_);<br />
std::string str_r(cs); delete[] cs;</p>
<p>dunarr</p>
]]></description><link>https://www.c-plusplus.net/forum/post/970729</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/970729</guid><dc:creator><![CDATA[DuNarr]]></dc:creator><pubDate>Thu, 19 Jan 2006 17:13:46 GMT</pubDate></item><item><title><![CDATA[Reply to arbeiten mit gmp on Thu, 19 Jan 2006 22:14:43 GMT]]></title><description><![CDATA[<p>dank dir!</p>
]]></description><link>https://www.c-plusplus.net/forum/post/970883</link><guid isPermaLink="true">https://www.c-plusplus.net/forum/post/970883</guid><dc:creator><![CDATA[TommyTB]]></dc:creator><pubDate>Thu, 19 Jan 2006 22:14:43 GMT</pubDate></item></channel></rss>