The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 Forum for Origin C
 why atof("0.003315") return 0.00331
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

70WorkRoom

China
Posts

Posted - 07/13/2007 :  05:26:51 AM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Version:Origin pro 7.5
Operaion System:windows 2000

I need the result is 0.00332

Another question.
when i make a graph that be fitted linear,how can i copy it to a microsoft word with origin c?

I need your help,thanks very much.


Edited by - 70WorkRoom on 07/13/2007 05:51:39 AM

Mike Buess

USA
3037 Posts

Posted - 07/14/2007 :  08:29:39 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
atof("0.003315") returns the number 0.003315. Any rounding off you see results from subsequent formatting...

double run_atof(string str)
{
double x = atof(str);
printf("x=%.5f\n",x);
return x;
}

>run_atof("0.003315")=;
>x=0.00331
>RUN_ATOF("0.003315")=0.003315


quote:
when i make a graph that be fitted linear,how can i copy it to a microsoft word with origin c?
The file Samples\COM Client\ReportCreation.c should give you some ideas.

Mike Buess
Origin WebRing Member
Go to Top of Page

70WorkRoom

China
Posts

Posted - 07/14/2007 :  09:30:29 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
thank you very much.
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000