Bonjour,
J'ai un problème de conversion de valeur :
comment faire pour traduire par exemple cette valeur 737677597 (flottant hexa) en un entier flottant format 10 exposant -12
C'est urgent
Merci!
voici mon fichier .php3 qui me donne un résultat de type 10 exposant -31 : (737677597 => 1.952706e+31)
Hello,
I have a problem of conversion of value: how to make to translate for example this value 737677597 (floating hexa) into a floating entirety format 10 exhibitor -12 It is urgent
Thank you! here my php3 file which gives me to a result of the type 10 exhibitor -31: (737677597 = > 1.952706e+31)
<?
include("ref/Conversion.php3");
function sci($x, $d=-12)
{
$e=floor(log10($x));
$x*=pow(10,-$e);
$fmt=($d>=0)?".".$d:"";
$e=($e>=0)?"+".sprintf("%02d",$e):"-".sprintf("%02d",-$e);
return sprintf("%".$fmt."fe%s",$x,$e);
}
function FormatFloatExpTwelve($sChaineHexa)
{
$result = ConvertHexaFlottant($sChaineHexa);
if ($result!="")
{
$result = sci($result, $d);
}
return($result);
}
$val = '737677597';
$resultat = FormatFloatExpTwelve($val);
echo "$val => $resultat<br>";
?>