Deutsch   English   Français   Italiano  
<ttdvv3$4ef$2@shakotay.alphanet.ch>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!newsreader4.netcologne.de!news.netcologne.de!news.imp.ch!news.alphanet.ch!alphanet.ch!.POSTED!not-for-mail
From: Marc SCHAEFER <schaefer@alphanet.ch>
Newsgroups: fr.comp.lang.perl
Subject: Re: Arrondir un nombre
Supersedes: <ttdvub$4ef$1@shakotay.alphanet.ch>
Date: Sat, 25 Feb 2023 21:52:35 -0000 (UTC)
Organization: Posted through news.alphanet.ch
Message-ID: <ttdvv3$4ef$2@shakotay.alphanet.ch>
References: <63fa4ea3$0$3076$426a74cc@news.free.fr>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 25 Feb 2023 21:52:35 -0000 (UTC)
Injection-Info: shakotay.alphanet.ch; posting-account="schaefer";
	logging-data="4559"; mail-complaints-to="usenet@alphanet.ch"; posting-host="634ce6c9682d817d72f6177875e2bb4f.nnrp.alphanet.ch"
User-Agent: tin/2.4.3-20181224 ("Glen Mhor") (UNIX) (Linux/4.19.0-23-amd64 (x86_64))
Cancel-Key: sha256:Xts+v+k3PUAQq+sOohgMMe3YFljA7Onuaguz2QfAYhY=
Cancel-Lock: sha256:O9YUUSxhGY0OxRyPVEQl4b5yjcQtVAe6XueCjsZ3ViA= sha256:UsnaieMMloVJliJLOm0rbPjSgQkMr1A9iYrcG/W0AY4=
Bytes: 1720
Lines: 16

kurtz le pirate <kurtzlepirate@free.fr> wrote:
> Comme j'ai de gros fichiers à traiter (100/120Mo de nombres), je ne me
> demande si sprintf est suffisament rapide.

Probablement, sinon il y a aussi le module POSIX avec les fonctions du C
ceil, floor, etc.

> Des idées ?

Ou des magouilles comme int(nombre * 100) / 100

Ou encore int($num + 0.99);

-- 
Attention: limitez le nombre de lignes de citation à l'essentiel, sinon
je ne verrai pas votre réponse. Et si vous écrivez souvent des bobards,
je ne vous lirai plus et je recommanderai (NoCeM) de ne plus vous lire.