jacob navia wrote:

>

> "How can I round a number to x decimal places" ?

>

> This question keeps appearing. I would propose the following

>
.... snip 75 or so lines ...

Why all this gyration? I found the following in the c standard:

7.12.9.6 The round functions

Synopsis

[#1]

#include <math.h>

double round(double x);

float roundf(float x);

long double roundl(long double x);

Description

[#2] The round functions round their argument to the nearest

integer value in floating-point format, rounding halfway

cases away from zero, regardless of the current rounding

direction.

Returns

[#3] The round functions return the rounded integer value.

--

[mail]: Chuck F (cbfalconer at maineline dot net)

[page]: <http://cbfalconer.home.att.net>

Try the download section.

--

Posted via a free Usenet account from

http://www.teranews.com