Looking for TVM contributions
|
05-25-2024, 03:04 PM
Post: #30
|
|||
|
|||
RE: Looking for TVM contributions
(05-25-2024 01:43 PM)dm319 Wrote: pmt <- mpfr(2083.333334,precision) pmt turned float (53 bits precision), then mpfr. It should be quoted. p2> from gmpy2 import * p2> get_context().precision = 113 # binary128 p2> i = mpfr(25) / 1200 p2> pv = mpfr(-1e5) p2> pmt = mpfr('2083.333334') p2> fv = mpfr(0) p2> -log1p(-(pv + fv) / (fv - (pmt / i))) / log1p(i) mpfr('1060.30339000051000712732851994886109',113) p2> log1p(-(pv + fv) / (pv + (pmt / i))) / log1p(i) mpfr('1060.30339000051000712732851861304841',113) Scale by million, to work with integer. p2> pv *= 1e6 p2> pmt = rint(pmt * 1e6) # pmt rounded to integer p2> log1p(-(pv + fv) / (pv + (pmt / i))) / log1p(i) mpfr('1060.30339000051000712732852988489078',113) |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 16 Guest(s)