Skip to content

Commit

Permalink
Update SoulverCore framework (v1.4.3)
Browse files Browse the repository at this point in the history
Compiled with Xcode 13.1
  • Loading branch information
zcohan committed Dec 29, 2021
1 parent ddf0970 commit fad2958
Show file tree
Hide file tree
Showing 75 changed files with 3,806 additions and 3,320 deletions.
4 changes: 2 additions & 2 deletions Package.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ let package = Package(
targets: [
.binaryTarget(
name: "SoulverCore",
url: "https://github.com/soulverteam/SoulverCore/releases/download/1.4.2/SoulverCore.xcframework.zip",
checksum: "25235e6f60129bf02205922a20e9a547ae510da2f2a2c10e1c3d8dbc982cc8d7"),
url: "https://github.com/soulverteam/SoulverCore/releases/download/1.4.3/SoulverCore.xcframework.zip",
checksum: "010c9ab721106d078f1510bc997e94e76729864b17c3ff79ed3dcc227f0ca867"),
]
)
28 changes: 13 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ SoulverCore is the math engine from the popular notepad calculator app [Soulver]

Soulver uses **exactly the same** version of SoulverCore that is available here. Everything you can do in Soulver, you can do using SoulverCore.

SoulverCore has been designed to have no 3rd party dependencies. It is written in 100% Swift. As such it works wherever Swift is available (including on Windows & Linux).
SoulverCore has been designed to have no 3rd party dependencies. It is written in 100% Swift.

## Apps using SoulverCore

Expand Down Expand Up @@ -48,21 +48,21 @@ To calculate the result of a single expression, use a `Calculator` object:
import SoulverCore

let calculator = Calculator(customization: .standard)
let result = calculator.evaluate("123 + 456")
let result = calculator.calculate("123 + 456")
print("The answer is \(result.stringValue)") // prints 579
```

SoulverCore can perform all sorts of calculations, including unit conversions, date & calendar math, rate calculations, percentage phrase functions, time zone conversions, and much more. It also cleverly ignores "meaningless" words:

```swift
calculator.evaluate("$10 for lunch + 15% tip") // $11.50
calculator.evaluate("65 kg in pounds") // 154.32 lb
calculator.evaluate("40 as % of 90") // 44.44%
calculator.evaluate("$150 is 25% on what") // $120
calculator.evaluate("$25/hour * 14 hours of work") // $350.00
calculator.evaluate("January 30 2020 + 3 months 2 weeks 5 days") // 19 May
calculator.evaluate("9:35am in New York to Japan") // 10:35 pm
calculator.evaluate("$25k over 10 years at 7.5%") // $51,525.79 (compound interest)
calculator.calculate("$10 for lunch + 15% tip") // $11.50
calculator.calculate("65 kg in pounds") // 154.32 lb
calculator.calculate("40 as % of 90") // 44.44%
calculator.calculate("$150 is 25% on what") // $120
calculator.calculate("$25/hour * 14 hours of work") // $350.00
calculator.calculate("January 30 2020 + 3 months 2 weeks 5 days") // 19 May
calculator.calculate("9:35am in New York to Japan") // 10:35 pm
calculator.calculate("$25k over 10 years at 7.5%") // $51,525.79 (compound interest)

```

Expand All @@ -77,7 +77,7 @@ let variableList = VariableList(variables:
Variable(name: "b", value: "456"),
]
)
calculator.evaluate("a + b", with: variableList) // 579
calculator.calculate("a + b", with: variableList) // 579
```

## Custom Units
Expand Down Expand Up @@ -186,14 +186,12 @@ calculator.calculate("π") // 3.14

SoulverCore is *fast*. You can disable certain features for even greater performance (see `EngineCustomization.featureFlags`), but with the complete feature set most expressions are processed in 1-5 ms on an Intel Mac, and <1ms on an Apple Silicon Mac.

This performance is due to months of work optimizing every part of the calculation engine. Like the original Safari team, performance is measured after every change and commits with performance regressions are not accepted.

SoulverCore has an excellent test suite with more than 1,500 tests. Most bugs are fixed the same week they are reported.
Like the original Safari team, performance is measured after every change and commits with performance regressions are not accepted.

## Localizations

In addition to English, SoulverCore is fully localized into German 🇩🇪, Russian 🇷🇺, and simplified Chinese 🇨🇳.
Support for the romance languages (French, Spanish, etc) is planned for 2021.
Support for additional romance languages (French, Spanish, etc) is planned for 2022.

## See Also
__Adding calculation capabilities to an NSTextView or UITextView__
Expand Down
16 changes: 8 additions & 8 deletions SoulverCore.xcframework/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,22 @@
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64</string>
<string>ios-arm64_x86_64-simulator</string>
<key>LibraryPath</key>
<string>SoulverCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>ios-arm64_x86_64-simulator</string>
<string>macos-arm64_x86_64</string>
<key>LibraryPath</key>
<string>SoulverCore.framework</string>
<key>SupportedArchitectures</key>
Expand All @@ -42,22 +45,19 @@
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>ios</string>
<key>SupportedPlatformVariant</key>
<string>simulator</string>
<string>macos</string>
</dict>
<dict>
<key>LibraryIdentifier</key>
<string>macos-arm64_x86_64</string>
<string>ios-arm64</string>
<key>LibraryPath</key>
<string>SoulverCore.framework</string>
<key>SupportedArchitectures</key>
<array>
<string>arm64</string>
<string>x86_64</string>
</array>
<key>SupportedPlatform</key>
<string>macos</string>
<string>ios</string>
</dict>
</array>
<key>CFBundlePackageType</key>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Generated by Apple Swift version 5.4.2 (swiftlang-1205.0.28.2 clang-1205.0.19.57)
// Generated by Apple Swift version 5.5.1 (swiftlang-1300.0.31.4 clang-1300.0.29.6)
#ifndef SOULVERCORE_SWIFT_H
#define SOULVERCORE_SWIFT_H
#pragma clang diagnostic push
Expand Down
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit fad2958

Please sign in to comment.