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

Ratio.create_ratio and Ratio.create_normalized_ratio have behaviors that can be seen as misleading #5310

Closed
vicuna opened this Issue Jul 7, 2011 · 2 comments

Comments

Projects
None yet
2 participants
@vicuna
Copy link
Collaborator

vicuna commented Jul 7, 2011

Original bug ID: 5310
Reporter: rbonichon
Assigned to: @damiendoligez
Status: closed (set by @damiendoligez on 2012-03-31T22:15:58Z)
Resolution: fixed
Priority: normal
Severity: tweak
Version: 3.12.0
Fixed in version: 4.00.0+dev
Category: ~DO NOT USE (was: OCaml general)
Related to: #4866

Bug description

In (undocumented) Ratio module:

  • create_ratio normalizes its ratio at create time (and possibly sets normalized to true)
  • create_normalized_ratio does not (it supposes it creates something normalized).

I would have expected the exact contrary to happen (normalized_ratio should normalize and create should not).

If you feel the current naming is appropriate, could you at least document the implemented behavior of these functions in the interface of ratio?

(And while you are at it, have ocamldoc generate a html file for this module too, because it is isconcerting to browse the doc of the num library and see this Ratio module appears without documentation).

Additional information

The referred behavior can be instrumented with the attached ml file.

File attachments

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Jul 7, 2011

Comment author: rbonichon

Ratio.create_ratio normalizes only when the appropriate "normalize_ratio_flag" is set to true.

@vicuna

This comment has been minimized.

Copy link
Collaborator Author

vicuna commented Mar 31, 2012

Comment author: @damiendoligez

Added comments to Ratio.mli in 4.00 (commit 12301) and trunk (commit 12304).

Generate the html file in the doc (commit 12302).

@vicuna vicuna closed this Mar 31, 2012

@vicuna vicuna referenced this issue Aug 31, 2013

Closed

Module Ratio #4866

@vicuna vicuna added the bug label Mar 20, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.