Skip to content
Prev 378832 / 398502 Next

rounding off problem.....

"Is there any way ..."
Two quick answers:
1. using base R functions and data types the answer is 'no' - a double
(i.e. numeric) contains about 15 significant digits.
    So 5.678e-100 is fine but   0.01 + 5.678e-100 will keep the
.0100000000000000  as the significant digits and "drop" the digits 80 or so
places further to the right.
2. there are packages that provide for arbitrary precision calculations
    see R CRAN package Rmpfr
     https://cran.r-project.org/web/packages/Rmpfr/vignettes/Rmpfr-pkg.pdf

HTH,
Eric

On Fri, Mar 8, 2019 at 2:39 PM akshay kulkarni <akshay_e4 at hotmail.com>
wrote:

  
  
Message-ID: <CAGgJW74uiUOfEWdH_K0ezQ9WvPVT3vfAPEuWCEHXDbVM_=pZqA@mail.gmail.com>
In-Reply-To: <SL2P216MB0091AFFB591A566E21768361C84D0@SL2P216MB0091.KORP216.PROD.OUTLOOK.COM>