Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ocaml-num is deprecated - switch to Zarith is recommended #905

Open
XVilka opened this issue Aug 8, 2019 · 4 comments
Open

ocaml-num is deprecated - switch to Zarith is recommended #905

XVilka opened this issue Aug 8, 2019 · 4 comments

Comments

@XVilka
Copy link

XVilka commented Aug 8, 2019

Previously Num was a part of OCaml compiler. Recently it was extracted out of it, and deprecated in favor of Zarith:

This is a legacy library. It used to be part of the core OCaml distribution (in otherlibs/num) but is now distributed separately. New applications that need arbitrary-precision arithmetic should use the Zarith library (https://github.com/ocaml/Zarith) instead of the Num library, and older applications that already use Num are encouraged to switch to Zarith. Zarith delivers much better performance than Num and has a nicer API.

from the https://github.com/ocaml/num/

@rixed
Copy link
Contributor

rixed commented Aug 8, 2019

Zarith has some external dependencies, whereas Num has none, if I'm correct.

@UnixJunkie
Copy link
Member

Yes, zarith depends on gmp.
But is it really a problem?
One thing I am worried is if zarith doesn't support as many ocaml versions as num does.

Can opam support "we depend on A or B, A is preferred over B if both are possible"?

@UnixJunkie
Copy link
Member

Is zarith higher performance than num?

@UnixJunkie
Copy link
Member

the question has to be asked again with ocaml-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants