PHP 科学计数 转 Double

本文转自:https://stackoverflow.com/questions/4576927/convert-a-string-containing-a-number-in-scientific-notation-to-a-double-in-php

 

//eg $sciNotation = 2.3649E-8
$number = number_format($sciNotation, 10); //Use $dec_point large enough
echo rtrim($number, '0'); //Remove trailing zeros

 

posted on 2018-12-11 16:21  freeliver54  阅读(151)  评论(0编辑  收藏  举报

导航