From owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org  Wed Dec 20 19:47:52 2017
Return-Path: <owner-sc22wg5+sc22wg5-dom8=www.open-std.org@open-std.org>
X-Original-To: sc22wg5-dom8
Delivered-To: sc22wg5-dom8@www.open-std.org
Received: by www.open-std.org (Postfix, from userid 521)
	id 208363587DA; Wed, 20 Dec 2017 19:47:52 +0100 (CET)
Delivered-To: sc22wg5@open-std.org
Received: from smtp-out-1.tiscali.co.uk (smtp-out-1.tiscali.co.uk [62.24.135.129])
	(using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits))
	(No client certificate requested)
	by www.open-std.org (Postfix) with ESMTP id 8DAC4356DC2
	for <sc22wg5@open-std.org>; Wed, 20 Dec 2017 19:47:49 +0100 (CET)
Received: from [192.168.1.10] ([212.139.82.74])
	by smtp.talktalk.net with SMTP
	id RjPAesKIP6Fz0RjPAeJ8BL; Wed, 20 Dec 2017 18:47:48 +0000
X-Originating-IP: [212.139.82.74]
To: WG5 <sc22wg5@open-std.org>
From: John Reid <John.Reid@stfc.ac.uk>
Subject: IEEE_INT
Message-ID: <a48a7516-4cf0-6cfc-766f-e6ca664c3b1a@stfc.ac.uk>
Date: Wed, 20 Dec 2017 18:47:46 +0000
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:49.0) Gecko/20100101
 Firefox/49.0 SeaMonkey/2.46
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
X-CMAE-Envelope: MS4wfOd7tjO+uUBWz5P9DRS8jGgNxFxh55VvjJgZSHVdRLbI2C+CvaQuQCLX5psDYetkgNETK1zvvHzbHLbHu6d0NfCssHyQasP78adNj4SmThkzDDhamk1B
 Y9fDVc10g+a+QPH8wUeoJcY+DrOGrM1ThfaZngxJf6GQLz+xkJ3tC6hQRcEoPiDZHZtfRB3WEvHRK9924OkRUEjKJC8iLGqp6u0=
Sender: owner-sc22wg5@open-std.org
Precedence: bulk

WG5,

Do we have a problem with IEEE_INT (see 17.11.11 in N2137)? It has the form

     IEEE_INT (A, ROUND [, KIND])

where ROUND is of type IEEE_ROUND_TYPE, so has one of the values

IEEE_NEAREST, IEEE_TO_ZERO, IEEE_UP, IEEE_DOWN, IEEE_AWAY and IEEE_OTHER

The value of A is converted to an integer according to the rounding mode 
specified by ROUND using either convertToInteger{round} or the 
convertToIntegerExact{round} operation.

My version of the IEEE standard is the FDIS and provides the functions
ConvertToIntegerTiesToAway,
ConvertToIntegerTiesToEven,
ConvertToIntegerTiesTowardNegative,
ConvertToIntegerTiesTowardPositive,
ConvertToIntegerTiesTowardZero,
and the corresponding Exact versions.

It is clear what happens with ROUND of value IEEE_TO_ZERO and IEEE_AWAY.

I suppose IEEE_UP and IEEE_DOWN give ConvertToIntegerTiesTowardPositive 
and ConvertToIntegerTiesTowardNegative, that is, towards positive and 
negative infinity, respectively. I think this needs to be said.

Does IEEE_OTHER give ConvertToIntegerTiesToEven?

What about IEEE_NEAREST?

Cheers,

John.
