本文整理汇总了VB.NET中System.Math.Log10方法的典型用法代码示例。如果您正苦于以下问题:VB.NET Math.Log10方法的具体用法?VB.NET Math.Log10怎么用?VB.NET Math.Log10使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Math
的用法示例。
在下文中一共展示了Math.Log10方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Example
Module Example
Public Sub Main()
Dim numbers() As Double = {-1, 0, .105, .5, .798, 1, 4, 6.9, 10, 50, _
100, 500, 1000, Double.MaxValue}
For Each number As Double In numbers
Console.WriteLine("The base 10 log of {0} is {1}.", _
number, Math.Log10(number))
Next
End Sub
End Module
输出:
The base 10 log of -1 is NaN. The base 10 log of 0 is -Infinity. The base 10 log of 0.105 is -0.978810700930062. The base 10 log of 0.5 is -0.301029995663981. The base 10 log of 0.798 is -0.0979971086492706. The base 10 log of 1 is 0. The base 10 log of 4 is 0.602059991327962. The base 10 log of 6.9 is 0.838849090737255. The base 10 log of 10 is 1. The base 10 log of 50 is 1.69897000433602. The base 10 log of 100 is 2. The base 10 log of 500 is 2.69897000433602. The base 10 log of 1000 is 3. The base 10 log of 1.79769313486232E+308 is 308.254715559917.