Forum |  HardWare.fr | News | Articles | PC | S'identifier | S'inscrire | Shop Recherche
2433 connectés 

  FORUM HardWare.fr
  Programmation
  Java

  Probleme mathématiqe

 


 Mot :   Pseudo :  
 
Bas de page
Auteur Sujet :

Probleme mathématiqe

n°385692
ibebel
Posté le 07-05-2003 à 12:04:29  profilanswer
 

Voila j'effectue les operations suivantes pour arrondir un nombre à 10^-5 :
 
double a=0.000427;
a *= 100000;
a = (int)(a+.5);
a /= 100000;
 
Lorsque je decide d'afficher le resultat apparait alors : 4.30E-04
 
Or j voudrait que s'affiche 0.00043
 
Merci beaucoup.

mood
Publicité
Posté le 07-05-2003 à 12:04:29  profilanswer
 

n°385698
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 07-05-2003 à 12:06:00  profilanswer
 

java.text.NumberFormat et ses dérivés.


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°385702
darklord
You're welcome
Posté le 07-05-2003 à 12:07:58  profilanswer
 

Taiche a écrit :

java.text.NumberFormat et ses dérivés.


 
quel talent! [:prosterne]


---------------
Just because you feel good does not make you right
n°385710
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 07-05-2003 à 12:10:40  profilanswer
 

DarkLord a écrit :


quel talent! [:prosterne]


Ta gueule :o
[:ban]


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.
n°385714
darklord
You're welcome
Posté le 07-05-2003 à 12:12:29  profilanswer
 


 
je m'auto prosterne [:prosterne]


---------------
Just because you feel good does not make you right
n°385718
Taiche
(╯°□°)╯︵ ┻━┻
Posté le 07-05-2003 à 12:13:40  profilanswer
 

DarkLord a écrit :


je m'auto prosterne [:prosterne]


Arrête ou j'me remets à écrire [:prosterne]Maître[:prosterne2] partout :o


---------------
Everyone thinks of changing the world, but no one thinks of changing himself  |  It is the peculiar quality of a fool to perceive the faults of others and to forget his own  |  Early clumsiness is not a verdict, it’s an essential ingredient.

Aller à :
Ajouter une réponse
  FORUM HardWare.fr
  Programmation
  Java

  Probleme mathématiqe

 

Sujets relatifs
[PHP]Probleme de creation de cession/cookieProbleme avec fseek
petit problème d'externalisation de requete en javaprobleme avec FPDF
Problème vec la fonction mail....problème de droit avec Apache et Tomcat
probleme applet java (menu interractif) sous netscapeProbleme de memoire
Problème avec un questionnaireprobleme Apache/PHP
Plus de sujets relatifs à : Probleme mathématiqe


Copyright © 1997-2022 Hardware.fr SARL (Signaler un contenu illicite / Données personnelles) / Groupe LDLC / Shop HFR