comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <niklas.holsti@tidorum.invalid>
Subject: Re: 64-bit unsigned integer?
Date: Thu, 1 Mar 2018 22:06:18 +0200
Date: 2018-03-01T22:06:18+02:00	[thread overview]
Message-ID: <ffr4prFas9oU1@mid.individual.net> (raw)
In-Reply-To: <p79j6u$1qn0$1@gioia.aioe.org>

On 18-03-01 21:10 , Dmitry A. Kazakov wrote:
> On 2018-03-01 19:15, Dan'l Miller wrote:
>> Dmitry A. Kazakov wrote:
>>> That replaces unpredictable penalty with a predictably prohibitive one.
>>
>> Why is it prohibitive?
>
> Because a bounded-length number object will have the worst case length,
> always. E.g. 100 x 64-bit words. Each elementary operation will take
> 1600 bytes from the stack and return 800 bytes back. This is certainly
> not for a small embedded/real-time target.
>
> But surely any range must be supported regardless the target hardware.
> Why invent a bicycle? Just allow
>
>    type Big is range -2**6399..2**6399-1;

I agree that such a built-in, non-library solution would be preferable 
from the programmer's point of view. But it could have consequences in 
other parts of the language which depend on the size of the largest 
integer type, and that could make it harder for a compiler to support 
the above form than to support a "bignum" library, bounded or unbounded.

-- 
Niklas Holsti
Tidorum Ltd
niklas holsti tidorum fi
       .      @       .


  parent reply	other threads:[~2018-03-01 20:06 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-25 12:30 64-bit unsigned integer? MM
2018-02-25 12:41 ` Dmitry A. Kazakov
2018-02-25 12:54   ` MM
2018-02-25 13:23     ` Dmitry A. Kazakov
2018-02-25 13:59       ` MM
2018-02-25 14:20         ` Dmitry A. Kazakov
2018-02-25 15:34           ` MM
2018-02-25 16:35     ` Jeffrey R. Carter
2018-02-25 16:36 ` Anh Vo
2018-02-25 17:31   ` MM
2018-02-26 23:19     ` Randy Brukardt
2018-02-26 23:33       ` MM
2018-02-28 10:17       ` Paul Rubin
2018-02-28 10:39         ` J-P. Rosen
2018-02-28 10:59           ` Dmitry A. Kazakov
2018-02-28 23:20         ` Randy Brukardt
2018-03-01  5:47           ` Paul Rubin
2018-03-01  8:16             ` Niklas Holsti
2018-03-01  8:35               ` Simon Wright
2018-03-01  8:47               ` Dmitry A. Kazakov
2018-03-01 18:15                 ` Dan'l Miller
2018-03-01 19:10                   ` Dmitry A. Kazakov
2018-03-01 19:22                     ` Dan'l Miller
2018-03-01 19:59                       ` Dmitry A. Kazakov
2018-03-01 20:32                         ` Dan'l Miller
2018-03-01 21:15                           ` Dmitry A. Kazakov
2018-03-01 22:23                             ` Randy Brukardt
2018-03-01 23:50                             ` Robert Eachus
2018-03-01 20:06                     ` Niklas Holsti [this message]
2018-03-01 22:04               ` Randy Brukardt
2018-02-26  6:45 ` Robert Eachus
2018-02-27 16:40   ` Dan'l Miller
2018-02-27 17:18     ` J-P. Rosen
2018-02-27 18:17       ` Dan'l Miller
2018-02-28  3:03         ` Robert Eachus
2018-02-28  6:41         ` J-P. Rosen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox