🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: chile.comp.programacion
Article #3588

Re: funcion round en C

#3588
From: joe
Date: Thu, 09 Dec 2004 23:37
35 lines
1722 bytes
araguayo@dcc.uchile.cl wrote:
> joe <joe@anonymous.nu> wrote:
> : Hola
> 
> : Tengo el siguiente problema con la funcion round.
> : El programa.

[...]

> Tu programa me funciona bien en un Debian y en un Gentoo. 
> 
> ias-linux:~# gcc --version
> gcc (GCC) 3.3.5 (Debian 1:3.3.5-2)
> 
> Podria ser la version pero me da flojera actualizarla en este momento :)

capaz que sea eso, solo lo probe en Debian Sid.

> Por alguna razon tu "math.h" no prototipa la funcion double().. sepa moya
> porque.. puedes agregar algo del estilo en tu codigo antes del main:
> 
> double round(double);

Exacto, agregando eso funciona. Gracias.

> Asi el mensaje desaparece... en el printf poner "%lf" en vez de "%f"..
> aunque aquello suele ser intracedente.

en printf(3) dice que %f es para "double", pero tienes razon, es
intracendente.

Saludos!

-- 
joe
Technical Details
Message-ID: <cpank5$vlm$2@news1.nivel5.cl>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail
References: <cpa338$p9o$1@news1.nivel5.cl> <cpaf99$l8e$1@helcaraxe.dcc.uchile.cl>

Show Full Headers
Complete Article Headers
X-Google-Thread: 1593cb,45a58cbd8a22477a
X-Google-Attributes: gid1593cb,public
X-Google-Language: SPANISH,ASCII-7-bit
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news.glorb.com!nntp-server.pubsub.com!news1.nivel5.cl!not-for-mail
From: joe <joe@anonymous.nu>
Newsgroups: chile.comp.programacion
Subject: Re: funcion round en C
Date: Thu, 9 Dec 2004 23:37:43 +0000 (UTC)
Organization: Varios
Lines: 35
Message-ID: <cpank5$vlm$2@news1.nivel5.cl>
References: <cpa338$p9o$1@news1.nivel5.cl> <cpaf99$l8e$1@helcaraxe.dcc.uchile.cl>
NNTP-Posting-Host: cm-vina3-151-114.cm.vtr.net
X-Trace: news1.nivel5.cl 1102635463 32438 200.104.151.114 (9 Dec 2004 23:37:43 GMT)
X-Complaints-To: news@news1.nivel5.cl
NNTP-Posting-Date: Thu, 9 Dec 2004 23:37:43 +0000 (UTC)
User-Agent: tin/1.7.6-20040906 ("Baleshare") (UNIX) (Linux/2.6.9-1-k7 (i686))