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

bignum library #2684

Closed
vicuna opened this issue Feb 13, 2001 · 2 comments
Closed

bignum library #2684

vicuna opened this issue Feb 13, 2001 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Feb 13, 2001

Original bug ID: 286
Reporter: administrator
Status: closed
Resolution: fixed
Priority: normal
Severity: minor
Category: ~DO NOT USE (was: OCaml general)

Bug description

Full_Name: Winfried Dreckmann
Version: Ocaml 3.00
OS: LinuxPPC
Submission from: t6o903p78.telia.com (212.181.190.198)

The function Big_int.sqrt_big_int from the bignum librarie sometimes returns a
too small result:

Big_int.string_of_big_int (Big_int.sqrt_big_int (Big_int.big_int_of_string

"9"));;

  • : string = "2"

In particular it returns 2^n if applied to (2^n + 1)^2 for all n, small and
large, which I tried. This is not the integer part of the square root, contrary
to the documentation (RT-0141). There is no documentation in the user guide.
However it seems to be part of the release because it shows up in the browser.

@vicuna
Copy link
Author

vicuna commented Feb 13, 2001

Comment author: administrator

Full_Name: Winfried Dreckmann
Version: Ocaml 3.00
OS: LinuxPPC
Submission from: t6o903p78.telia.com (212.181.190.198)

The function Big_int.sqrt_big_int from the bignum librarie sometimes returns a
too small result:

Big_int.string_of_big_int (Big_int.sqrt_big_int (Big_int.big_int_of_string

"9"));;

  • : string = "2"

In particular it returns 2^n if applied to (2^n + 1)^2 for all n, small and
large, which I tried. This is not the integer part of the square root, contrary
to the documentation (RT-0141). There is no documentation in the user guide.
However it seems to be part of the release because it shows up in the browser.

This is a known bug of the library. I rewrote the algorithm for the Caml Light
implementation but failed to back port it to the Objective Caml port.
I will correct it as soon as possible.

Best regards,

Pierre Weis

INRIA, Projet Cristal, Pierre.Weis@inria.fr, http://pauillac.inria.fr/~weis/

@vicuna
Copy link
Author

vicuna commented Mar 1, 2001

Comment author: administrator

Fixed 2001-03-01 by PW.

@vicuna vicuna closed this as completed Mar 1, 2001
@vicuna vicuna added the bug label Mar 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant