请问 le10 代表什么含义?以什么为底的对数?

中年危机的木子 2019-10-16 10:03:50
各位同学,大家好!
请问 le10 代表什么含义?以什么为底的对数?

logN 是求以10为底的对数,lnN 是求以 e 为底的对数,那 leN 是求以多少为底的对数呀?
le10 是我在浮点数运算里看到的。
...全文
5812 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
喜欢做我自己 2019-10-18
  • 打赏
  • 举报
回复
有的,科学计数法就是这样表示的,比如double变量很大的时候
  • 打赏
  • 举报
回复 1
引用 5 楼 喜欢做我自己 的回复:
le20表示以e为底,20的对数 log20,表示以10为底,20的对数 log20/log2,表示以2为底,20的对数 1e10表示1*10^10,一般变量过大可以用double 或者double double;
抱歉,没看到您发帖,我回帖后直接结贴了,没能给您分数。 即是说既有 le20,也有 1e20 吗?
喜欢做我自己 2019-10-18
  • 打赏
  • 举报
回复 2
le20表示以e为底,20的对数 log20,表示以10为底,20的对数 log20/log2,表示以2为底,20的对数 1e10表示1*10^10,一般变量过大可以用double 或者double double;
  • 打赏
  • 举报
回复 5
今天重新看了下书,发现有些印刷的是 le10,有些印刷的是 1e400,我觉得可能是书上编辑错误,于是我搜了 "1e",看到百度知道里有人回答如下: 1e11是科学记数法中的一种写法,由于在大部分软件中无法输入10的11次方的上标,为了写起来方便,科学界就约定将10的n次方标记为En,n可以为正数也可以为负数。 由此我觉得书上说 le10, le20 可能是书写错误,正确的应该是 1e10, 1e20。 这是我在 CSDN 的首次发帖,感谢给我回帖的 2 位。
赵4老师 2019-10-16
  • 打赏
  • 举报
回复
C++ Floating-Point Constants Floating-point constants specify values that must have a fractional part. These values contain decimal points (.) and can contain exponents. Syntax floating-constant : fractional-constant exponent-partopt floating-suffixopt digit-sequence exponent-part floating-suffixopt fractional-constant : digit-sequenceopt . digit-sequence digit-sequence . exponent-part : e signopt digit-sequence E signopt digit-sequence sign : one of + – digit-sequence : digit digit-sequence digit floating-suffix :one of f l F L Floating-point constants have a “mantissa,” which specifies the value of the number, an “exponent,” which specifies the magnitude of the number, and an optional suffix that specifies the constant’s type. The mantissa is specified as a sequence of digits followed by a period, followed by an optional sequence of digits representing the fractional part of the number. For example: 18.46 38. The exponent, if present, specifies the magnitude of the number as a power of 10, as shown in the following example: 18.46e0 // 18.46 18.46e1 // 184.6 If an exponent is present, the trailing decimal point is unnecessary in whole numbers such as 18E0. Floating-point constants default to type double. By using the suffixes f or l (or F or L — the suffix is not case sensitive), the constant can be specified as float or long double, respectively. Although long double and double have the same representation, they are not the same type. For example, you can have overloaded functions like void func( double ); and void func( long double );
轻箬笠 2019-10-16
  • 打赏
  • 举报
回复 1
额,没见过,我觉得是1e10,不是l是数字1
  • 打赏
  • 举报
回复
引用 1 楼 轻箬笠 的回复:
额,没见过,我觉得是1e10,不是l是数字1
仔细看了下,应该是 l 而不是1,还有 le20。

3,882

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧