dongyu4455 2013-01-27 18:58
浏览 20
已采纳

不回显全字符串

I have google coordinates that I have to change, but when I echo them, for example,

echo (string)28.9871692657471;

I get the result of

28.987169265747

" 1 " at the end disappears

echo (string) 28.9875984191895

" 5 " at the end disappears

I tried directly echoing it, without casting, but nothing has changed, the thing I want to do is to have this basic operation,

28.9875984191895 + 0.0000000000001 = 28.9875984191896

Is there something I am missing ? because I could not find anything about that when I search on the internet

  • 写回答

3条回答 默认 最新

  • duanmeng3476 2013-01-27 19:58
    关注

    Give this a try

    echo bcadd("28.9875984191895", "0.0000000000001", 13);
    

    The last parameter is the number of decimals to display

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?