Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
* nint() and nintf()
@ 1994-06-27  2:11 Salil Parikh
  1994-06-27 11:53 ` John Hascall
  0 siblings, 1 reply; 2+ messages in thread
From: Salil Parikh @ 1994-06-27  2:11 UTC (permalink / raw)



Is it just me, or are other people having difficulties with
nint() and nintf() ?

#include <stdio.h>
#include <stdlib.h>
#include <math.h>

void main (argc, argv)
int argc;
char *argv[];
{
    double num;

    num = atof(argv[1]);
    printf("nint(%f) = %f\n", num, nint(num));
    printf("nintf(%f) = %f\n", num, (float) nintf((float) num));
}



--output--

nint(5.700000) = 4503599627370496.000000
nintf(5.700000) = 41.000000



Thanks,
Salil




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1994-06-27 11:53 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1994-06-27  2:11 nint() and nintf() Salil Parikh
1994-06-27 11:53 ` John Hascall

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox