From: john@iastate.edu (John Hascall)
Subject: Re: nint() and nintf()
Date: 27 Jun 1994 11:53:07 GMT [thread overview]
Message-ID: <2umej3$9f4@news.iastate.edu> (raw)
In-Reply-To: 1994Jun27.021105.6007@ll.mit.edu
Salil Parikh <parikh@ll.mit.edu> wrote:
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));
%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
prev parent reply other threads:[~1994-06-27 11:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1994-06-27 2:11 nint() and nintf() Salil Parikh
1994-06-27 11:53 ` John Hascall [this message]
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox