Hello Mat

 找回密码
 立即注册
查看: 654|回复: 0

C++ 使用<cmath>库里的预定义常量(圆周率 π 和 自然常数 e)

[复制链接]

1294

主题

1520

帖子

110

金钱

管理员

Rank: 9Rank: 9Rank: 9

积分
22633
发表于 2023-12-3 18:52:07 | 显示全部楼层 |阅读模式
https://codeleading.com/article/10085305309/
  1. #define M_E                  2.7182818284590452354
  2. #define M_LOG2E        1.4426950408889634074
  3. #define M_LOG10E      0.43429448190325182765
  4. #define M_LN2              0.69314718055994530942
  5. #define M_LN10            2.30258509299404568402
  6. #define M_PI                 3.14159265358979323846
  7. #define M_PI_2             1.57079632679489661923
  8. #define M_PI_4             0.78539816339744830962
  9. #define M_1_PI             0.31830988618379067154
  10. #define M_2_PI             0.63661977236758134308
  11. #define M_2_SQRTPI   1.12837916709551257390
  12. #define M_SQRT2        1.41421356237309504880
  13. #define M_SQRT1_2    0.70710678118654752440
复制代码




算法QQ  3283892722
群智能算法链接http://halcom.cn/forum.php?mod=forumdisplay&fid=73
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

Python|Opencv|MATLAB|Halcom.cn ( 蜀ICP备16027072号 )

GMT+8, 2024-4-29 01:47 , Processed in 0.202026 second(s), 21 queries .

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表