PHP log1p() 函数

PHP 教程 · 2019-01-27 06:44:15

实例

返回不同数的 log(1+number):

<?php
echo(log1p(2.7183) . "<br>");
echo(log1p(2) . "<br>");
echo(log1p(1) . "<br>");
echo(log1p(0));
?>

定义和用法

log1p() 函数返回 log(1+number),甚至当 number 的值接近零也能计算出准确结果。

语法

log1p(number);

参数 描述
number 必需。规定要处理的数。

技术细节

返回值: log(1+number)
返回类型: Float
PHP 版本: 4.1+
PHP 更新日志: PHP 5.3:log1p() 函数在所有平台上可用。

点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html

查看所有标签

Modeling the Internet and the Web

Modeling the Internet and the Web

Pierre Baldi、Paolo Frasconi、Padhraic Smyth / Wiley / 2003-7-7 / USD 115.00

Modeling the Internet and the Web covers the most important aspects of modeling the Web using a modern mathematical and probabilistic treatment. It focuses on the information and application layers, a......一起来看看 《Modeling the Internet and the Web》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

SHA 加密
SHA 加密

SHA 加密工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具