Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8356
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
|---|---|
| Newsgroups | comp.programming |
| Subject | Re: DEC64=="Bee's knees"? |
| Date | 2018-02-13 05:13 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <87bmgth3pe.fsf@bsb.me.uk> (permalink) |
| References | <10fe9ae4-ddae-4aef-8fbb-fd7ef8618070@googlegroups.com> |
luser droog <mijoryx@yahoo.com> writes: > I was watching some youtube videos about language design > and what the languages of the future should be like. And > one video strongly suggested that 'int' be dropped as a > basic type in new languages in favor of DEC64. > > DEC64 is a sort of hybrid floating-point/scaled-integer > type. (https://en.wikipedia.org/wiki/DEC64) It has a 56 bit > mantissa, and an 8 bit decimal exponent. The wiki pages says "[i]ts aim is to sidestep the rounding errors common to the widespread IEEE 754 format" but you can't really avoid rounding errors. You just get to choose which ones you have! > Since the exponent is decimal, the type can easily represent > 'normal' decimal numbers like .2 without the bizarre effects > that binary fp's repeating expansion produces. 1/3 can not be represented, for example. That might surprise some people more than 0.2 not being representable in conventional binary FP. It rather depends on the problem domain. > What problems might be encountered by (users of) a new > language offering dec64 as its basic numeric type and > eschewing 'int'? That depends on the problem domain too, but like JavaScript does, you'd probably need to provide a set of integer-like operations (integer division, mod, bit-wise operations) and so on because most programmers would expect them. Also worth noting is that there is already a relatively widely supported IEEE decimal floating-point standard. It would have to compete with that. -- Ben.
Back to comp.programming | Previous | Next — Previous in thread | Find similar | Unroll thread
DEC64=="Bee's knees"? luser droog <mijoryx@yahoo.com> - 2018-02-12 19:12 -0800 Re: DEC64=="Bee's knees"? Ben Bacarisse <ben.usenet@bsb.me.uk> - 2018-02-13 05:13 +0000
csiph-web