㈠ 一个高精度运算的代码 其中包括 + - * / 四种运算,求大牛修改代码
这个是行还是不行啊
㈡ 求高精度求模运算的代码!最好附上思路~!谢谢!!
#include<iostream>
#include<cstring>
using namespace std;
#define N 1000
int mod(char *s,int d);
void main(void)
{
char str[N+1]="";
int divisor;
scanf("%s %d",str,&divisor);
cout<<mod(str,divisor)<<endl;
}
int mod(char *s,int d)
{
int a[N+1]={0};
int len=strlen(s);
int i,j=0;
for(i=0;i<len;i++)
if(s[i]>'9'||s[i]<'0')
return -1;//Error
for(i=0;i<len;i++)
a[i]=s[i]-'0';
for(i=0;i<len-1;i++)
{
a[i]%=d;
a[i+1]+=a[i]*10;
a[i]=0;
}
a[i]%=d;
return a[i];
}
//除数可以用__int64提高取值范围,但是要你的回编译器支持答
㈢ 高精度计算器 用C语言,要运行成功的全代码!
extern "C"
{
__declspec(dllexport)
int WINAPI icePub_bigIntegerCalculate(char *strArithmetic,char *strResult);
}
#pragma comment(lib,"icePubDll.lib")
char strResult[1024];
icePub_bigIntegerCalculate("12345+876154321",strResult);
AfxMessageBox(strResult);
icePub_bigIntegerCalculate("1234567719012345677190-8176154321",strResult);
AfxMessageBox(strResult);
icePub_bigIntegerCalculate("13579*86421",strResult);
AfxMessageBox(strResult);
icePub_bigIntegerCalculate("1234567719/112233",strResult);
AfxMessageBox(strResult);
//最大1024位10进制数
㈣ 有多少人在用高速高精度代码
我觉得高速高精度代码是分机台来的,一般永进机法哪克系统的机台都有高速高精度代码,其他的普通机好像很少有,就算加了,一般机台也适用不了
㈤ 求C语言写的高精度除法代码!!!!!!
楼主我来有个更好的地方自,说给你去看看,人家把PI算到了1000位小数啊.
而且别人只用了30条语句.
http://www.cppfans.com/articles/basecalc/c_pi_10000.asp
能把分给我不?
㈥ 跪求c语言高精度算法(含负数),C语言源代码,实在写不出来啊
高精度加减乘除是很基本的 你稍微网络下就找得到了
㈦ 高精度阶乘的代码,看不懂,求注释T-T,要是能把sprintf函数改掉就更好了。。。我们还没学过这个
已通过私信发给您,直接回答网络会吞没,谢谢采纳!
㈧ C++高精度 A+B问题代码
这代码看的累,自己写了一个玩。
#include<string>
#include<iostream>
usingnamespacestd;
std::stringCaculate(std::string&s1,std::string&s2)
{
constchar*a=s1.c_str();
constchar*b=s2.c_str();
inti1=s1.length()-1;
inti2=s2.length()-1;
std::strings;
intcarry=0;
while(i1>=0||i2>=0)
{
=carry;
if(i1>=0)
{
if(a[i1]<'0'||a[i1]>'9')return"第一个数输入错误!";
ch+=a[i1]-'0';
}
if(i2>=0)
{
if(b[i2]<'0'||b[i2]>'9')return"第二个数输入错误!";
ch+=b[i2]-'0';
}
if(ch>=10)
{
carry=1;
ch-=10;
}
elsecarry=0;
s.push_back(ch+'0');
i1--;
i2--;
}
if(carry)s.push_back('1');
reverse(s.begin(),s.end());
returns;
}
intmain()
{
std::strings1,s2;
cout<<"输入第一个数:";
cin>>s1;
cout<<"输入第二个数:";
cin>>s2;
std::stringresult=Caculate(s1,s2);
cout<<endl<<"结果为:"<<result<<endl;
return0;
}
㈨ 法拉克系统有高精度切削代码有吗
法拉克系统有高精度切割代码,这个切割代码在每一个法拉克那个机器的候审,你可以找到一连串代码。
㈩ 请问fanuc 0md 和 西门子 802s 有没有对高速高精有帮助的G代码
1.OM 900参数=18M 9920参数所以是参数9930#3没有错。 2.如要使用简易高精度轮廓控制功能必须在程式前专面加属G05.1 Q1 开启此功能, 在程式末端加G05 Q0取消此功能。 3.HPCC要加硬体,AICC看当时机床制造商向FANUC买的package而定,有的只要开启参数,有的还要加记忆体。(都要以每台机床特性调整参数) 4.ENS 以EIA code 读取资料时,如果读取到无效的code时,0=忽视 1=出现alarm. NCR 以ISO code做EOB(end of block)输出时 0=输出 LF CR ,1=输出LF. CTV 是TAPE的 格式检查,使用RS232须设0