<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Large Decimal to Hex Conversion in C in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023148#M811017</link>
    <description>First, sorry for posting in the wrong group.  &lt;BR /&gt;&lt;BR /&gt;Clay you were right. I added the +DD64 flag to the compilation line and it worked.  I asked one of our UINIX team, they did a little research and came up with the same suggestion so I tried it and it worked. &lt;BR /&gt;&lt;BR /&gt;Antoniov mentioned the sscanf to convert it which I was unfamiliar with, scanf did not handle the large number and I was unfamiliar with sscanf at the time.  I ended up using atof and cast the result as an unsigned long long which truncated the decimal places from the result. I tested the $%#@ out of it to ensure it was going to work correctly and it did.&lt;BR /&gt;&lt;BR /&gt;Thanks for taking the time to post suggestions. I am very appreciative.&lt;BR /&gt;&lt;BR /&gt;Brad.&lt;BR /&gt;</description>
    <pubDate>Fri, 18 Jul 2003 19:06:55 GMT</pubDate>
    <dc:creator>Brad Simmonds</dc:creator>
    <dc:date>2003-07-18T19:06:55Z</dc:date>
    <item>
      <title>Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023144#M811013</link>
      <description>I have a problem in that I need to change a large decimal value into its hex equivalent.  The largest decimal value I need to represent a hex is 25516777215.  The problem here is that this number is larger than any of the C functions can handle.  We are usng UP-UX 11.  I was olso told that a big number library might be the answer, does HP have that available?&lt;BR /&gt;&lt;BR /&gt;Any suggestions on how to go about this would be appreciated.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Brad.&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jul 2003 16:48:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023144#M811013</guid>
      <dc:creator>Brad Simmonds</dc:creator>
      <dc:date>2003-07-14T16:48:45Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023145#M811014</link>
      <description>Hi Brad,&lt;BR /&gt;&lt;BR /&gt;since you are looking for a HP-UX library and not for an hp OpenVMS one, you most probably will get much better answers in the hpux/language area at &lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://forums.itrc.hp.com/cm/CategoryHome/1,,150,00.html" target="_blank"&gt;http://forums.itrc.hp.com/cm/CategoryHome/1,,150,00.html&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Greetings, Martin</description>
      <pubDate>Mon, 14 Jul 2003 20:17:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023145#M811014</guid>
      <dc:creator>Martin P.J. Zinser</dc:creator>
      <dc:date>2003-07-14T20:17:53Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023146#M811015</link>
      <description>Hi Brad,&lt;BR /&gt;I answer as OpenVms works, but HP-Ux may be different.&lt;BR /&gt;On OpenVms you can compile using long type 32 or 64 bit. Naturally with 32 bit long you cannot convert 25516777215 but using 64 bit long you can convert using standard sscanf function.&lt;BR /&gt;If you cannot found 64 bit long in HP ux write again: send you a function to convert a string to a hex string (not is possible manager numeric in this case).&lt;BR /&gt;&lt;BR /&gt;HTH&lt;BR /&gt;Antoniov&lt;BR /&gt;</description>
      <pubDate>Tue, 15 Jul 2003 05:33:53 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023146#M811015</guid>
      <dc:creator>Antoniov.</dc:creator>
      <dc:date>2003-07-15T05:33:53Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023147#M811016</link>
      <description>You don't need to do anything special except compile with the +DD64 option. This will coerce all longs to 64-bits but this will only run on PA-8XXX processors and above.&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Jul 2003 18:43:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023147#M811016</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2003-07-18T18:43:37Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023148#M811017</link>
      <description>First, sorry for posting in the wrong group.  &lt;BR /&gt;&lt;BR /&gt;Clay you were right. I added the +DD64 flag to the compilation line and it worked.  I asked one of our UINIX team, they did a little research and came up with the same suggestion so I tried it and it worked. &lt;BR /&gt;&lt;BR /&gt;Antoniov mentioned the sscanf to convert it which I was unfamiliar with, scanf did not handle the large number and I was unfamiliar with sscanf at the time.  I ended up using atof and cast the result as an unsigned long long which truncated the decimal places from the result. I tested the $%#@ out of it to ensure it was going to work correctly and it did.&lt;BR /&gt;&lt;BR /&gt;Thanks for taking the time to post suggestions. I am very appreciative.&lt;BR /&gt;&lt;BR /&gt;Brad.&lt;BR /&gt;</description>
      <pubDate>Fri, 18 Jul 2003 19:06:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023148#M811017</guid>
      <dc:creator>Brad Simmonds</dc:creator>
      <dc:date>2003-07-18T19:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023149#M811018</link>
      <description>And if you have *realy* large numbers, you can use Math::bigint :)&lt;BR /&gt;&lt;BR /&gt;pc03:/W 283 $ perl -Mbigint -le'$x = 24354**245; print $x-&amp;gt;as_hex'&lt;BR /&gt;0x44feca8dca03b4a7f6c74b327fb1f5fce5853557cfdb7ee961d45dca4f33a899df3ef7f213b050&lt;BR /&gt;4e58c65946eb54bc307f4d62b6d3ae93495f55df69b154b1666ebea5233cb9b2a455d2f1e2758c75&lt;BR /&gt;2fe932781920d56cc8060f3020bb00736ea407783194ab3837500f021cb0bb3b022b4cf69dd4d71c&lt;BR /&gt;ab55194f3865562753cb1718fd947e25806a914cb29011d4dc476983d0a3057f0ae0798805379fb2&lt;BR /&gt;157e07eb353211f14e821df9f5e198dc4fcc356c42dc59cd692931c02398644031c9740423839923&lt;BR /&gt;dabe0d8da87849945915907bd6eebff1f03c5b63726cd9aaf9d602f204cfd29ae23dfec82bc99dc3&lt;BR /&gt;a05d6e0fb8be22ace5459fc1caab2a9c1410d507fd7b94e7496608c2688b5b691542da03ea8ea391&lt;BR /&gt;8adbc92e17a791bcab856eb83522148cdd03f41b485cb10f4762d5c8a307a24e2a521d2936cb23ff&lt;BR /&gt;72c5a21872d099f374ecc05b73a0557a166f28ea1dfd1279694a0c159dd527e73c3552bcc01d009c&lt;BR /&gt;dd3ccf7eb2e2963fc732cc351ac2846134faa28f57f8d42e021516e9d19ce463576be4c628a59b80&lt;BR /&gt;a1e730c73da905ed934c253791060d8da20000000000000000000000000000000000000000000000&lt;BR /&gt;000000000000000&lt;BR /&gt;pc03:/W 284 $&lt;BR /&gt;&lt;BR /&gt;Enjoy, have FUN! H.Merijn</description>
      <pubDate>Sat, 19 Jul 2003 08:13:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023149#M811018</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2003-07-19T08:13:50Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023150#M811019</link>
      <description>You can use a tool on my site, &lt;A href="http://www.ronshardwebapps.com/numbers.asp," target="_blank"&gt;http://www.ronshardwebapps.com/numbers.asp,&lt;/A&gt; or if you want to convert very large numbers, just script out the manual remainder division.  You will find it to be very simple and can be done in a few lines of code in a Do Until...Loop type construct.</description>
      <pubDate>Sat, 23 Aug 2003 19:34:36 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023150#M811019</guid>
      <dc:creator>Ron_100</dc:creator>
      <dc:date>2003-08-23T19:34:36Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023151#M811020</link>
      <description>That's a nice little tool ron...thank's for posting.</description>
      <pubDate>Wed, 17 Sep 2003 21:06:01 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023151#M811020</guid>
      <dc:creator>Erik Hawkins</dc:creator>
      <dc:date>2003-09-17T21:06:01Z</dc:date>
    </item>
    <item>
      <title>Re: Large Decimal to Hex Conversion in C</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023152#M811021</link>
      <description>thanks, i think i messed up the link, it has a comma at the end of it, it should be &lt;A href="http://www.ronshardwebapps.com/numbers.asp" target="_blank"&gt;http://www.ronshardwebapps.com/numbers.asp&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Tue, 30 Sep 2003 13:39:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/large-decimal-to-hex-conversion-in-c/m-p/3023152#M811021</guid>
      <dc:creator>Ron_100</dc:creator>
      <dc:date>2003-09-30T13:39:28Z</dc:date>
    </item>
  </channel>
</rss>

