par
@rthur » 26 août 2015, 11:32
Bonjour,
Voici un point d'info importante sur la précision des nombres décimaux :
https://secure.php.net/manual/fr/langua ... .float.php
Et sinon pour répondre à ta question, tu peux utiliser number_format()
<?php
class Mathsup {
const nombreDor=1.618033988749894;
}
echo number_format(Mathsup::nombreDor, 15);
// 1.618033988749894
Bonjour,
Voici un point d'info importante sur la précision des nombres décimaux : https://secure.php.net/manual/fr/language.types.float.php
Et sinon pour répondre à ta question, tu peux utiliser number_format()
[php]<?php
class Mathsup {
const nombreDor=1.618033988749894;
}
echo number_format(Mathsup::nombreDor, 15);
// 1.618033988749894[/php]