ref: b7d31909f6258a36d00cb2bc2ef08687d6817755
parent: b9a08958e2b7a960b39c0db82a049836896e660e
author: aiju <devnull@localhost>
date: Fri Mar 9 16:30:06 EST 2018
mptod/dtomp: add to mp.h
--- a/sys/include/ape/mp.h
+++ b/sys/include/ape/mp.h
@@ -74,6 +74,8 @@
mpint* uvtomp(uvlong, mpint*);
vlong mptov(mpint*); /* vlong */
mpint* vtomp(vlong, mpint*);
+double mptod(mpint*); /* double */
+mpint* dtomp(double, mpint*);
/* divide 2 digits by one */
void mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient);
--- a/sys/include/mp.h
+++ b/sys/include/mp.h
@@ -62,6 +62,8 @@
mpint* uvtomp(uvlong, mpint*);
vlong mptov(mpint*); /* vlong */
mpint* vtomp(vlong, mpint*);
+double mptod(mpint*); /* double */
+mpint* dtomp(double, mpint*);
/* divide 2 digits by one */
void mpdigdiv(mpdigit *dividend, mpdigit divisor, mpdigit *quotient);