Blog Options
Archive
<< July 2019 >>-
Tuesday 23
- macOS 64 bit compile-ready support -
Friday 19
- FNC Code Gems: Helpers for Base64 encoding and decoding -
Wednesday 17
- TMS FNC Core 1.4 update with 2 new components -
Tuesday 16
- FNC Code Gems: Display information and common folders -
Monday 8
- FNC BETA with 2 new components -
Friday 5
- One Codebase - Multiple Targets -
Thursday 4
- TMS WEB Core: Integrating the Froala Editor -
Wednesday 3
- Ate too much candy? Calculate and export your BMI to PDF with FNC for the WEB! -
Tuesday 2
- Free Books to Learn more about Web Development
- Using Bootstrap themes and runtime theme selection in TMS WEB Core applications
Authors
- Adrian Gallero (20)
- Bart Holvoet (2)
- Bernard Roussely (1)
- Bruno Fierens (223)
- Gjalt Vanhauwaert (1)
- Holger Flick (15)
- Marcos Douglas B. Santos (5)
- Masiha Zemarai (11)
- Nancy Lescouhier (32)
- Pieter Scheldeman (19)
- Roman Yankovsky (1)
- Tunde Keller (3)
- Wagner R. Landgraf (61)
Blog
Most Recent Post | Index List
Introducing Sergey Gladkiy and TMS Analytics & Physics Pack
Bookmarks:Monday, November 07, 2016
It's always a privilege and honour to be able to work with very smart people who are not only expert in Delphi but also expert in a specific domain. Earlier this year, Bernard Roussely and Marion Candau joined tmssoftware.com and focus so far on advanced cryptography algorithms with the highest security levels in TMS Cryptography Pack. More tools that will use this underlying strong technology are already in the pipeline. Around the same time, also Roman Yankovsky joined tmssoftware.com and the static code analysis tool TMS FixInsight is the result. With TMS FixInsight, you can bring your Delphi code to a higher quality & safer level with numerous code hints and suggestions it gives.Today, I'm proud to announce Sergey Gladkiy joins the TMS team for working on products with a strong mathematical background. The first result is the TMS Analytics & Physics Pack. This pack offers a set of (non-visual) platform independent classes to work with mathematical expressions and units of measurements. In TMS Analytics & Physics Pack, you can do evaluation of complex multiparameter mathematical expressions, including expressions with complex numbers. You can do physical measurement conversions of all kinds. But perhaps the most amazing part is symbolic derivative calculations. In this respect, TMS Analytics & Physics Pack brings a math wizard in the form of classes that can be used in VCL and FMX apps. You can discover the power of this library via the included demo but I wanted to share some examples of symbolic derivative calculations that will boggle your mind:
Task: calculate the derivative function of:
1/(x-1)+(2*x-1)/(x+1)^2
Result:
(-(1)/(x-1)^2)+(2*(x+1)^2-(2*(x+1)^(2-1))*(2*x-1))/((x+1)^2)^2
The code to achieve this is as simple as:
var f,df: string; f := '1/(x-1)+(2*x-1)/(x+1)^2'; try if Translator.CheckSyntax(f) then begin df:=Translator.Derivative(f,'x'); ShowMessage('Derivative function :' + df); end; except ShowMessage('Error'); end;
Task: calculate the derivative function of:
(sin(x)+cos(x))/x
Result:
((cos(x)+(-sin(x)))*x-(sin(x)+cos(x)))/x^2
The resulting derivative expression can then be evaluated, for example against x=2:
var df: string; v: TValue; df := '((cos(x)+(-sin(x)))*x-(sin(x)+cos(x)))/x^2'; try Translater.Add('x', 2.0); if Translator.CheckSyntax(df) then begin v :=Translator.Calculate(df); ShowMessage('Result :' + s:=TUtilities.SafeToString(v)); end; except ShowMessage('Error'); end;
I kindly invite you to explore our new TMS Analytics & Physics Pack. A fully functional trial version is available and the registered versions comes with full source code. We're eager to learn in what kind of exciting and cool applications these powerful classes will find a place!
Bruno Fierens
Bookmarks:
This blog post has received 6 comments.
2. Monday, November 07, 2016 at 9:03:05 PM
Please see page 29 of the PDF developer guide that deals with adding custom functions: http://www.tmssoftware.biz/download/manuals/TMS%20ANALYTICS%20Delphi%20Development.pdf
Bruno Fierens
3. Tuesday, November 08, 2016 at 9:23:38 PM
Can it simplify expressions? I notice that the derivative could be simplified, eg (2-1) could be reduce to (1) and in this case completely removed.
Sauro Herbert
4. Wednesday, November 09, 2016 at 9:11:20 PM
''Simple'' simplifications will be done. Extended simplifications will be added in a future update.
Bruno Fierens
5. Saturday, November 12, 2016 at 9:24:36 AM
From examining the documentation, am I correct in understanding that despite needing to create and use variable objects, this library only parses expression strings and doesn''t offer any symbolic manipulation capability?
Joseph Mitzen
6. Saturday, November 12, 2016 at 6:06:29 PM
The main aim of the library is providing evaluation of string expressions and symbolic derivative calculation.
This library includes algorithms for symbolic expression manipulation. The simplest way is using the TExpression class - see page 23 of the PDF developers guide.
This library includes algorithms for symbolic expression manipulation. The simplest way is using the TExpression class - see page 23 of the PDF developers guide.
Bruno Fierens
Most Recent Post | Index List
Can i create a new function like Clipper IIF?
Example:
IIF( x > 0 , a + b , c * d )
Diego Diaz