Comment by camgunz
5 months ago
Nah it's a pain in the ass if I'm writing a C program to consume your API and I need to pull in MPFR because you used bignums.
5 months ago
Nah it's a pain in the ass if I'm writing a C program to consume your API and I need to pull in MPFR because you used bignums.
A reasonable C API would just give a pointer to decimal digits and a scaling factor. Why did you think MPFR is needed?
You can replace "pull in MPFR" with "work any harder than just using `double`". Bignums are an obvious pain in the ass; I can think of no data representation formats that include support for them and that's why
I'm aware of plenty (though I have surveyed at least 20 formats in the past and so that would include more obscure ones). At the very least, you can feed it back to sscanf if you are fine with an ordinary float or double, a thoughtful API would include this as an option too. That's what I expect for the supposed bignum support: round-trippability.
3 replies →