rint function (continued)

root root@jacob.remcomp.fr
Tue Dec 15 23:17:00 GMT 1998

In gnu assembler language rint is:

	.globl	_rint
        fldl    4(%esp)	; load double argument in the fpu
        push    %eax	; make space in stack for result
        fistpl  (%esp)	; store the rounded value there as 32 bit int
        popl    %eax	; pop the result from the stack
        ret		; done

This takes the current rounding mode into account, as rint should. Using this
function makes your program pass all your tests.


Jacob Navia	Logiciels/Informatique
41 rue Maurice Ravel			Tel 01
93430 Villetaneuse 			Fax 01
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list