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

Big_int breakage on 64-bit architectures #3299

Closed
vicuna opened this issue Nov 24, 2004 · 2 comments
Closed

Big_int breakage on 64-bit architectures #3299

vicuna opened this issue Nov 24, 2004 · 2 comments
Labels

Comments

@vicuna
Copy link

vicuna commented Nov 24, 2004

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

Bug description

Full_Name: Ville-Pertti Keinonen
Version: 3.08.1
OS: Any
Submission from: fa-3-0-0.fw.exomi.com (217.169.64.99)

Example:

    Objective Caml version 3.08.1

#load "nums.cma";;

open Big_int;;

div_big_int (big_int_of_int 6755399441055744) (big_int_of_int

4503599627370496);;
zsh: floating point exception ocaml

The problem is caused by the fact that ARCH_SIXTYFOUR is not defined in bng.c,
which breaks bng_leading_zero_bits, which in turn breaks bng_generic_div_rem
(among other things) for some divisors.

This can be fixed by adding #include "config.h" to bng.c.

@vicuna
Copy link
Author

vicuna commented Dec 22, 2004

Comment author: administrator

Full_Name: Ville-Pertti Keinonen
Version: 3.08.1

The problem is caused by the fact that ARCH_SIXTYFOUR is not defined in
bng.c,
which breaks bng_leading_zero_bits, which in turn breaks bng_generic_div_rem
(among other things) for some divisors.

This can be fixed by adding #include "config.h" to bng.c.

Thanks for the report. I have added the #include to the working source.

-- Damien

@vicuna
Copy link
Author

vicuna commented Dec 22, 2004

Comment author: administrator

fixed 2004-12-22 DD

@vicuna vicuna closed this as completed Dec 22, 2004
@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