BCD格式是否比浮点格式更多或更少的内存效率? [英] Is BCD format is more or less memory efficient than the floating point format?

查看:57
本文介绍了BCD格式是否比浮点格式更多或更少的内存效率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

BCD格式是否比浮点格式更多或更少的内存效率?

Is BCD format is more or less memory efficient than the floating point format?

推荐答案

问题主要是不正确的,因为这两种表示不仅仅是不同,它们代表完全不同的概念。在数学中,整数和实数是非常不同的对象;他们的区别在于数学的难度;本质上,一般情况下的实数代表无限量的信息。在诸如计算机的有限状态机的领域中,没有无限大小的对象,是的,如果实数,浮点类型与基数有根本不同的近似模型表示整数或固定精度数的类型(固定精度数,实质上与整数没有实际差别)。 BCD用于表示整数或固定精度数。这一切都使得比较完全无效。如果两个抽象或设计解决了完全不同的问题,效率的比较根本就没有意义。



请参阅:

http://en.wikipedia.org/wiki/Binary-coded_decimal [ ^ ],

http://en.wikipedia.org/wiki/Floating-point [ ^ ]。



简而言之:BCD的时间已经过去了...... />


-SA
The question is principally incorrect, because these two kind of representations are not only different, they represent completely different concepts. In mathematics, integer numbers and real numbers are very different objects; and their difference lie in the very hard of mathematics; in essence, a general-case real number represents infinite amount of information. In the domain of finite-state machines such as computers, there are no infinite-size objects, and yes, the approximate models if real numbers, floating-point types, are fundamentally different from cardinal types representing integer or fixed-precision numbers (fixed-precision number, in essence is not really different from integer). And BCD is used to represent integer or fixed-precision number. This all makes comparison totally invalid. If two abstractions or designs solve completely difference problems, comparison of efficiencies makes no sense at all.

Please see:
http://en.wikipedia.org/wiki/Binary-coded_decimal[^],
http://en.wikipedia.org/wiki/Floating-point[^].

And, in brief: the time of BCD is pretty much over…

—SA


这篇关于BCD格式是否比浮点格式更多或更少的内存效率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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