Wikipedia:Reference desk/Archives/Mathematics/2017 August 6

Mathematics desk
< August 5 << Jul | August | Sep >> August 7 >
Welcome to the Wikipedia Mathematics Reference Desk Archives
The page you are currently viewing is a transcluded archive page. While you can leave answers for any questions shown below, please ask new questions on one of the current reference desk pages.


August 6 edit

Is there any advantage to a floating point number system for computer that is other than binary or base ten (BCD) edit

Floating point number system on computers are binary that is base two. The only other floating point number system is BCD or based ten.

But binary floating point cannot represent 1/10 accurately while both binary and BCD/base ten cannot represent 1/3 accurately.

So why not have a floating point number system using base 720720 which has many many divisors because it is Superior highly composite number? 96.66.16.169 (talk) 16:00, 6 August 2017 (UTC)[reply]

It is not efficient to perform computations and store information with such a huge base. At this point, you might as well store the rational number exactly (in the form   representing  ).--Jasper Deng (talk) 18:14, 6 August 2017 (UTC)[reply]
Many calculator programs do store results as rationals. This avoids rounding error for simple calculations such as 1.01 * 100 - 101 not being 0. It does not remove rounding errors for more complex operations though, e.g. (1/(√5 - 2) - 2)2 - 5 not 0.
It should be noted that BCD is not exactly the same a decimal; it uses two digits like binary but each group of four represents 1 decimal digit. Computers can easily use octal and hexadecimal using a similar scheme. You could have system that uses a group of 20 binary digits to store 1 base-720720 digit, but you'd still run into rounding errors when, say, the denomitor is 17. --RDBury (talk) 20:10, 6 August 2017 (UTC)[reply]
It is more efficient to use a power of 2. Bubba73 You talkin' to me? 23:19, 6 August 2017 (UTC)[reply]
Densely packed decimal used in IEEE decimal floating point uses base 1000 to hold the digits which is almost as efficient - efficiency isn't a major consideration for that. Dmcq (talk) 09:18, 9 August 2017 (UTC)[reply]
A floating point representation on a ternary computer might have some advantages. For example, repeated rounding would be stable (i.e. rounding once to the final precision produces the same result as with any number of intermediate-precision rounding steps); no tie-breaking rule is needed from a number that is already represented using a finite number of ternary digits. This stability does not extend to common scenarios though: rounding numbers before addition can still lead to a different result than rounding the result. —Quondum 02:55, 13 August 2017 (UTC)[reply]