[R] calculating error

james.holtman@convergys.com james.holtman at convergys.com
Mon Sep 13 00:39:48 CEST 2004

This is in the FAQs.  It has to do with representation of floating point
numbers.  You can not represent 'pi' exactlly in the 53 bits of precision
in floating point.  If you notice, 2^-53 is 1.1e-16 which indicates the
'roundoff' is in the least significant bit of the precision; this is to be
expected with floating point numbers.
James Holtman        "What is the problem you are trying to solve?"
Executive Technical Consultant  --  Office of Technology, Convergys
james.holtman at convergys.com
+1 (513) 723-2929

                      "Branimir K.                                                                                                         
                      Hackenberger"                To:       <r-help at stat.math.ethz.ch>                                                    
                      <hack at ffos.hr>               cc:                                                                                     
                      Sent by:                     Subject:  [R] calculating error                                                         
                      r-help-bounces at stat.m                                                                                                
                      09/12/2004 14:28                                                                                                     

Could anybody explain this results?

-2.449213e-16         #should be zero

-2.449213             #should be zero too

and explain what to do to correct this events?


Branimir K. Hackenberger

R-help at stat.math.ethz.ch mailing list
PLEASE do read the posting guide!

More information about the R-help mailing list