首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > 一个C++类中的十进制数,计算精度允许任意长度的/。

一个C++类中的十进制数,计算精度允许任意长度的/。

  • 资源大小:7.45 kB
  • 上传时间:2021-06-29
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签: pi Decimal fraction

资 源 简 介

I started this project from an interest in approximating pi. I decided the most straight forward way of doing this was to use mathematical formulas which would require a high degree of accuracy for a number class. The class supports most of the basic operations (+,-,*,/) though the code is rather messy since I started this while I was learning C++. It"s a work in progress and can definitely be optimized. The biggest accomplishment I"ve gotten from it so far was approximating pi to 10,000 places which took two weeks. I realize that it is a horribly inefficient way of creating a arbitraty precision class, but hey, it works (as far as I"ve tested it anyway). I also started a rational number class (Fraction) based on the big decimal class (DEC).
VIP VIP
0.179291s