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

Nat.mult/square_nat returns different results at different stack depths #4083

Closed
vicuna opened this issue Aug 13, 2006 · 2 comments
Closed
Labels

Comments

@vicuna
Copy link

vicuna commented Aug 13, 2006

Original bug ID: 4083
Reporter: mgiovann
Status: closed (set by @xavierleroy on 2006-08-19T07:46:37Z)
Resolution: not a bug
Priority: normal
Severity: minor
Version: 3.09.2
Category: ~DO NOT USE (was: OCaml general)

Bug description

It seems that Nat.mult_nat and Nat.square_nat fills the higher digits of the product with garbage, but depending on the nesting depth of the calling function.

Additional information

I attach a simple test case I verified on Mac OS X 10.4.7 (running on a PPC 750), and on Windows XP (running on a Celeron).

File attachments

@vicuna
Copy link
Author

vicuna commented Aug 14, 2006

Comment author: mgiovann

Please disregard. I apologize for the waste of time I might have caused, but looking at the attached code "sideways and squinting a little", I noticed a bug in it that has nothing to do with Nat.

@vicuna
Copy link
Author

vicuna commented Aug 19, 2006

Comment author: @xavierleroy

For the record: when calling Nat.square_nat d ld od x lx ox, we must have
ld >= 2 * lx. This wasn't the case in the submitted code.

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