Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0004170OCamlstandard librarypublic2006-11-25 14:532016-12-07 18:42
ReporterRichard Jones 
Assigned Togarrigue 
PrioritynormalSeverityfeatureReproducibilityalways
StatusresolvedResolutionsuspended 
PlatformOSOS Version
Product Version3.09.2 
Target VersionFixed in Version 
Summary0004170: pi constant
DescriptionThe stdlib should (IMHO) define a pi constant in Pervasives.
TagsNo tags attached.
Attached Files

- Relationships
related to 0005173closed Value of Pi and Math module 

-  Notes
(0007499)
garrigue (manager)
2012-06-01 10:15

My standard code for pi is acos(-1.)
Is this too long?
(0007501)
Richard Jones (reporter)
2012-06-01 11:23

Since you ask ...

Is acos(-1.) the most accurate pi considering either the IEEE representation or the longer internal representation used by x86?

I know that glibc defines this constant carefully so that the most accurate pi is used. (glibc also provides long-double -- 128 bit -- variants but I guess we can't use those in OCaml).
(0008355)
warwick (reporter)
2012-10-29 13:58

I suggested a similar thing in issue 005173. I think having a predefined value "pi" is a lot clearer than having to write acos(-1.) ... or acos(-.1.)
(0016794)
frisch (developer)
2016-12-07 18:42

Sounds like a useful addition. A PR would be appreciated!

- Issue History
Date Modified Username Field Change
2006-11-25 14:53 Richard Jones New Issue
2007-11-10 13:14 xleroy Status new => acknowledged
2012-06-01 10:15 garrigue Note Added: 0007499
2012-06-01 10:15 garrigue Assigned To => garrigue
2012-06-01 10:15 garrigue Status acknowledged => feedback
2012-06-01 11:23 Richard Jones Note Added: 0007501
2012-06-01 11:23 Richard Jones Status feedback => assigned
2012-10-29 13:58 warwick Note Added: 0008355
2013-09-03 17:25 doligez Category Incoming => OCaml standard library
2013-09-03 17:27 doligez Relationship added related to 0005173
2016-12-07 18:42 frisch Note Added: 0016794
2016-12-07 18:42 frisch Status assigned => resolved
2016-12-07 18:42 frisch Resolution open => suspended
2017-02-23 16:43 doligez Category OCaml standard library => standard library


Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker