-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added simplified BigDecimal functions to enable easier
Real
protoco…
…l compliance.
- Loading branch information
1 parent
3dbbe2a
commit cf2ed84
Showing
759 changed files
with
960 additions
and
794 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
Sources/BigDecimal/BigDecimal.docc/BigDecimal.doccarchive/data/documentation/bigdecimal.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../BigDecimal.docc/BigDecimal.doccarchive/data/documentation/bigdecimal/asincalculator.json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
.../BigDecimal.doccarchive/data/documentation/bigdecimal/asincalculator/calculate(_:_:).json
Large diffs are not rendered by default.
Oops, something went wrong.
2 changes: 1 addition & 1 deletion
2
...BigDecimal.doccarchive/data/documentation/bigdecimal/asincalculator/calculateinpairs.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/bigdecimal\/asincalculator\/calculateinpairs"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateInPairs","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"SeriesCalculator.calculateInPairs"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"calculateInPairs","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:10BigDecimal14AsinCalculatorV16calculateInPairsSbvp","modules":[{"name":"BigDecimal"}]},"hierarchy":{"paths":[["doc:\/\/BigDecimal\/documentation\/BigDecimal","doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator"]]},"references":{"doc://BigDecimal/documentation/BigDecimal":{"role":"collection","title":"BigDecimal","abstract":[{"type":"text","text":"The BigDecimal package provides arbitrary-precision (with an adjustable upper"},{"type":"text","text":" "},{"type":"text","text":"limit for performance) and fixed-precision decimal arithmetic in Swift."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator/calculateInPairs":{"role":"symbol","title":"calculateInPairs","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateInPairs","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal\/asincalculator\/calculateinpairs"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator":{"role":"symbol","title":"AsinCalculator","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsinCalculator"}],"abstract":[{"type":"text","text":"Calculates arcsine using the Maclaurin\/Taylor series."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsinCalculator"}],"url":"\/documentation\/bigdecimal\/asincalculator"}}} | ||
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/bigdecimal\/asincalculator\/calculateinpairs"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateInPairs","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Inherited from "},{"type":"codeVoice","code":"SeriesCalculator.calculateInPairs"},{"type":"text","text":"."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"title":"calculateInPairs","roleHeading":"Instance Property","role":"symbol","symbolKind":"property","externalID":"s:10BigDecimal14AsinCalculatorV16calculateInPairsSbvp","modules":[{"name":"BigDecimal"}]},"hierarchy":{"paths":[["doc:\/\/BigDecimal\/documentation\/BigDecimal","doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator"]]},"references":{"doc://BigDecimal/documentation/BigDecimal/AsinCalculator/calculateInPairs":{"role":"symbol","title":"calculateInPairs","fragments":[{"kind":"keyword","text":"var"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateInPairs"},{"kind":"text","text":": "},{"kind":"typeIdentifier","text":"Bool","preciseIdentifier":"s:Sb"}],"abstract":[],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateInPairs","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal\/asincalculator\/calculateinpairs"},"doc://BigDecimal/documentation/BigDecimal":{"role":"collection","title":"BigDecimal","abstract":[{"type":"text","text":"The BigDecimal package provides arbitrary-precision (with an adjustable upper"},{"type":"text","text":" "},{"type":"text","text":"limit for performance) and fixed-precision decimal arithmetic in Swift."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator":{"role":"symbol","title":"AsinCalculator","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsinCalculator"}],"abstract":[{"type":"text","text":"Calculates arcsine using the Maclaurin\/Taylor series."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsinCalculator"}],"url":"\/documentation\/bigdecimal\/asincalculator"}}} |
2 changes: 1 addition & 1 deletion
2
...cimal.doccarchive/data/documentation/bigdecimal/asincalculator/calculatenextfactor().json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/bigdecimal\/asincalculator\/calculatenextfactor()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateNextFactor()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Calculates the factor of the next term."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"title":"calculateNextFactor()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:10BigDecimal14AsinCalculatorV19calculateNextFactoryyF","modules":[{"name":"BigDecimal"}]},"hierarchy":{"paths":[["doc:\/\/BigDecimal\/documentation\/BigDecimal","doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator"]]},"references":{"doc://BigDecimal/documentation/BigDecimal":{"role":"collection","title":"BigDecimal","abstract":[{"type":"text","text":"The BigDecimal package provides arbitrary-precision (with an adjustable upper"},{"type":"text","text":" "},{"type":"text","text":"limit for performance) and fixed-precision decimal arithmetic in Swift."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator/calculateNextFactor()":{"role":"symbol","title":"calculateNextFactor()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Calculates the factor of the next term."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateNextFactor()","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal\/asincalculator\/calculatenextfactor()"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator":{"role":"symbol","title":"AsinCalculator","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsinCalculator"}],"abstract":[{"type":"text","text":"Calculates arcsine using the Maclaurin\/Taylor series."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsinCalculator"}],"url":"\/documentation\/bigdecimal\/asincalculator"}}} | ||
{"primaryContentSections":[{"kind":"declarations","declarations":[{"tokens":[{"kind":"keyword","text":"mutating"},{"kind":"text","text":" "},{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"languages":["swift"],"platforms":["macOS"]}]}],"schemaVersion":{"major":0,"minor":3,"patch":0},"sections":[],"variants":[{"paths":["\/documentation\/bigdecimal\/asincalculator\/calculatenextfactor()"],"traits":[{"interfaceLanguage":"swift"}]}],"identifier":{"url":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateNextFactor()","interfaceLanguage":"swift"},"abstract":[{"type":"text","text":"Calculates the factor of the next term."}],"kind":"symbol","metadata":{"fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"title":"calculateNextFactor()","roleHeading":"Instance Method","role":"symbol","symbolKind":"method","externalID":"s:10BigDecimal14AsinCalculatorV19calculateNextFactoryyF","modules":[{"name":"BigDecimal"}]},"hierarchy":{"paths":[["doc:\/\/BigDecimal\/documentation\/BigDecimal","doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator"]]},"references":{"doc://BigDecimal/documentation/BigDecimal/AsinCalculator/calculateNextFactor()":{"role":"symbol","title":"calculateNextFactor()","fragments":[{"kind":"keyword","text":"func"},{"kind":"text","text":" "},{"kind":"identifier","text":"calculateNextFactor"},{"kind":"text","text":"()"}],"abstract":[{"type":"text","text":"Calculates the factor of the next term."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator\/calculateNextFactor()","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal\/asincalculator\/calculatenextfactor()"},"doc://BigDecimal/documentation/BigDecimal":{"role":"collection","title":"BigDecimal","abstract":[{"type":"text","text":"The BigDecimal package provides arbitrary-precision (with an adjustable upper"},{"type":"text","text":" "},{"type":"text","text":"limit for performance) and fixed-precision decimal arithmetic in Swift."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal","kind":"symbol","type":"topic","url":"\/documentation\/bigdecimal"},"doc://BigDecimal/documentation/BigDecimal/AsinCalculator":{"role":"symbol","title":"AsinCalculator","fragments":[{"kind":"keyword","text":"struct"},{"kind":"text","text":" "},{"kind":"identifier","text":"AsinCalculator"}],"abstract":[{"type":"text","text":"Calculates arcsine using the Maclaurin\/Taylor series."}],"identifier":"doc:\/\/BigDecimal\/documentation\/BigDecimal\/AsinCalculator","kind":"symbol","type":"topic","navigatorTitle":[{"kind":"identifier","text":"AsinCalculator"}],"url":"\/documentation\/bigdecimal\/asincalculator"}}} |
Oops, something went wrong.
cf2ed84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Impressive stuff. I see that the
RealModule
import is temporarily commented out; are there plans forBigDecimal
to conform toReal
out-of-the box?cf2ed84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, provided that the swift-numerics becomes compatible with swift playgrounds.
At the moment playgrounds do not support compiling C code which swift-numerics still has.
However, it is easy to make DecimalMath compliant to
Real
since it already contains all required methods: