Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

[WIP] Add important numerical constants #14

Open
10 of 15 tasks
castarco opened this issue Mar 8, 2015 · 1 comment
Open
10 of 15 tasks

[WIP] Add important numerical constants #14

castarco opened this issue Mar 8, 2015 · 1 comment

Comments

@castarco
Copy link
Contributor

castarco commented Mar 8, 2015

A list of important numerical constants.

Interfaces

  • Zero
  • One
  • PI
  • E
  • Euler - Mascheroni Constant
  • Golden Ratio
  • Silver Ratio
  • Light Speed

Arbitrary precision (via $scale parameter)

  • PI
  • E
  • Euler - Mascheroni Constant
  • Golden Ratio
  • Silver Ratio

Integration with Decimal

  • Use the Zero constant instead of creating new zero objects inside Decimal methods.
  • Use the One constant instead of creating new one objects inside Decimal methods.

The non-phisical numerical constants must be associated to a method with the following signature:

public static function ConstantName($scale);

This methods will allow to specify how many digits we want for every one of the supported numerical constants.

@castarco castarco changed the title Add important numerical constants [WIP] Add important numerical constants Mar 11, 2015
@castarco castarco added this to the 0.8 Release milestone Mar 20, 2015
@agungsantoso
Copy link
Contributor

Hi @castarco, I create PR to add silver ratio.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants