asNumeric_no_warning function

If the function Rmpfr::asNumeric returns a warning about inefficiency, silence it.

If the function Rmpfr::asNumeric returns a warning about inefficiency, silence it.

The function Rmpfr::asNumeric prints the following warning: In asMethod(object) : coercing "mpfr1" via "mpfr" (inefficient). It is not clear how to avoid it nor how to silence it, hence this function. A cleaner solution may be available at: https://stackoverflow.com/questions/4948361/how-do-i-save-warnings-and-errors-as-output-from-a-function/4952908#4952908

asNumeric_no_warning(x)

Arguments

  • x: An object of class Rmpfr::mpfr1

Returns

a "numeric" number

  • Maintainer: Guillaume Kon Kam King
  • License: GPL (>= 2)
  • Last published: 2023-03-24

Useful links