c# 自然对数怎么取?

时间:2021-10-11 18:34:14
我想取1234的自然对数该怎么写?math方法里面也没有。

10 个解决方案

#1


Math.Exp()方法

#2


引用 1 楼 at_gaj 的回复:
Math.Exp()方法

那是e的多少次幂啊,我要的是对数

#3


Math.Log

#4


引用 3 楼 wuyazhe 的回复:
Math.Log

log()那个参数e该怎么写?

#5


Math.Log(Math.E, 1234);

#6


引用 5 楼 gxingmin 的回复:
C# code
Math.Log(Math.E, 1234);

哦,谢谢了哈

#7


貌似写反了
Math.Log(1234,Math.E);

#8


哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

#9


引用 8 楼 wuyazhe 的回复:
哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

public const double E
    Member of System.Math

Summary:
Represents the natural logarithmic base, specified by the constant, e.

#10


引用 9 楼 cppfaq 的回复:
引用 8 楼 wuyazhe 的回复:

哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

public const double E
  Member of System.Math

Summary:
Represents the natural logarithmic base, specif……


sdf

#1


Math.Exp()方法

#2


引用 1 楼 at_gaj 的回复:
Math.Exp()方法

那是e的多少次幂啊,我要的是对数

#3


Math.Log

#4


引用 3 楼 wuyazhe 的回复:
Math.Log

log()那个参数e该怎么写?

#5


Math.Log(Math.E, 1234);

#6


引用 5 楼 gxingmin 的回复:
C# code
Math.Log(Math.E, 1234);

哦,谢谢了哈

#7


貌似写反了
Math.Log(1234,Math.E);

#8


哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

#9


引用 8 楼 wuyazhe 的回复:
哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

public const double E
    Member of System.Math

Summary:
Represents the natural logarithmic base, specified by the constant, e.

#10


引用 9 楼 cppfaq 的回复:
引用 8 楼 wuyazhe 的回复:

哪有e?
double n = Math.Log(8, 2);
Console.WriteLine(n.ToString());

public const double E
  Member of System.Math

Summary:
Represents the natural logarithmic base, specif……


sdf