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.mod_big_int #3719

Closed
vicuna opened this issue Jul 9, 2005 · 1 comment
Closed

Big_int.mod_big_int #3719

vicuna opened this issue Jul 9, 2005 · 1 comment
Labels

Comments

@vicuna
Copy link

vicuna commented Jul 9, 2005

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

Bug description

Full_Name: Frank
Version: 3.08.2
OS: W2K
Submission from: cmbg-cache-5.server.ntli.net (62.253.128.15)

let sop bop a b =
string_of_big_int
(bop
(big_int_of_string a)
(big_int_of_string b))

let s1 = sop div_big_int "-10" "-20"
let s2 = sop mod_big_int "-10" "-20"

let i1 = (-10) / (-20)
let i2 = (-10) mod (-20)

-- gives

val s1 : string = "-1"
val s2 : string = "-30"
val i1 : int = 0
val i2 : int = -10

-- if q = x div y
-- and r = x mod y
-- then x = q*y + r however for big ints abs(r) is not less than abs(y).

@vicuna
Copy link
Author

vicuna commented Jul 19, 2005

Comment author: administrator

Fixed in 3.08.4 by XL, 2005-07-19

@vicuna vicuna closed this as completed Jul 19, 2005
@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