Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.programming > #8356
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.programming |
| Subject | Re: DEC64=="Bee's knees"? |
| Date | Tue, 13 Feb 2018 05:13:33 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 38 |
| Message-ID | <87bmgth3pe.fsf@bsb.me.uk> (permalink) |
| References | <10fe9ae4-ddae-4aef-8fbb-fd7ef8618070@googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain |
| Injection-Info | reader02.eternal-september.org; posting-host="5cfcea0e451d5533d7b3db66b1a67cb2"; logging-data="11853"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19KplttPLZOLwGJkrJB1a5zdzOEN2Xh2wc=" |
| Cancel-Lock | sha1:hxlSw1WxZpuYWtoJ8CT9xaVKudQ= sha1:QfBes8/Rqp7ToxyMmvE8UjL+T8w= |
| X-BSB-Auth | 1.90a28b8f606201fbfe7b.20180213051333GMT.87bmgth3pe.fsf@bsb.me.uk |
| Xref | csiph.com comp.programming:8356 |
Show key headers only | View raw
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