🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
7825677899最后结果: ZJ_dfZ=245850928.81 ZJ_dmfZ=78256778.99 `` ``` // ConsoleApplication1.cpp : 此文件包含 "main" 函数。程序执行将在此处开始并结束。 // #include "pch.h" #include <iostream> using namespace std; #define pifZ 245850922 #define pifM 78256779 #define PI 3.14159265358979323846f #define PI100 314.159265358979323846f int main() { std::cout << "Hello World!\n"; double zuijin_dfZ = 24585092100; // pifZ; double zuijin_dmfM = 7825677800; //pifM; double zuijin = pifZ/pifM; double zuixiao = 1.0; // abs(zuijin - PI); __int64 dfenMui64 = 0; for (double d1z = 245850921000; d1z <= 245850929000; d1z = 1 + d1z) {//for110 for (double dm = 78256778000; dm <= 78256781000; dm = 1 + dm) { // double dfZ = d + pifZ; // double dmfM = dm + pifM; double tmp_p = double((double)d1z / dm); if (zuixiao > (abs( 3.14159265358979323846f -tmp_p) ) ) { zuijin = tmp_p; zuixiao = abs( 3.14159265358979323846f-tmp_p); zuijin_dfZ = d1z; zuijin_dmfM = dm; cout << "ZJ_dfZ=" << zuijin_dfZ << endl; cout << "ZJ_dmfZ=" << zuijin_dmfM << endl; cout << "tmp_PI:" << tmp_p<<endl; cout << "zuiXiao:" << zuixiao<<endl; dfenMui64 = (__int64)dm; cout << ':' << dfenMui64; }//if210 // cout <<':'<< dmi64 ; }//for110 } __int64 d1fenZi64 = (__int64)zuijin_dfZ; cout << "最后结果:" << endl; std::cout << "ZJ_dfZ=" << d1fenZi64 <<endl; cout << "ZJ_dmfZ=" << dfenMui64 << endl; }//main() ``` :78256778658ZJ_dfZ=2.45851e+11 ZJ_dmfZ=7.82568e+10 tmp_PI:3.14159 zuiXiao:5.32907e-15 :78256778884最后结果: ZJ_dfZ=245850928.477 ZJ_dmfZ=78256778.884 ----------------------------------- :782567780ZJ_dfZ=2.45851e+09 ZJ_dmfZ=7.82568e+08 tmp_PI:3.14159 zuiXiao:2.14095e-12 :782567780最后结果: ZJ_dfZ=245850925.7 ZJ_dmfZ=78256778.0