| DPQmpfr-utils {DPQmpfr} | R Documentation |
Numeric / Mpfr Utilities for DPQmpfr
Description
Utilities for package DPQmpfr
Usage
ldexp(f, E)
Arguments
f |
‘fraction’, as such with absolute value in |
E |
integer-valued exponent(s). |
Details
ldexp() is a simple wrapper, either calling
DPQ::ldexp from DPQ or
ldexpMpfr from the Rmpfr package,
ldexp(f, E) := f \times 2^E,
computed accurately and fast on typical platforms with internally binary arithmetic.
Value
either a numeric or a "mpfr", depending on the type of
f, vector as (the recyled) combination of f and E.
See Also
ldexp from package DPQ and
ldexpMpfr from package Rmpfr.
Examples
ldexp(1:10, 2)
ldexp(Rmpfr::Const("pi", 96), -2:2) # = pi * (1/4 1/2 1 2 4)
[Package DPQmpfr version 0.3-2 Index]