[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: fprintf for GMP objects?
From: |
Kevin Ryde |
Subject: |
Re: fprintf for GMP objects? |
Date: |
06 Apr 2001 08:28:52 +1000 |
User-agent: |
Gnus/5.0808 (Gnus v5.8.8) Emacs/20.5 |
Ronald Bruck <address@hidden> writes:
>
> 1. Is there a C++ wrapper for it yet? I'm mostly interested in the
> floating-point stuff.
There's an efficient one by Gerardo Ballabio supporting mpz, mpq and
mpf
http://www.sissa.it/~ballabio/gmp++.html
Others have been mentioned on the address@hidden list. Some higher
level libraries like NTL, LiDIA and CLN have options to use gmp too.
> 2. Failing that, has anyone written a relacement for fscanf and
> fprintf which will read/write GMP reals instead of doubles?
I've been having a bit of a go at a printf, but it's a distance away
from pretending to work properly.
> If nothing else, using K&R's example of how to use a variable
> argument list, intercepting the "%e" call.
Personally I'm in favour of something that can mix double and mpf_t in
one printf, so it'd be %e with an extra type letter, maybe F or maybe
a whole MPF or something.