[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: double variables
Well, I wrote a program to experimentation with a
concept discussed in class a while ago and just found
it yesterday again. And my calculations are off by one
one-hundredth, and it has been bugging me.
Travis Davies
--- SuperDuG <superdug@dugnet.com> wrote:
> > how can I cout the value of a double with
> setprecision
> > in c++ without the number being rounded at all.
> > for example:
> >
> > #include <iostream>
> > #include <iomanip>
> >
> > using namespace std;
> > main(){
> >
> > double num = 8.5732;
> >
> > cout << setprecision(3) << num;
> >
> > return 0;
> > }
>
> Boy did you get me thinking ... to tell you the
> truth ... without putting it
> all in place holders via an array or pointer ... I
> don't see how you really
> could ...
>
> just out of curiosity ... is this something that's
> bugging you ... or a
> professor that gave it as an assignment? :-)
>
> SuperDuG
>
> -
> To unsubscribe, send email to majordomo@luci.org
> with
> "unsubscribe luci-discuss" in the body.
=====
"I refuse to prove that I exist", says god. "For proof denies faith, and without faith I am nothing." "But", says man. "The babel fish is a dead giveaway, isn't it? It could not have evolved by chance. it proves you exist, and so therefore by your own arguments, you don't." QED
--The Hitchhiker's Guide To The Galaxy
By Douglas Adams
__________________________________________________
Do You Yahoo!?
Get email alerts & NEW webcam video instant messaging with Yahoo! Messenger
http://im.yahoo.com
-
To unsubscribe, send email to majordomo@luci.org with
"unsubscribe luci-discuss" in the body.