From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fee84,50c9e2a956dd6aa1 X-Google-Attributes: gidfee84,public X-Google-ArrivalTime: 1994-06-27 05:18:31 PST Path: bga.com!news.sprintlink.net!news.onramp.net!convex!cs.utexas.edu!howland.reston.ans.net!sol.ctr.columbia.edu!newsxfer.itd.umich.edu!newsrelay.iastate.edu!news.iastate.edu!john From: john@iastate.edu (John Hascall) Newsgroups: comp.unix.osf.osf1 Subject: Re: nint() and nintf() Date: 27 Jun 1994 11:53:07 GMT Organization: Iowa State University, Ames, Iowa (USA) Message-ID: <2umej3$9f4@news.iastate.edu> References: <1994Jun27.021105.6007@ll.mit.edu> NNTP-Posting-Host: pooh.cc.iastate.edu Salil Parikh wrote: Is it just me, or are other people having difficulties with nint() and nintf() ? #include #include #include void main (argc, argv) int argc; char *argv[]; { double num; num = atof(argv[1]); printf("nint(%f) = %f\n", num, nint(num)); %lf %lf printf("nintf(%f) = %f\n", num, (float) nintf((float) num)); %lf } Doubles use "%lf" ... John -- John Hascall ``An ill-chosen word is the fool's messenger.'' Systems Software Engineer Project Vincent Iowa State University Computation Center + Ames, IA 50011 + 515/294-9551