UINT64 [英] uint64

查看:89
本文介绍了UINT64的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我不知道要问哪个小组,所以我将从这里开始。有没有人

有一个很好的方法可以将19位数字压缩到最小的

可能的数字?我有一个有一个uint64 19位数字的delima,我需要b $ b需要适应10位数的空间。我已经尝试过使用字节比较和一些其他几个,但它让我减少到大约18位数。任何帮助都非常值得赞赏。


谢谢;

bob;

I have no idea what group to ask this in so i will start here. Does anyone
have a good way of compressing a 19 digit number down to the smallest
possible number? I have a delima of having a uint64 19 digit number that i
need to fit into a 10 digit space. I have tried using byte comparisons and a
few others but it gets me down to about 18 digits. Any help is greatly
appreciated.

Thanks;
bob;

推荐答案

鲍勃艾伦写道:
Bob Allen wrote:
我不知道要问这个群体,所以我将从这里开始。有没有人有一个很好的方法将19位数字压缩到最小的可能数字?我有一个uint64 19位数字,我需要适应10位数的空间。我尝试过使用字节比较和其他几个,但它让我减少到大约18位数。任何帮助都非常感激。
I have no idea what group to ask this in so i will start here. Does anyone
have a good way of compressing a 19 digit number down to the smallest
possible number? I have a delima of having a uint64 19 digit number that i
need to fit into a 10 digit space. I have tried using byte comparisons and a
few others but it gets me down to about 18 digits. Any help is greatly
appreciated.




使用一个?那将丢弃最不重要的位,但是会将b
存储在幅度和最重要的位上。

-


< HTTP://www.midnightbeach.com>承包,咨询,培训

..NET 2.0 for Delphi Programmers< http://www.midnightbeach.com/.net>

生产 - 到6月份在商店



Use a single? That''ll discard the least significant bits, but will
store the magnitude and most significant bits.
--

<http://www.midnightbeach.com> Contracting, consulting, training
..NET 2.0 for Delphi Programmers <http://www.midnightbeach.com/.net>
In production - in stores by June


Bob Allen< bo*@greatsummits.com>写道:
Bob Allen <bo*@greatsummits.com> wrote:
[...]我有一个两难的问题,即我需要将一个uint64 19位数字放入10位数的空间。
[...] I have a dilemma of having a uint64 19 digit
number that I need to fit into a 10 digit space.




没办法。


如果你想知道原因,请尝试压缩。



No way.

Try a ng on compression if you want to know why.


Bob Allen< bo*@greatsummits.com>写道:
Bob Allen <bo*@greatsummits.com> wrote:
我不知道要问哪个组,所以我将从这里开始。有没有人有一个很好的方法将19位数字压缩到最小的可能数字?我有一个uint64 19位数字,我需要适应10位数的空间。我尝试过使用字节比较和其他几个,但它让我减少到大约18位数。任何帮助都非常值得赞赏。
I have no idea what group to ask this in so i will start here. Does anyone
have a good way of compressing a 19 digit number down to the smallest
possible number? I have a delima of having a uint64 19 digit number that i
need to fit into a 10 digit space. I have tried using byte comparisons and a
few others but it gets me down to about 18 digits. Any help is greatly
appreciated.




由于鸽子原则,你不能这样做。你不能得到

到18位数。


考虑有多少19位数字。

然后考虑有多少18位数字。

你怎么可能把每个不同的19位数字代表

不同的18位数字当有更多19位数字?


-

Jon Skeet - < sk *** @ pobox.com>
http://www.pobox.com/~skeet 博客: http://www.msmvps.com/jon.skeet

如果回复对于小组,请不要给我发邮件



You can''t do it, due to the pigeon-hole principle. You can''t get it
down to 18 digits, either.

Consider how many 19-digit numbers there are.
Then consider how many 18-digit numbers there are.
How could you possibly represent each different 19-digit number as a
different 18-digit number when there are more 19-digit numbers?

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too


这篇关于UINT64的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆