[R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-18 Thread Khue Tran
do not know of, so if you can think of a general way to get precise inputs from users, it will be greatly appreciated! Thank you! Best, Khue Tran -- *Khue B. Tran (she/her/hers)* tr...@kenyon.edu | +1 (220) - 203 - 9306 | LinkedIn <https://www.linkedin.com/in/tranbaokhue/> Mathemat

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-18 Thread Khue Tran
On Fri, Jul 19, 2024 at 8:29 AM Dirk Eddelbuettel wrote: > > Hi Khue, > > On 19 July 2024 at 06:29, Khue Tran wrote: > | I am currently trying to get precise inputs by taking strings instead of > | numbers then writing a function to decompose the string into a rational > | wi

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-18 Thread Khue Tran
process, but this example motivated me to try coding with the Boost library. Best, Khue Tran On Fri, Jul 19, 2024 at 9:50 AM Simon Urbanek wrote: > Khue, > > > > On 19/07/2024, at 11:32 AM, Khue Tran wrote: > > > > Thank you for the suggestion, Denes, Vladimir, and Dir

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-18 Thread Khue Tran
I will need to run eigen() on a symmetric matrix, but I want to get arbitrary precise eigenvalues since we will need those eigenvalues for our further calculations. Does that make sense? Best, Khue Tran On Fri, Jul 19, 2024 at 12:14 PM Vladimir Dergachev wrote: > > Do you need to run

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-21 Thread Khue Tran
they were creating issues for linkage between C++ and R, but if I can get them to work in R to avoid complications, I might try that! Thank you again! Best, Khue Tran On Sun, Jul 21, 2024 at 8:06 AM Leo Mada wrote: > Dear Khue, > > As mentioned before, you can use Rmpfr to read in s

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-21 Thread Khue Tran
Thank you Prof. Maechler! Indeed 0.1 is not the same as 1/10 and there are many ways to get more precise versions of it. I will look into how to take inputs as strings. Thank you! Best, Khue Tran On Sat, Jul 20, 2024 at 4:40 AM Duncan Murdoch wrote: > Just for your info: > > > e

Re: [R-pkg-devel] How to get arbitrary precise inputs from R for an Rcpp package?

2024-07-21 Thread Khue Tran
Thank you Duncan for providing detailed information on parsing in R. I will check it out and utilize the string inputs for my functions. Best regards, Khue Tran On Sat, Jul 20, 2024 at 4:40 AM Duncan Murdoch wrote: > Just for your info: > > > exp(mpfr("0.1", 152)