This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Reg: gcc option for printing large number (large double)
- From: emailstorbala <emailstorbala at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Mon, 16 Sep 2013 19:07:13 -0700 (PDT)
- Subject: Re: Reg: gcc option for printing large number (large double)
- Authentication-results: sourceware.org; auth=none
- References: <1379046979926-968019 dot post at n5 dot nabble dot com> <BLU177-DS12C419B38FFC924F3C90E2BA250 at phx dot gbl> <523652DF dot 8040400 at aol dot com> <20130916094643 dot GA20229 at xvii dot vinc17 dot org> <20130916095348 dot GB20229 at xvii dot vinc17 dot org>
Dear Vincent,
Thank you very much!
This solution have solved my confusion.
Thanks and Regards,
Balamurugan R
On 09/16/2013 03:24 PM, Vincent Lefevre-3 [via gcc] wrote:
> On 2013-09-16 11:46:43 +0200, Vincent Lefevre wrote:
>
> > On 2013-09-15 20:37:51 -0400, Tim Prince wrote:
> > > On 9/15/2013 3:42 PM, Arbol One wrote:
> > > >Use a 'long long' value instead of a 'double'.
> > ^^^^^^^^^
> > long double
> >
> > > >
> > > >#include <iostream>
> > > >#include <math.h>
> > > >
> > > >using namespace std;
> > > >int main() {
> > > > long long temp = 0.0;
> > ^^^^^^^^^
> > long double
> >
> > > > temp = pow(2, 2000);
> > > > cout << "The value of tmp is: " << temp << endl;
> > > >
> > > > return 0;
> > > >}
> > > >
> > > :s/pow/powl/
> > > but not all math libraries invoked by some gcc implementations
> will work.
> >
> > And on some platforms (ARM, PowerPC), "long double" has the same range
> > of "double".
>
> I forgot to say... If long double is not sufficient, you can
> consider GNU MPFR. The maximum exponent is around 2^30 by default,
> and it can be increased to 2^62 on 64-bit machines.
>
> There's also DPE <https://gforge.inria.fr/projects/dpe/> but AFAIK,
> it doesn't support many functions.
>
> --
> Vincent LefÃvre <[hidden email]
> </user/SendEmail.jtp?type=node&node=968663&i=0>> - Web:
> <http://www.vinc17.net/>
> 100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)
>
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://gcc.1065356.n5.nabble.com/Reg-gcc-option-for-printing-large-number-large-double-tp968019p968663.html
>
> To unsubscribe from Reg: gcc option for printing large number (large
> double), click here
> <http://gcc.1065356.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=968019&code=ZW1haWxzdG9yYmFsYUBnbWFpbC5jb218OTY4MDE5fC0xMjk5OTM2MDQx>.
> NAML
> <http://gcc.1065356.n5.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>
--
View this message in context: http://gcc.1065356.n5.nabble.com/Reg-gcc-option-for-printing-large-number-large-double-tp968019p968928.html
Sent from the gcc - Help mailing list archive at Nabble.com.