help-smalltalk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Help-smalltalk] Max/min value of any number class (maxVal/minVal) i


From: Garreau\, Alexandre
Subject: Re: [Help-smalltalk] Max/min value of any number class (maxVal/minVal) in gst?
Date: Wed, 17 Oct 2018 10:56:15 +0200
User-agent: Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu)

On 2018-10-17 at 08:37, Holger Freyther wrote:
> on a quick skim I have not noticed anything. In the C libgst there are
> two macros that might be of help to add a primitive. MAX_ST_INT and
> MIN_ST_INT. The values will be different on 32bit/64bit runtimes.
>
> But the question is how would you use it?

Yes, and how to make (if possible) equivalent messages minVal/maxVal
that would return that min and max value, but not only for SmallInteger,
as several other implementations seem to support it, and that should
increase portability while not breaking compatibility.

I guess for floats and bignums that would be ±inf (the other
implementation I saw doesn’t implement ieee754 ±inf, nor, but this time
I forgot to check, bignums).



reply via email to

[Prev in Thread] Current Thread [Next in Thread]