[Mono-dev] Add a libgmp-wrapper to mono
Dax
Dax at daxxfiles.net
Thu Sep 18 15:53:47 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Aefvadh,
I have here a fresh wrapper for libgmp, which I would be happy to add to
mono. Currently, it provides an interface exposing almost all directly
usable usable functions to .NET (excluding file-transport functions and
some minor others, the latter mostly obsolete or depracated), featuring
an intuitive interface (overloaded operators und instance methods that
act on the current object itself, making efficient computations of long
formulae with multiplrecision variables possible, e.g.
x.Add(1).Multiply(3).Remainder(5) would act on only one object, whereas
(x + 1) * 3 % 5 would create two intermediate objects, not including the
result, wich is another, distinct object in its own right).
As of now, it is not CLS-compatible, but I am working on it.
Also, the GMP APIs are preferredly exported using native "long int",
realized through platform switches (PLATFORM_64 define). The 32bit
version will work on 64bit machines, the reverse is not true, however.
It is planned to reduce the exposure of user code to this internal to a
minimum, maybe by making all such input (u)int and all output (u)long,
but that as well is not yet clear.
Some extensions to the GMP API are also planned, such as .Raise for
rationals (for which GMP only exposes + - / *), exp/log for all data
types, trigonometric functions, more "complex" structures, ... - but
priority lies on CLS-compliance for now.
Please let me know what you think about this :)
bedah
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkjSscsACgkQU1h3wAxL79gvxACfTIuq9E5Tmxq3WV8/8J9zDQBO
BcQAnRDT4rwq80+GALGQcSsgzdi2jkjI
=GzXC
-----END PGP SIGNATURE-----
More information about the Mono-devel-list
mailing list