mathsdk 0.2.1
mathsdk: ^0.2.1 copied to clipboard
Native symbolic math engine (SymEngine-backed) for Flutter via dart:ffi — evaluation, calculus, equation solving, and matrix operations.
Changelog #
0.2.1 #
- Fixed:
solveandsolveRootsreported no solution for equations the native solver cannot handle, such assqrt(x) = 3orexp(x) = 1, and dropped roots of products such asx*sqrt(x - 1) = 0. Equations that are not polynomial or rational in the variable now throw aMathSdkExceptionwithMATHSDK_STATUS_NOT_IMPLEMENTED.
0.2.0 #
- Fixed: the package could not build when installed from pub.dev. The
Android build referenced native sources above the package directory, which
the published archive does not contain. Gradle now downloads a prebuilt
libmathsdk.soper ABI from the matching GitHub release, and still builds from source forpath:dependencies on a repository checkout. - Added
armeabi-v7aalongsidearm64-v8aandx86_64. Only the ABIs your build actually targets are downloaded. MathSdk.open()is now a per-isolate singleton instead of loading the library and resolving symbols again on every call.- Added the
MathSdkAsyncextension:evaluateAsync,derivativeAsync,solveAsync,integralAsync,seriesAsync, andmatrixOpAsyncrun on a background isolate so heavy symbolic work does not block the UI isolate. - Added typed accessors so callers stop hand-parsing the native output:
solveRoots,solveSystem,matrix(returningMathMatrix), andevaluateWithSteps(returningMathSteps). The raw-string methods are unchanged. - Documented the
orderlimits onderivative(1-10) andseries(1-20), which the native library enforces. - Documented the measured cost of each operation on
MathSdkAsync, so the choice between the synchronous and background-isolate variants is based on numbers rather than guesswork. - Prebuilt libraries are verified against the
SHA256SUMSpublished with the release. A truncated or altered download now fails the build with a clear message instead of being packaged into the APK and failing at runtime. - Prebuilt libraries are cached under the Gradle home instead of
build/, soflutter cleanno longer forces a re-download on every build. - Fixed
MathSdk.versionreporting0.1.0. The version now comes frompubspec.yamlalone, instead of being repeated in the native CMake build and the Android Gradle build. - A native call that reports success without writing a result now throws
MathSdkExceptioninstead of dereferencing a null pointer. - Documented
MathSdkStatusand each of its values, plus instance lifetime and isolate behaviour.
0.1.1 #
Added dartdoc comments to the public API and shortened the package description. No functional changes.
0.1.0 #
Initial release. Wraps MathSDK's native C ABI (native/include/mathsdk/math_sdk.h)
via dart:ffi:
evaluate,evaluateSteps— exact expression evaluation, with a step-by-step reduction trace for the arithmetic subset.substitute,evaluateNumeric— variable substitution and numeric (double) evaluation.derivative,integral,series,limit— calculus operations, each documented in the native header with its exact coverage and ceiling.solve,solveLinearSystem— equation and linear system solving.matrixOp— determinant, inverse, transpose, add, multiply.odeSolveSeparable— separable first-order ODEs only.
Android only in this version (Gradle externalNativeBuild compiles the
native library from source — no prebuilt binaries are shipped or copied by
hand). iOS/desktop support is tracked separately; see the root MathSDK
repository's README for platform status.