Modify

Ticket #2693 (closed Feature Requests: fixed)

Opened 5 years ago

Last modified 21 months ago

Golden ratio

Reported by: micdestefano@… Owned by: johnmaddock
Milestone: Boost 1.52.0 Component: math
Version: Boost 1.50.0 Severity: Cosmetic
Keywords: golden ratio constant Cc: pbristow, pbristow@…

Description

Good morning.

I'd like you to add the golden ratio to your set of mathematical constants into boost/math/constants/constants.hpp

It would be great to have also some physical constants (like the speed of light, the gravitational constant, the magnetic permeability, etc. ... but this would not properly fit within your mathematical library).

Thank you very much.

Michele De Stefano

Attachments

Change History

comment:1 follow-up: ↓ 2 Changed 5 years ago by johnmaddock

  • Cc pbristow@… added

Oh no :-(

This was discussed at rather excessive length when Paul Bristow submitted his numeric constants library.... and no one could agree what the "correct" interface was, so the library was rejected. This is the main reason why our numeric constants are still considered implementation details (albeit semi-documented ones).

I'm CC'ing Paul on this in case he wants to comment.

I guess about the only thing everyone agreed upon during the review was the need for a set a constants library.

Regards, John.

comment:2 in reply to: ↑ 1 Changed 5 years ago by micdestefano@…

Replying to johnmaddock:

Oh no :-(

Thanks. Actually, I've understood that the physical constants where rejected ... but I've not understood, from your answer, if it is possible to add the golden ratio or not. I don't know why this part of the library is considered an implementation detail ... I think that it is a very, very useful detail ... :-)

comment:3 in reply to: ↑ description Changed 5 years ago by steven_watanabe

Replying to micdestefano@gmail.com:

It would be great to have also some physical constants (like the speed of light, the gravitational constant, the magnetic permeability, etc. ... but this would not properly fit within your mathematical library).

The Units library contains double versions of a number of physical constants in SI units, for instance,  http://tinyurl.com/cnyvgp

comment:4 Changed 5 years ago by micdestefano@…

Thank you. I've never looked at the Units library. I'll have a look at it.

comment:5 Changed 22 months ago by johnmaddock

Paul, now that constants are part of Boost.Math, did we add this one? Should we? And more to the point can we close this issue ;-)

comment:6 Changed 22 months ago by pbristow

It is already there as phi (with a name golden ratio as well. So I will close this ticket.

comment:7 Changed 22 months ago by pbristow

  • Keywords golden ratio constant added
  • Status changed from new to closed
  • Version changed from Boost 1.37.0 to Boost 1.50.0
  • Resolution set to fixed

comment:8 Changed 21 months ago by johnmaddock

  • Milestone changed from Boost 1.38.0 to Boost 1.52.0
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.