[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference turris::c_plus_plus

Title:C++
Notice:Read 1.* and use keywords (e.g. SHOW KEY/FULL KIT_CXX_VAX_VMS)
Moderator:DECCXX::AMARTIN
Created:Fri Nov 06 1987
Last Modified:Thu Jun 05 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:3604
Total number of notes:18242

3600.0. "Rint, ieee float inexact bankers rouding??" by KERNEL::PULLEY (Come! while living waters flow) Wed Jun 04 1997 13:36

Hi,

Here's a note direct from the customer.
Thanks for any pointers,
Steve.

We are using the DEC-C++ rint() call, and we have found that it seems
to perform "banker's rounding", rather than arithmetic rounding.
This is when the program is compiled with /FLOAT=IEEE/IEEE_MODE=INEXACT.

Under other compiler options, the rint() routine does arithmetical rounding.

We have been unable to find any documentation on this behaviour.

Please could you supply documentation on the rounding behaviour of rint() ?

Also, is it possible to control the rounding behaviour other than by changing
the /FLOAT mode - e.g. is there a logical or init routine or some such ?

Using DEC-C++ V5.3-005 on OpenVMS Alpha V6.2-1H2.

Thanks.
T.RTitleUserPersonal
Name
DateLines