help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: precision problem with mex file


From: fredounet
Subject: Re: precision problem with mex file
Date: Thu, 18 Jul 2013 04:15:48 -0700 (PDT)

thanks, it helped me a lot.

e 18/07/2013 09:45, CdeMills [via Octave] a écrit :
>
>     fredounet wrote
>     
> A=351.40999999999985448084771633148193359375000000000000*351.40999999999985448084771633148193359375000000000000;
>
>     
> A=A+105.45999999999912688508629798889160156250000000000000*105.45999999999912688508629798889160156250000000000000;
>
>
> This does not make sense. Octave uses IEEE-754 double precision
> numbers, which means 53 bits of mantissa, and around 16 decimal
> digits. Your numbers seems to have 40 significant digits, this is not
> supported at the present time. "Things are working" means that you can
> not detect truncation effects. Do not forget that numbers like 351.41
> are NOT exact, finite-length in binary representation. I mean that you
> require an infinite sequence of digits to approximate it in base ten;
> 0.410156250 is an exact number in base two.
>
> If you really want to work at that level of accuracy, I'm porting a
> package called mptoolbox; have a look at
> hg.code.sf.net/p/octave/multi-precision for a sort-of working version.
>
> Regards
>
> Pascal
>
> ------------------------------------------------------------------------
> If you reply to this email, your message will be added to the
> discussion below:
> http://octave.1599824.n4.nabble.com/precision-problem-with-mex-file-tp4655798p4655801.html
>
> To unsubscribe from precision problem with mex file, click here
> <http://octave.1599824.n4.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4655798&code=YmVuYXJkODNAZ21haWwuY29tfDQ2NTU3OTh8MjE2MjQ1Njcy>.
> NAML
> <http://octave.1599824.n4.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://octave.1599824.n4.nabble.com/precision-problem-with-mex-file-tp4655798p4655804.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]