Skip to content

Value of Pi and Math module #5173

@vicuna

Description

@vicuna

Original bug ID: 5173
Reporter: warwick
Status: closed (set by @xavierleroy on 2010-11-11T17:21:50Z)
Resolution: not a bug
Priority: normal
Severity: feature
Version: 3.12.0
Category: ~DO NOT USE (was: OCaml general)
Related to: #4170
Monitored by: @Chris00

Bug description

Sorry ... I guess this has been discussed already, but I think the inclusion of a value for Pi would make OCaml easier to learn and use (rather than having to put: let pi = 4. *. atan 1. in your code).

It'd be a problem adding pi to the namespace in Pervasives, so it'd be good to have a Math module. This would give the opportunity to move floating point functions from Pervasives to Math, over time; and also the chance to add some new maths functions or values if required - without cluttering Pervasives.

For example:

Math.round, Math.deg, Math.rad, Math.e, Math.asinh, Math.acosh, Math.atanh, ...

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions