November 04, 2015
On Wednesday, 4 November 2015 at 08:18:00 UTC, Ali Çehreli wrote:
> Thanks. I've noticed that the parameter of the subtraction functions should be named 'underflow', no?

Integer math cannot underflow, unless you define division to be equivalent to division over reals.

overflow => higher/lower than max/min

underflow => wrongly rounded to zero  (smaller than epsilon)

Underflow can lead to unexpected division by zero errors in float expressions.
November 04, 2015
On 11/04/2015 02:01 AM, Ola Fosheim Grøstad wrote:
> On Wednesday, 4 November 2015 at 08:18:00 UTC, Ali Çehreli wrote:
>> Thanks. I've noticed that the parameter of the subtraction functions
>> should be named 'underflow', no?
>
> Integer math cannot underflow, unless you define division to be
> equivalent to division over reals.
>
> overflow => higher/lower than max/min
>
> underflow => wrongly rounded to zero  (smaller than epsilon)
>
> Underflow can lead to unexpected division by zero errors in float
> expressions.

Thanks. It looks like I've been making stuff up on this page: :(

  http://ddili.org/ders/d.en/arithmetic.html

Ali

November 04, 2015
On Wednesday, 4 November 2015 at 10:06:47 UTC, Ali Çehreli wrote:
> Thanks. It looks like I've been making stuff up on this page: :(
>
>   http://ddili.org/ders/d.en/arithmetic.html

It's a common source for confusion, the word "underflow" is a bit misleading. Maybe better to use the term "zero-flushed".

1 2
Next ›   Last »