🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.c
Article #309673

Re: Int 256 bitowy jako strumień bitów (32 bajtów)

#309673
From: Borneq
Date: Mon, 30 Apr 2018 17:00
13 lines
1587 bytes
W dniu 30.04.2018 o 18:59, Borneq pisze:
> W Boost jest
> boost::multiprecision::cpp_int number
> co pozwala na dowolną precyzję, na razie planuję trzymać je w bazie 
> HBase jako ciąg hex co mi 2-krotnie zajmuje miejsce a poza tym co 
> jeszcze gorsze, konwersja hex<->liczba trwa długo
> A chcę zapisać tę liczbę binarnie.
> Jakiej liczby użyć, by precyzja była stała 256 bitów i abym mógł 
> rzutować to jako ciąg 32 bajtów? By były operacje , plus, minus, razy, 
> podzielić, nic specjalnie inne nie trzeba.

Może być w Boost, czy cpp_int da tak się ustawić na stałe 256 bitów? czy 
potem da się rzutować "z" i "na"?
Technical Details
Message-ID: <pc7i2p$as1$2@node2.news.atman.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
References: <pc7i0q$as1$1@node2.news.atman.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.icm.edu.pl!newsfeed2.atman.pl!newsfeed.atman.pl!.POSTED!not-for-mail
From: Borneq <borneq@antyspam.hidden.pl>
Newsgroups: pl.comp.lang.c
Subject: Re: Int 256 bitowy jako strumień bitów (32
 bajtów)
Date: Mon, 30 Apr 2018 19:00:09 +0200
Organization: ATMAN - ATM S.A.
Lines: 13
Message-ID: <pc7i2p$as1$2@node2.news.atman.pl>
References: <pc7i0q$as1$1@node2.news.atman.pl>
NNTP-Posting-Host: public-gprs360335.centertel.pl
Mime-Version: 1.0
X-Trace: node2.news.atman.pl 1525107609 11137 37.47.38.208 (30 Apr 2018 17:00:09 GMT)
X-Complaints-To: usenet@atman.pl
NNTP-Posting-Date: Mon, 30 Apr 2018 17:00:09 +0000 (UTC)
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0
In-Reply-To: <pc7i0q$as1$1@node2.news.atman.pl>
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit