# HG changeset patch # User Claus Gittinger # Date 1574264030 -3600 # Node ID 606ca39a5e38dca2e42769f372e62c00055b14e6 # Parent 843e3aaea193b9d5641bcef8d1fefad9a23901fa #FEATURE by exept class: LongFloat class definition class: LongFloat class added: #phi diff -r 843e3aaea193 -r 606ca39a5e38 LongFloat.st --- a/LongFloat.st Wed Nov 20 16:33:31 2019 +0100 +++ b/LongFloat.st Wed Nov 20 16:33:50 2019 +0100 @@ -19,7 +19,7 @@ instanceVariableNames:'' classVariableNames:'DefaultPrintFormat DefaultPrintfFormat LongFloatZero LongFloatOne Pi E Epsilon NaN PositiveInfinity NegativeInfinity Halfpi - HalfpiNegative' + HalfpiNegative Phi' poolDictionaries:'' category:'Magnitude-Numbers' ! @@ -570,6 +570,19 @@ "Modified (comment): / 09-06-2019 / 12:53:25 / Claus Gittinger" ! +phi + "return the constant phi as LongFloat" + + Phi isNil ifTrue:[ + "/ phiDigits has enough digits for 128bit IEEE quads + "/ do not use as a literal constant here - we cannot depend on the underlying C-compiler here... + Phi := self readFrom:(Number phiDigits) + ]. + ^ Phi + + "Modified (format): / 06-06-2019 / 17:10:22 / Claus Gittinger" +! + pi "return the constant pi as LongFloat"