📄 vbs152.htm
字号:
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN"><HTML>
<HEAD><TITLE>Log Function</TITLE>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso8859-1">
<META NAME="MS.LOCALE" CONTENT="EN-US">
<META NAME="PRODUCT" CONTENT="Visual Basic Scripting Edition">
<META NAME="TECHNOLOGY" CONTENT="SCRIPTING">
<META NAME="CATEGORY" CONTENT="Language Reference">
<META NAME="Keywords" CONTENT="Log function,logarithms,e (constant),math functions,base-n logarithms,natural logarithms"><META NAME="Description" CONTENT="Log Function"></HEAD>
<BODY BGCOLOR=FFFFFF LINK=#0033CC>
<!--TOOLBAR_START-->
<!--TOOLBAR_EXEMPT-->
<!--TOOLBAR_END-->
<FONT FACE="Verdana, Arial, Helvetica" SIZE=2>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0 WIDTH=100%><TR VALIGN=TOP><TD WIDTH=360>
<FONT SIZE=1 COLOR=#660033>Microsoft® Visual Basic® Scripting Edition</FONT><BR>
<FONT SIZE=5 COLOR=#660033><B>Log Function</B></FONT>
</TD>
<TD ALIGN=RIGHT>
<FONT SIZE=2> <A HREF="vbstoc.htm">Language Reference</A> <BR>
<A HREF="vbs16.htm">Version 1</A> <P></FONT>
</TD></TR>
</TABLE>
<FONT SIZE=2><P>
<A HREF="vbs153.htm">See Also</A></FONT>
<HR NOSHADE SIZE=1>
<H5>Description</H5>
<BLOCKQUOTE>Returns the natural logarithm of a number.</BLOCKQUOTE>
<H5>Syntax</H5>
<BLOCKQUOTE><b>Log(</b><i>number</i><b>)</b><p>
The <i>number</i> argument can be any valid
<A HREF="vbs0.htm#defNumericExpression">numeric expression</A> greater than 0.</BLOCKQUOTE>
<H5>Remarks</H5>
<BLOCKQUOTE>The natural logarithm is the logarithm to the base <i>e</i>. The constant <i>e</i> is approximately 2.718282.<P>
You can calculate base-<i>n</i> logarithms for any number <i>x</i> by dividing the natural logarithm of <i>x</i> by the natural logarithm of <i>n </i>as follows:<P>
<BLOCKQUOTE><PRE><FONT FACE="Courier New" SIZE=3>Log<i>n(x)</i> = Log(<i>x</i>) / Log(<i>n</i>)
</FONT></PRE></BLOCKQUOTE>
The following example illustrates a custom <b>Function</b> that calculates base-10 logarithms:<P>
<BLOCKQUOTE><PRE><FONT FACE="Courier New" SIZE=3>Function Log10(X)
Log10 = Log(X) / Log(10)
End Function</FONT></PRE>
</BLOCKQUOTE>
</BLOCKQUOTE>
<hr noshade size=1>
<p align=center><em><a href="../../common/colegal.htm">© 1997 by Microsoft Corporation. All rights reserved.</a></em></p>
</FONT></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -