| QUOTE (calvin_42 @ 01 Mar 2005 à 22:44) |
| c'est pas sqrt(int) d'après mes souvenirs, c'est un double Fais un man math.h |
| QUOTE (lolocse @ 03 Mar 2005 à 00:22) |
Ce qu'il veut te dire c'est que la racine carré du type integer ne peut pas se faire , à la place ca doit être un float (accepte deux points derrière la decimale) ou un double (plus que deux points derrière la decimale) , compris ???? |
| QUOTE (Garulfo @ 03 Mar 2005 à 07:27) |
| 1) deux points ?? Un float a 6 décimal de précision sur Win32 et sur Linux par exemple. |
| QUOTE (lolocse @ 03 Mar 2005 à 01:39) | ||
T'es sur de ce que t'avances , c'est vrai que le float peut aller jusqu'à 6 decimales de precision mais j'ai pris exemple sur les exercises que j'avais fait il y a maintenant 2 ans . Mille xcuses d'avoir induis en erreur les apprentis programmeurs . ![]() |
| CODE |
| #include <cfloat> #include <iostream> using namespace std; int main () { cout << "FLT_RADIX: " << FLT_RADIX << endl; /* Number of base-FLT_RADIX digits in the significand, p. */ cout << "FLT_MANT_DIG: " << FLT_MANT_DIG << endl; /* Number of decimal digits, q, such that any floating-point number with q decimal digits can be rounded into a floating-point number with p radix b digits and back again without change to the q decimal digits, p * log10(b) if b is a power of 10 floor((p - 1) * log10(b)) otherwise */ cout << "FLT_DIG: " << FLT_DIG << endl; /* Minimum int x such that FLT_RADIX**(x-1) is a normalized float, emin */ cout << "FLT_MIN_EXP: " << FLT_MIN_EXP << endl; /* Minimum negative integer such that 10 raised to that power is in the range of normalized floating-point numbers, ceil(log10(b) * (emin - 1)) */ cout << "FLT_MIN_10_EXP: " << FLT_MIN_10_EXP << endl; /* Maximum int x such that FLT_RADIX**(x-1) is a representable float, emax. */ cout << "FLT_MAX_EXP: " << FLT_MAX_EXP << endl; /* Maximum integer such that 10 raised to that power is in the range of representable finite floating-point numbers, floor(log10((1 - b**-p) * b**emax)) */ cout << "FLT_MAX_10_EXP: " << FLT_MAX_10_EXP << endl; /* Maximum representable finite floating-point number, (1 - b**-p) * b**emax */ cout << "FLT_MAX: " << FLT_MAX << endl; /* The difference between 1 and the least value greater than 1 that is representable in the given floating point type, b**1-p. */ cout << "FLT_EPSILON: " << FLT_EPSILON << endl; /* Minimum normalized positive floating-point number, b**(emin - 1). */ cout << "FLT_MIN: " << FLT_MIN << endl; return 0; } |
Bon ok je me la joue new age, mais franchement c'est désagréable à force.
| QUOTE (Billie Jean2 @ 22 Mar 2005 à 15:25) |
| SVP SVP........Comment je peux programmer en c++ avec linux (je suis sous linux mandrake 10.1) Quels logiciel choisir ?Ou letelecharger ? je cherche depuis 2 jours etje ne trouve rien!!! Merci. |
| QUOTE (Garulfo @ 24 Mar 2005 à 05:54) | ||
D'abord tu vas prendre ton mal en patience... Ensuite, tout est prevu sous Linux pour developper. Tu as le compilateur le debugger etc. Rien n'est a telecharger. Tu as des environnements de developpement integre comme KDevelop ou Anjuta qui sont probablement disponible. |

elle ne s'appelerais pas kermite par hazard
| QUOTE (Visu@lSt@tion @ 24 Mar 2005 à 01:13) |
| [...] Ouaip Garulfo a raison ![]() au fait jolie la grebouille elle ne s'appelerais pas kermite par hazard |
Copyright © 2004-2008 Tigersun - Tous droits réservés - Powered By IP.Board © 2009 IPS, Inc.