diff --git a/src/Data/Quantity/Math.purs b/src/Data/Quantity/Math.purs index 853c1aa..af3d144 100644 --- a/src/Data/Quantity/Math.purs +++ b/src/Data/Quantity/Math.purs @@ -33,6 +33,7 @@ module Data.Quantity.Math , pi , e , tau + , phi ) where import Prelude @@ -149,3 +150,6 @@ e = scalar' Decimal.e tau ∷ Quantity tau = scalar' $ Decimal.fromNumber 2.0 * Decimal.pi + +phi ∷ Quantity +phi = scalar' $ (one + Decimal.sqrt (Decimal.fromNumber 5.0)) / Decimal.fromNumber 2.0 diff --git a/src/Quantities.purs b/src/Quantities.purs index 32c4366..d99fb6b 100644 --- a/src/Quantities.purs +++ b/src/Quantities.purs @@ -26,7 +26,7 @@ import Data.Quantity (ConversionError(..), Quantity, abs, approximatelyEqual, as sqrt, toScalar, toScalar', toStandard, (.*), (⊕), (⊖), (⊗), (⊘)) as DQ import Data.Quantity.Math (acos, acosh, asin, asinh, atan, atan2, atanh, ceil, cos, cosh, e, exp, factorial, floor, gamma, ln, log10, max, max2, mean, min, - min2, modulo, pi, round, sin, sinh, tan, tanh, tau) as DQM + min2, modulo, pi, round, sin, sinh, tan, tanh, tau, phi) as DQM import Data.Quantity.Physics (avogadroConstant, electronCharge, electronMass, g0, gravitationalConstant, kB, planckConstant, protonMass, idealGasConstant, speedOfLight, µ0, µB, α, ε0, ℏ) as DQP